Backtest results changes with same values
Forums › ProRealTime English forum › ProRealTime platform support › Backtest results changes with same values
- This topic has 22 replies, 5 voices, and was last updated 4 years ago by GraHal.
-
-
11/25/2020 at 6:52 PM #151608
After several hours optimizing a strategy I´m finally done and the result is as the first picture. All the variables in the backtest is set to “Fixed values” and I get the same result every time i run the test.
In the second picture I have replaced the variables in the CODE with the same fixed values as in the backtest. As you can see the result is much worse…
-This is not the first time this happens to me!
-I have done the same insertion of the fixed values in the code several times to make sure I haven´t made an error!
-Spread and everything else is the same.
-I have tried to get some answers in 2 other threads to see if this problem has to do with that
https://www.prorealcode.com/topic/unable-to-save-trading-strategies/
https://www.prorealcode.com/topic/problem-with-probacktest-records-disappear-during-optimization/page/2/Why is this happening???
11/25/2020 at 7:16 PM #151618The result you see in the backtest Table is WITHOUT tick by tick being applied to each individual trade.
The result you see on an equity curve and Detailed Report is WITH tick by tick being applied to each individual trade.
Apols for the brief answer … I am eating my tea! 🙂
EDIT / PS
Above may not be the answer to your Issue as I see 222 trades vs 254 trades.
1 user thanked author for this post.
11/25/2020 at 7:30 PM #15162011/25/2020 at 7:35 PM #151622I am eating my tea!
Tea is something you drink!
11/25/2020 at 7:52 PM #151625Why do you not show in the screen shots above … the period over which the backtest occurred??
I have tested over the same period, 200bars, in both Pictures.
Tea is something you eat when you are (hope it never happens) out of coffee!
11/25/2020 at 8:06 PM #151628Tea is something you drink!
You must have been brought up in an affluent environment?
11/25/2020 at 8:08 PM #151629The result you see in the backtest Table is WITHOUT tick by tick being applied to each individual trade.
The result you see on an equity curve and Detailed Report is WITH tick by tick being applied to each individual trade.
I guess this explains why for example in the table I can have a gain of 1480, but the Equity curve , with initial capital 10000, doesn´t show 11480!? I have seen the Equity curve value be both better and worse than the gain in the table.
However, it doesn´t answer my question in the top…
11/25/2020 at 8:14 PM #15163411/25/2020 at 8:17 PM #151635I have seen the Equity curve value be both better and worse than the gain in the table.
Me too!
Also the equity curve can show profit / loss for a current open trade.
The BT Results Table shows completed / closed trades only.
11/25/2020 at 8:28 PM #151637The result you see on an equity curve and Detailed Report is WITH tick by tick being applied to each individual trade.
In this case then I have shoved Pictures of Equity curves and detailed reports, so tick-by-tick is applied on both. Code and values are also the same!
The difference is that in the first Picture the fixed values have been collected from the optimizer, and in the second Picture they were written directly in the code.11/25/2020 at 8:40 PM #151642Yeah well if I do the same as you and get the same results then we can explore further.
If I do not get same as you then you have a way forward to explore.
If you do not post the code then we are guessing and you are getting more frustrated due to lack of a solution being offered?
If you do not want to post your code then just say and I will try and think of a few possible reasons?
For example … do you have two places in your code where you use the same variable but you are only entering the fixed value in one place only??
11/25/2020 at 8:44 PM #151643The difference is that in the first Picture the fixed values have been collected from the optimizer, and in the second Picture they were written directly in the code.
Surely you must be introducing the problem … in the first picture you show 222 trades and in the second picture you show 254 trades
11/25/2020 at 9:49 PM #151652do you have two places in your code where you use the same variable but you are only entering the fixed value in one place only??
No. I am certain that I have put in the right numbers in the right places and all the places. I take a copy of the “good” algo and put in the fixed values and get the “bad” result. I repeat the procedure and get the exact same “bad” result again and again… I have had the exact same problem Before on Another instrument. I´d rather not post the code and hope that there still can be a solution.
With that said I have once more gone through the same procedure and hoped for Another outcome, like fools do… …but I get the exact same “bad” result.
11/25/2020 at 10:50 PM #151664I get the exact same “bad” result.
Surely the difference is directly related to the difference in number of trades?
Seems you need to narrow down the field of investigation?
Have you tried to isolate if just shorts or just longs make up the difference or both shorts and longs?
Have you tried to Graph the triggers that results in a trade opening?
I guess you are hoping that somebody will say … ah I’ve had that and it’s due to xyz?? 🙂
11/25/2020 at 10:56 PM #151665You must have been brought up in an affluent environment?
Not really – just one where we ate breakfast, lunch and dinner and drank tea as a refreshing beverage. We never did brunch. We always felt sorry for those who had to have tea instead of a proper meal.
Sorry for being a bit off topic but tea is important to us Brits!
-
AuthorPosts
Find exclusive trading pro-tools on