BackTesting ends with Strategy stopped

Forums ProRealTime English forum ProRealTime platform support BackTesting ends with Strategy stopped

Viewing 8 posts - 1 through 8 (of 8 total)
  • #159018

    BackTesting always ends with the actively running Strategy being stopped (if one runs, obviously). This implies unrealistic loss or profit; they should stay open-ended.
    See the attachments for the importance.

    So, this is a clearly winning strategy (over this period) but because the BackTest ends where it ends, the trade is exited and registered as a loss (this latter is obvious).
    Implication : I must always try to take into account whether a last trade was aborted – be that in a winning or in a losing mood. Or be it in neutral mood which always has to be examined explicitly.

    How can we ever Optimize with this in mind ?

     

    PS: For my own reference, this is issue #003.

    #159324

    Although I understand what you mean, I think the reverse is also a problem. How to optimize or backtest a strategy knowing that the last open trade (in gain or loss) could represent for example 10% of its gains and losses, this would imply in the same way a real problem of understanding for most people who make backtests. On all other platforms, unless I am mistaken, we have exactly the same behavior, the last open trade is inexorably counted as a closed trade when the backtest stops at the desired date.

    #159356

    Yes, and now I understand fully what you mean. Still, with a fine strategy, you are in it (have open position) because you did not want to sell. That is for a reason, obviously. My strategies always end with a pending loss – else the order would not run any more. 🙂
    Of course this is special because my orders won’t run long. Still for me it is so in close to 100% of cases (think of only seconds not OnMarket). Otherwise, PRT, please give us an option ?
    CloseAtStrategyEnd = 1
    or
    NotCloseAtStrategyEnd = 1

    #159373

    BackTesting always ends with the actively running Strategy being stopped

    I must be misunderstanding … see attached, the position is not stopped at the end??

     

    #159378

    Because yours runs in real time. It is still adding …
    So give it an end time of 11:30 (your time) or earlier.

    Or maybe you found a way after all ? 😉 … it may even depend on whether markets are closed ? (supposed you end at “Real-Time”, then within the past weekend this showed up as the 24th 23:00, no matter it was Sat 09:00 etc. And that sure exited.)

    #159379

    Here … Out is is. Or in it stays (2nd set of attachments).


     

    #159388

    So give it an end time of 11:30

    But if I gave my backtest and end time of 11:30 (am) and I am looking at the chart at 14:30 then if it had not stopped (at 11:30) there then WOULD BE a problem??

     

    #159394

    Look at this one again, from the first post (attached). I stopped nothing there. But the system won’t go beyond Jan 24 (see time line). It fills in the calendar control for me, and I can’t set it to real time because there is no real time on Sat/Sun (for this Fx instrument). Thus, when I would BackTest now (Monday noon) it would be fine because the backtest will end in RealTime – unless I set an end data myself.

    But hey, I *do* set the end date/time regularly for more robust backtesting. And then we have the WalkForward which also will imply Ends (I did not test that, but it seems logical that it behaves consistent, regarding this).

     

     

Viewing 8 posts - 1 through 8 (of 8 total)

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