When I backtest my symbol rotation rsi strategy, I get different results each time. I looked at the Priority Property example in the user guide, but am not sure how it would apply to a symbol rotation script. Can someone please tell me if what I did below is correct? I now get consistent backtest results, but just not sure that the results are right.
CODE:
Please log in to see this code.
Size:
Color:
To apply priority to a position (in any kind of strategy), check if the position has been created (i.e. not null):
CODE:
Please log in to see this code.
Size:
Color:
I tried what you suggested and I get the same results as what I had before. I guess that means everything is ok?
Size:
Color:
Doesn't sound like it. You should provide the Wealth-Lab product/version, script, DataSet, scale, etc. (all details) so that we can duplicate what you're seeing to determine the cause.
Size:
Color:
I am using Pro 5.5, the scale is daily, data range is 1 year, position size is 10% equity and the DataSet is Dow 30.
CODE:
Please log in to see this code.
Size:
Color:
How many symbols do you have selected in the slider? (If it's 10, then the answer to the question becomes obvious.)
Are you clicking only 1 symbol to run the Strategy?
Size:
Color:
I have 3 symbols in the slider and yes I click 1 symbol to run the strategy (in this case, AA). As a side note, why would it be obvious if it was 10? I am not sure how that would be important.
Size:
Color:
With 10% sizing and 10 symbols, you're likely not to have enough cash to enter
Using daily, data range 1 year, position size 10% equity, starting Equity $100,000, Dow 30, Fidelity Gold commissions, no Slippage, no Round lots, no interest applies, and not using a Worst-Case Simulation, I get a Net Profit of $2,786.09 no matter which symbol I click in the Dow 30.
Do me a favor and set up those preferences click AA, and then click "Go". What's your Net Profit?
Edit:
10 symbols at 10% is 100% of equity, which will occasionally keep 1 trade from being entered due to gaps, and that trade may be different with each backtest if the script does not specify Position.Priority... but now that I see that it does specify Priority, this would not matter. :)
Size:
Color:
I get a Net Profit of $2,553.98.
Size:
Color:
1. Is your Dow 30 list current? Is mine?
AA AXP BA BAC CAT CSCO CVX DD DIS GE HD HPQ IBM INTC JNJ JPM KFT KO MCD MMM MRK MSFT PFE PG T TRV UTX VZ WMT XOM
2. Is your Net Profit consistent for the same symbol? Other symbols?
Size:
Color:
It looks like mine was not current, so I used your symbols. My new Net Profit is $2,443.15 no matter which symbol I click on.
Size:
Color:
Problem solved, right? The difference between your result and mine can without a doubt be attributed to a difference in data or some other setting.
Size:
Color:
Everything looks great. Thanks very much for your help.
Size:
Color: