Académique Documents
Professionnel Documents
Culture Documents
Account
One of the most rewarding experiences for a TradeStation trader is to pick up a
performance report that proves their great strategy idea is indeed a profitable strategy.
Strategy testing done properly, as 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 since the cumbersome
process has several vital steps which are often missed. (An alternative to manually testing
your strategy as outlined in this article is the Strategy Testing Tool.)
Done incorrectly, strategy testing can result in false hope in a losing strategy. 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.
(a) In your TradeStation platform menu, go to “format symbol” and give TradeStation a
starting and ending date to test. This historical date range is called the "in-sample data." Do
not include the most recent six months in this “in-sample data.” The most recent six months
is called the "out-of-sample data," and it will be used later during your "out-of-sample data"
testing step.
(b) Next, in your TradeStation platform menu, go to "format strategy" and select "properties
for all." Now select the "general" tab and enter the commissions and slippage (be as
realistic as possible, or estimate too high if you are not sure). If this step is skipped, then the
strategy testing performance report will be meaningless. If this is not done you might have a
good looking performance report equity curve, but as soon as you enter the commissions
and slippage figures the equity curve can reverse into an underwater equity curve.
(c) The last configuration step is under "properties for all" under the "general" tab. Look in
the bottom left section called "strategy testing resolution." Check the "look-inside-bar back-
testing" option and then select the smallest time frame available for your chart style to make
the strategy testing more closely resemble live data. When strategy testing, TradeStation
uses the open, high, low, and closing data, thus the larger the time frame bar, the more
distorted the strategy testing performance report can be. This "look-inside bar back-testing"
option will make the computer do a lot more strategy testing calculations. This may really
slow down your performance report generation, so please be patient. For an accurate
performance report you must use the "look-inside bar back-testing" option.
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.
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
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.
Begin with bringing up a TradeStation 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.”
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 TradeStation 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.
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 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 toward the maximum 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 TradeStation
trading account, and have confidence in live trading your strategy.
Click on the following link to learn how to quickly and accurately strategy test any trading idea you
might have without using EasyLanguage:
http://www.customizedtrading.com/TradeStation_Add_Ons/TradeStation_Backtesting_Strategy