In the first part of this series we took a look at the code for a winning strategy that we said would bring about returns that were 100x better than the traditional buy-and-hold strategy. This almost sounds too good to be true in a way as the buy-and-hold strategy is often recommended as being the best way to make consistent returns on the market. However, as we will show, the code for the strategy that we provided for you will make consistent profitability from the years 1985 until 2009.
When TradersStudio installs, it contains the data files with the NASDAQ 100 stock prices needed to test TSStockTraderLong2006. In the TradersStudio25/SampleData directory, there is a subdirectory called Nasdaqstocks with three subdirectories called‘Nasdaq100SplitOnlyAdjusted,’‘Nasdaq100DivOnlyAdjusted’and ‘Nasdaq100Unadjusted.’ This file installs in a secondary TradersStudio subdirectory in the event a user wants to maintain an earlier version of TradersStudio.
To set up the TSStockTraderLong2006 system, start the TradersStudio program. Navigate to File – Session – Create Session in the TradersStudio Main Menu and create a TradersStudio Stock Session. Name the Session ‘TSStockSysBAHAdjust.’ We will test this system buying 1 unit and the split-adjusted code will size it correctly, so the testing produces values that can be compared to a Buy-and-Hold strategy.
When completing the information in the New Development Session dialog screen, be sure to click on the TradersStudio Stocks radio button. Call the system ‘TSStockSysBAHAdjust,’ which is short for ‘TradersStudio Stock System Buy-and-Hold Adjusted.’ Highlight and select the system called TSStockTraderLong2006 in the System dropdown box. When you have completed entering the information in this screen, click on the Next button to continue.
In the Session Properties dialog box, enter Contract Lot Size of ‘1’ share for each stock. Use a Commission rate of ‘.01’ cents per share and Slippage of ‘0.1%.’ Click on the Next box to continue when these selections have been made.
The next dialog box is for the Time Frame of the analysis. Check the radio button to Select All Available Dates and set the Maximum Bars Back to ‘100’ for this example. Then, select the Daily option in the dropdown boxes labeled Mom Series Time Frame and Child 1 Time Frame. When these selections are made, click on the Next box to continue to the next screen.
In the Session Data box, the TradersStudio Stock directories will be shown in the Available Directory/Portfolio dropdown box. Click on the ‘+’ icon to open the appropriate directory as depicted below. After the directory has been selected, click on the Add All button to add the 100 stock files in the Data in Selected Portfolio box to the Selected Data box.
This is how the screen should look after adding all of the files to the Selected Data list. Click on the Next box to continue.
Note: ‘Nas100SplitOnlyAdjust’ is not just split adjusted data. It is linked using the Configure TradersStudio Stock menu item. ‘Split-Adjusted,’ ‘Unadjusted’ and ‘Dividend Only Adjusted’ are linked so TradersStudio can perform its special analysis. If ‘Nas100SplitOnlyAdjust’ is used in a standard stock mutual fund directory, it will work like classic stock split data with its problems.
The Child Data Series dialog box continues the Data Link Inputs by selecting the Child Data Series or Predictive Market. Access the file names in the Available Data dropdown box and select the Stock/Indexes option. Scroll down the list of available directories and choose the one called Sampledata/cashindex/Nasdaq. Highlight NASD100.CSV in the Data in Selected Directory and click on the ‘Set All Children’ box, which applies the predictive market to all of the markets to be tested. It could occur that you want to select a single market to compare with a different Independent 1, in this case click on ‘**not set**’ in the Session Data dropdown box.
In the Session Data dropdown box, highlight the predictive market and click on the ‘Set All Children’ box. In this case, NASD100.CSV is applied to all markets in the test. Click on Finish to continue.
After the Session is created, TradersStudio will prompt to ask if you want to run it. Click on the Yes button to run the Session.
The opening box that appears when the Session is run is the Run Session box, used to set the parameters for the system. TSStockTraderLong2006 has four parameters. The LookBack parameter is the number of bars that yesterday’s close is compared to. This value is set to ‘6’ bars. BearMult is the multiplier that is used when the NASDAQ Index is below its 50-bar average. This value is set to ‘1.3.’ BullMult is the multiplier that is used when the NASDAQ Index is above its 50-bar average. This value is set to ‘1.1.’ DisStop is used to determine a stop loss exit. This value is set to ‘25’ and is converted to 25% of the stock entry price internally. Each of the parameters is set individually by double-clicking and filling the value in the dialog box. Set the Start Date for this back test to October 1, 1985 and run it through the November 25, 2009. For the purposes of this demonstration, the entire data set will be run.
Click on the OK button to run the TSStockTraderLong2006 Stock Session.
We can see that the overlapping date range that the data ends before the end date. That is because our directory includes stocks which were removed recently from the Nasdaq index.