
Avoid costly mistakes by correctly testing your strategy idea. With proper strategy testing you can be sure you have a viable strategy and will protect your account against common errors in testing that cause unnecessary draw downs. This article walks you through the detailed steps to correctly test your trading strategy.
One of the most rewarding experiences for a trader is to pick up a performance report that proves their great strategy idea is indeed a profitable strategy. Strategy testing done properly, as is outlined in this article, can verify the efficacy of your trading strategy and give you confidence to start trading it. But be forewarned, strategy testing done improperly can lead you toward financial destruction.
Strategy testing done incorrectly can result in false hope in a losing strategy. Here is a dramatic example.
A trader recently shared his experience of getting great results from strategy testing his idea, but after trading it live in the market, he was losing money every day. He was baffled about what he did wrong. Having gotten excellent results on his back-testing performance report, he wondered why his promising strategy was draining his trading account. The problem was he violated several of the proper steps necessary for reliable strategy testing.
With the knowledge of how to get an accurate performance report you will be able to trust your strategy in live trading and protect your trading account. In order to properly test a strategy, there are 5 main steps that are vital to follow; configure TradeStation, "in-sample data" testing, "out-of-sample data" testing, live forward testing on the simulator account, and real live trading execution.
Before you begin testing your data, you must configure TradeStation so that the data it pulls onto your performance report will be accurate. Follow these 3 critical items to properly configure TradeStation.
These configuration steps are critical to getting an accurate performance report, so be sure this is completed precisely before continuing. Once TradeStation has been configured correctly, you can begin testing your strategy.
You are now ready to start testing your strategy idea. We will begin with testing the “in-sample data” that you set up for testing during the configuration steps. Begin with bringing up a trading performance report. Right now I have a performance report in front of me that I will refer to, but you will be looking at your own performance report to analyze your own numbers. This is what we will be referring to in the steps below. There are 7 sub-steps to “in-sample data” testing, as follows:
First, look at how many trades the strategy made. To reduce strategy testing errors, where error is defined by [ error = 1 / Square Root (Number Trades In Test) ], you want at least 400 trades to reduce the margin for error to 5% in your strategy testing results. At 100 trades you have a 10% margin for error.
Critical Note: The greater the number of inputs in your strategy that you optimize, the greater the number of trades required to keep from over optimizing your strategy.
Also look at how many times the strategy traded on average per day. The more often a strategy trades the more profit it can generate.
In the performance report that I am looking at, it traded 397 trades in the last 3 1/2 months, averaging 5.3 trades per day.
Second, look at the “Average Trade Amount.” It needs to be large enough that slow order fills and/or larger than normal slippage does not kill the profitability of the strategy.
In my report the “Average Trade Amount” is $162.32. The commissions and slippage amount as defined in the set up steps is already subtracted in this performance report.
Third, look to see if the “Profit Factor” and “Ratio Average Win-Average Loss” are both above 1.5 and the percentage of winning trades around 45% or better.
This strategy had a “Profit Factor” of 1.83.
This strategy had a “Ratio Average Win-Average Loss” of 2.28 (2.28 means breakeven is around 28% “Percent Winning Trades”)
On this strategy the “Percent Winning Trades” was 44.58%.
Fourth, look at the trade list page and assess the profit run ups and draw downs column. Notice how many trades made money and how much money they made before the trade exit occurred. Looking at what amount of money was made in relation to the profit run up and draw down, you want to know if managing the trades could generate more profits. The example used here shows that a good percentage of trades made much higher profits than where the automated exit points occurred.
Fifth, look at the three draw down (DD) numbers. I like to see the largest number at 15% or less of the “Total Net Profit” and the “Max DD” at 5% or less of the “Total Net Profit” (these numbers tell about the draw down risk level during your trades).
Sixth, Looking at the “Largest Losing Trade” on the report, I like to see 5% or less of the “Total Net Profit.” In my report the “Largest Losing Trade” that occurred was $2,580 which is 4% of “Total Net Profit.”
Seventh, I review the length of time in the average trade. Does the average time in a trade comply with the golden rule of trading; "cut your losses quickly and let your profits run?" You will also want to see if the strategy is built using only profit exits (no real stop loss exits). It might have a nice looking report, but it could show a messed up ratio between average bars per winning trade verses average bars per losing trade if there are no stop loss exits. Here are my average bars:
This strategy complies with the golden rule of trading. Notice how it cuts losses quickly, at an average of 3.51 bars, and lets the profits run for an average of 7.24 bars.
So what does this all mean? It means this strategy has passed the historical strategy testing phase of strategy testing.
Once you have tested your “in-sample data” and have determined that your strategy is worthy of continued testing, you can now test your strategy against the “out-of-sample data.” If you have not yet tested your “in-sample data, do that before proceeding.
To test the “out-of-sample data” we use the most recent 6 months of data available that you reserved in step 1(a). In step 1(b) of this article, we talked about configuring and covered entering commissions and slippage and using the “look-inside-bar back-testing” option, which must be used to run any performance report used in your strategy testing. Be sure you have configured your trading platform correctly before moving on.
Go into “format symbol” and change the date range to include ONLY the "out-of-sample data" date range that was NOT used during the strategy testing on "in-sample data." This is referred to as testing on the "out-of-sample" data.
Begin with bringing up a trading performance report on the "out-of-sample" data and review all the items that we discussed in step 2 above on this "out-of-sample" performance report. The closer it performs to the Step 2 “in-sample data” performance report, the more robust the strategy is. This suggests that the results were not from curve fitting and you have a good chance of having a viable strategy. This “out-of-sample” date range test is much more important than the strategy testing step on the “in-sample-data” for finding a successful strategy. It is a good idea to test multiple different "out-of-sample" date ranges, which is called “Walk Forward Analysis.”
Robustness: Perry J. Kaufman stated, "Practically speaking, a robust trading strategy is one that produces consistently good results across a broad set of parameter (input) values applied to many different markets tested for many years."
If the strategy fails during this "out-of-sample data" test, do NOT optimize using your reserved “out-of-sample data.” This would defeat this vitally important step in strategy development. You can go back to your strategy and fix it, or else drop it and develop a new strategy idea.
One caveat - if your strategy is capitalizing on a certain market condition, like the current volatility, and then you “out-of-sample data” test a non-volatile date range, it may not perform well, However in our next phase of testing, “ Live Forward Testing,” it could prove to be successful since we are still in a volatile market. You must understand why your strategy works, under what market conditions it performs well, and in what market conditions it does not perform well.
Now that you have tested your “out-of-sample” data and your strategy is promising, you are ready to live forward test your strategy on the simulator account.
At this point you have configured your trading platform so your performance report will be accurate, you have tested your “in-sample data” and your “out-of-sample” data and your strategy still looks great. Now you are ready to live forward test your strategy on the simulator account.
Since step 3 "Walk Forward Testing" is so vital to properly test a trading strategy, I highly recommend reading Chapter 11 of Robert Pardo second edition book titled "The Evaluation and Optimization of Trading Strategies".
During your live forward testing on the simulator, you want to verify that the live data feed entries and exits are similar to historical entries and exits. After you have made live data trades for a day, save the live trade list. Now reload this same chart so the strategy recalculates based on the historical for this same day. Record the historical trade list and compare the live entries and exits to the historical entries and exits. Are they the same or at least similar? Do you understand the differences and the impact your "Live Data" test says about your strategy?
Only by monitoring the program daily can performance be seen under real "live" market conditions. Continue Live Forward Testing on the simulator until you are totally comfortable that your strategy works on live data. Real time results will often be less profitable than your historic results. The key question is does the real time testing show that you have a profitable strategy that is worth trading?
Once you have done your due diligence and are comfortable with your strategy results on the simulator, you are ready to trade live. Since you are trading a brand new strategy with real money, start with a significantly reduced position sizing risk of 1/4 of 1% of your account equity at risk per your stop loss point per trade. Continue trading with minimal risk until you have verified everything is working properly within your new strategy during live order executions.
Once your strategy is making money in the live market, slowly over time begin to increase your position sizing risk. Move your risk upward from 1/4 of 1% toward 1%. Continue trading at 1% risk until you have several weeks to months of consistent trading performance. If you want to be aggressive and use more, you can continue to increase SLOWLY toward 2% but I would NEVER recommend going over the maximum of 3% of your account equity at risk per trade.
If you follow the 5 steps as outlined in this article, you will now be able to confidently strategy test any strategy idea that you have. Keep this article for reference so the next time you are inspired with a great idea, you will be able to prove it out, protect your trading account, and have confidence in live trading your strategy.
Click on this link to learn how to quickly and accurately strategy test any trading idea you might have.
Are you tired of struggling to find profitable trades? Are you looking for an edge in the markets? Look no further than our custom indicators and trading systems for TradeStation.
Gain a trading edge with our Price Action and Fractal Channel indicators, which can help you spot high probability trade set-ups.
Understand the power of Multiple Time Frames and Time Based Volume to take advantage of trading opportunities across different timeframes.
Our complete Turnkey Trading Systems operate on any Forex, Futures, and Stock symbols, and include a Visual Chart Trading strategy to execute trades directly from your charts.
Experience the power of computer-assisted trading, combining the strengths of human intuition and expertise with the sophistication of indicators and RadarScreen.
Let our expert-level Trading Indicators and RadarScreen do the heavy lifting of finding possible trades and managing trade exits, so you can focus on what you do best - making trading entries.
Our Learning Center is filled with free educational articles and trading videos to teach you about the Art of Successful Trading.
Learn about the critical fundamentals for profitable trading and enhance your knowledge about the Art and Science of Successful Trading.
Ready to start trading smarter? Browse our products and get started today. Transform your trading with custom indicators and strategies for TradeStation. Gain the trading edge you need to succeed in the markets.