Betsizing for Strategy Testing on Stocks

by Bill Brower on May 31, 2016 | Categories: stocks, Uncategorized | Tags: ,

Betsizing for Strategy Testing on Stocks

There are 2 settings that can be applied to strategy testing to control the number of shares or contracts to trade. You can trade a fixed number of shares or a fixed dollar amount. The setting is accessed from the Charting menu under Format/Strategies and selecting the button called “Properties For All” where you will see a small window containing the controls (see below). If you are trading stocks you will want to select the setting “Dollars Per Trade” if you are back-testing. This is necessary to compensate for the way that stocks are back adjusted for stock splits. As an example if you plot Apple (AAPL) daily data going back 20 years you will see that the price 20 years ago is listed at 93 cents. While it never actually traded at that price, the back-adjust for stock splits pushes the price down toward zero. So if you were testing a fixed number of shares, say 100, and made a 10% gain you would net about $9.30. This would then be combined with trades occurring more recently when prices were around $100 and a 10% gain would net $1,000. Obviously you would not combine the results in any meaningful way because they are scaled differently.

The second selection allows you to choose to trade a fixed dollar amount. When you choose that and set it to say $10,000, be sure to modify the two check mark boxes below that (“Round Down to Nearest” and “Minimum Number Shares”) to 1. Otherwise you will get some bizarre results if testing a stock with a high price. In the Apple example, a trade taken 20 years ago would show about 10753 shares (10000/.93) and a trade taken today would show about 100 shares (10000/100). This will rectify the scaling problem across all the historic trades. However, it will cause some issues if you compute your slippage and commission on a per share basis. In that case the best approach would be to select to compute it on a “per trade” basis.