Yesterday, I received a question from a fellow trader about how to know if the trading system you build actually makes a profit or not. This is where backtesting comes in very handy. I myself use it quite a bit when testing new strategies before going live.



Backtest is testing a trading system using historical price data to see how much profit it would have made or how much loss it would have incurred if we had used this system in previous years. The natural assumption is that if the system performs well on past data, there’s a high chance it will perform well in the future too.

The process of backtesting isn’t too complicated. First, you need to clearly define your trading strategy, specifying which pairs to trade, what timeframe to use, and which indicators to apply. Then, select historical data to test, record the results, analyze, and refine the system to improve it.

For someone like me who doesn’t like coding, there are easy options available. The first is Excel or Google Sheets. I like this because you can load price data, create formulas to calculate SMAs or other indicators, and then set conditions for when to buy or sell. The results will show profit and loss. The downside is that it can be slow with large datasets, but it’s sufficient for starting out.

The second option is TradingView, which is a very powerful tool. It has a Strategy Tester that allows you to write and backtest strategies easily. It’s more convenient than Excel because it’s designed specifically for traders. You can use the forex backtesting feature for free, and it even provides sample strategies like BarUpDn, which buys on green candles and sells on red candles. I tested it on EURUSD over the past year, and the result was a loss of 0.94%. However, it provides a lot of useful data, such as a win rate of 35.56% and a maximum drawdown of 4.12%, which are very informative.

What to look for in backtest results? I think the most important is the cumulative return, which shows the total profit or loss. Also, the volatility of the returns is crucial. A good system should deliver consistent results without wild fluctuations. The Sharpe ratio is also important because it indicates how the return relates to the risk taken. Maximum drawdown is vital as well, showing how much your capital could be lost in the worst-case scenario.

After passing the backtest, I usually try it on a demo account before going live. Since backtesting uses historical data, the real market conditions might differ, so testing with current data is an essential step.

There are several free forex backtesting programs available, depending on whether you prefer simplicity or more accuracy. For beginners, I recommend starting with Excel or Google Sheets. Once you understand the basics, then move on to TradingView to get the most benefit.
EURUSD-0.06%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments
  • Pinned