Backtest results changes with same values

Forums ProRealTime English forum ProRealTime platform support Backtest results changes with same values

Viewing 15 posts - 1 through 15 (of 23 total)
  • #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???

    #151618

    The 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.
    #151620

    Why do you not show in the screen shots above … the period over which the backtest occurred??

    #151622

    I am eating my tea!

    Tea is something you drink!

    #151625

    Why 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!

    #151628

    Tea is something you drink!

    You must have been brought up in an affluent environment?

    #151629

    The 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…

     

    #151634

    Oboe if you post your Algo code on here then I would backtest on my platform to see if I get same results as you.

    Otherwise we are guessing as to why you get disparity in your results?

     

    #151635

    I 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.

    #151637

    The 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.

    #151642

    Yeah 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??

    #151643

    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.

    Surely you must be introducing the problem … in the first picture you show 222 trades and in the second picture you show 254 trades

    #151652

    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??

    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.

     

    #151664

    I 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?? 🙂

    #151665

    You 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!

Viewing 15 posts - 1 through 15 (of 23 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login