Hi
I have downloaded historical data from Interactive Brokers, for futures contracts (I did that a few months ago). Тhen on that historical data using strategy evolver profitable strategies were generated. I saved a few of them (those that gave the best results ).
After some time, when I did a backtest again, the saved strategy gave negative results,
for same historical data for the same futures contract.
For example - 10 Year T-Note.
When the strategies were generated, there was a profit of about $4,000 to $5,000 over the life of the futures contract. After some time I did a backtest again with the same strategy and the same historical data. The results are catastrophically bad, there is a loss of 85 K.
How is this possible?
Since it is a strategy where buying is calculated from the condition : Average price is greather then...... 2 bars ago, I wonder if there is an error in calculating those two bars.
Is it about the following ?
In the first backtest, a certain bar was taken as bar number 1 ( and then based on that a calculation is made ) , and in the second backtest, a different bar was taken as bar number 1. Because in the strategy created by Building Blocks it is appointed :
Note: Conditions blocks are evaluated in the order they appear under an Entry/Exit.
If that's not the case, then what could be the reason for such different results?
If I'm right, then can the strategy be applied manually, i.e. can I determine from which bar the values should start to be calculated?
thanks in advance
I have downloaded historical data from Interactive Brokers, for futures contracts (I did that a few months ago). Тhen on that historical data using strategy evolver profitable strategies were generated. I saved a few of them (those that gave the best results ).
After some time, when I did a backtest again, the saved strategy gave negative results,
for same historical data for the same futures contract.
For example - 10 Year T-Note.
When the strategies were generated, there was a profit of about $4,000 to $5,000 over the life of the futures contract. After some time I did a backtest again with the same strategy and the same historical data. The results are catastrophically bad, there is a loss of 85 K.
How is this possible?
Since it is a strategy where buying is calculated from the condition : Average price is greather then...... 2 bars ago, I wonder if there is an error in calculating those two bars.
Is it about the following ?
In the first backtest, a certain bar was taken as bar number 1 ( and then based on that a calculation is made ) , and in the second backtest, a different bar was taken as bar number 1. Because in the strategy created by Building Blocks it is appointed :
Note: Conditions blocks are evaluated in the order they appear under an Entry/Exit.
If that's not the case, then what could be the reason for such different results?
If I'm right, then can the strategy be applied manually, i.e. can I determine from which bar the values should start to be calculated?
thanks in advance
Rename
Before anything else, have you read the FAQ? > "Every time I run a Strategy I get a different result. Why?"
Seems like too much of a difference to me - but it would depend heavily if the amount of Starting Capital, margin, and the contract specifications had changed.
It's easy to determine if there's an error in the rules - just inspect the trades. I'm pretty sure you won't find an error. It's far more likely some very important setting changed, especially if the results are consistent now.
It's easy to determine if there's an error in the rules - just inspect the trades. I'm pretty sure you won't find an error. It's far more likely some very important setting changed, especially if the results are consistent now.
I read FAQ and there it is stated that " WealthLab randomly takes some of the possible candidate trades, resulting in different outcomes."
It's probably about that, during each backtest, the bar from which the strategy will start to be applied is randomly selected.
There is enough starting capital for a backtest and NSF position count is 0.
Just a small clarification. It is about high-frequency trading ( with data scale of 5 min.) , with many positions, which can be seen from the picture.
So, it is essential from which bar the strategy will start to be applied. Moving one bar forward or backward produces completely different results. I can find no other explanation why there are such opposite results.
Because" WealthLab randomly takes some of the possible candidate trades, resulting in different outcomes."
To prevent this from happening on every backtest,, is there any way I can decide at which bar to start applying the strategy?
First, a WealthLab backtest takes candidates randomly only if there is a NSF condition. And even there, it's only random if you haven't assigned a Transaction.Weight.
Anyway, with 0 NSF positions, that doesn't apply at all here. The randomness is apparently injected by your logic.
Re: "the bar from which the strategy will start to be applied is randomly selected"
Why and what's the point of it?
You should be able to start on any bar, but as long as the seed data is sufficient*, the trades after that bar should be the same even if you started on any previous bar.
* Many IIR-type indicators require a lot of data to stabilize - most are listed in the User Guide > Indicators > Stability of Indicators.
Anyway, with 0 NSF positions, that doesn't apply at all here. The randomness is apparently injected by your logic.
Re: "the bar from which the strategy will start to be applied is randomly selected"
Why and what's the point of it?
You should be able to start on any bar, but as long as the seed data is sufficient*, the trades after that bar should be the same even if you started on any previous bar.
* Many IIR-type indicators require a lot of data to stabilize - most are listed in the User Guide > Indicators > Stability of Indicators.
There could be several other reasons. If you want to export your Strategy and email it to support@wealth-lab.com we can tell you exactly why it's happening in your case.
Thank you for the answer
Now things are clearer to me. I also read in User Guide about the stability of indicators. The indicator from my strategy is in the Standard Indicators group, which have the potential to produce unstable values at the beginning of the series.
In the user guide it is stated '' The trick is to understand the indicators that you're using, and to ignore their values until they're stable. For meaningful and reproducible results from a trading strategy, you must use indicators when they're stable ""
I don't have as much knowledge as you in this area, and that's why I didn't understand how with the same historical data there were different results.
I just wanted when i generate some strategy that shows positive results to see if I can apply it in live trading.
Could you give me some advice, how to know when indicator is stable, or is there any way to achieve stability of indicators and sufficient seed data ?
Maybe these question it seems illogical, but as I said, I don't have that much knowledge. I just want, when I generate a strategy with Wealth Lab, that shows good results, so I can apply it in live trading as a tested and credible strategy.
Now things are clearer to me. I also read in User Guide about the stability of indicators. The indicator from my strategy is in the Standard Indicators group, which have the potential to produce unstable values at the beginning of the series.
In the user guide it is stated '' The trick is to understand the indicators that you're using, and to ignore their values until they're stable. For meaningful and reproducible results from a trading strategy, you must use indicators when they're stable ""
I don't have as much knowledge as you in this area, and that's why I didn't understand how with the same historical data there were different results.
I just wanted when i generate some strategy that shows positive results to see if I can apply it in live trading.
Could you give me some advice, how to know when indicator is stable, or is there any way to achieve stability of indicators and sufficient seed data ?
Maybe these question it seems illogical, but as I said, I don't have that much knowledge. I just want, when I generate a strategy with Wealth Lab, that shows good results, so I can apply it in live trading as a tested and credible strategy.
Looks like we posted at the same time :)
Ok, I email strategy
Ok, I email strategy
QUOTE:With Blocks, you're limited somewhat. If an EMA has a 20 period average, the strategy will start trading at bar 20. Stable values won't occur until much later - say bar 60 or 100.
Could you give me some advice, how to know when indicator is stable, or is there any way to achieve stability of indicators and sufficient seed data ?
In C# Code, you'd just assign the StartIndex to 100, for example. In this way, there will be not trading until the indicator starts generating more stable values.
Consequently, the trades early on (before bar 60 or 100) in such a [block] strategy are trash. However, you can get consistent results by fixing the starting date using a Date Range, for example. By always starting from the same point, the trades will be consistent throughout the history.
Your Response
Post
Edit Post
Login is required