Known differences between PRT LIVE and PRT DEMO

Forums ProRealTime English forum ProOrder support Known differences between PRT LIVE and PRT DEMO

This topic contains 35 replies, has 7 voices, and was last updated by avatar VN 2 months, 1 week ago.

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 15 posts - 1 through 15 (of 36 total)
  • #123348
    VN

    Hi all,

    there are quite a number of people raising queries on discrepancies they are seeing in backtesting results between a strategy being backtested under the demo prt platform and the same strategy backtested on the live prt platform for the same time period.

    From what I have gathered there seems to be a number of reasons:

    1) difference between the bid/offer spread between the two platforms. demo runs on a fixed spread but live uses the spread as it is published by the broker which can fluctuate throughout the day

    2) I use a multi time frame function in my strategy and apparently there is a difference in the MTF engine between Live and Demo which can produce different results

    I would be very grateful if someone experienced enough on this topic can summarise clearly what the main differences are so that people know what to expect when they switch between the two environments.

    #123350
    1. Spread
    2. Slippage
    3. Orders rejections due to one of the above reason, but also because of the allowed distance from current price to put pending orders (known as “minimal distance”)
    4. Different trading hours (ProOrder code launched in a different time zone / custom hours, by the user)
    5. Coding problem: division by zero error, null or negative periods for indicators, ..
    6. Lack of responsiveness of IG demo servers (if IG is the broker), although this has improved considerably since last year.
    7. Make backtests without tick-by-tick option
    #123352

    2) I use a multi time frame function in my strategy and apparently there is a difference in the MTF engine between Live and Demo which can produce different results

    No. There was indeed a time period where the new engine with MTF was available in demo server while it was not in real trading server. They were 2 different engine which was evaluating the code very differently and therefore with discrepancy between the results. But it is a thing of the past since a long time ago now.

    #123365

    Spread Slippage

    The OP was asking about Backtesting difference between Demo and Live … we enter our own spread = ?? in the backtesting engine of both Demo and Live and there is no slippage during backtesting on either Demo or Live Platforms.

    Is your answer referring to differences between Demo and Live during Forward Testing?

    Or has my coffee not woke my brain up yet?? 🙂

     

     

    #123366

    Ok, so that’s my coffee not enough strong!

    There is no difference between live and demo accounts in backtests, as long as you are using the same settings on the same instrument and on the same timeframe and with the same broker!

    1 user thanked author for this post.
    #123374
    VN

    Thanks both for your attention!

    Nicolas, for clarity sake (as there were a few responses on this) but based on your last respose I will take that as final i.e there should be NO difference in the backtest results between backtest ran in DEMO and backtest ran in LIVE if I am using the same broker (IG) running exactly the same code under same time frame and same backtest settings (tick by tick, spread etc) over the same time period the results should be the same. Is my understanding correct?

    #123390

    If you want to alert Nicolas so he can answer then you need to put @nicolas and then he will get an email.

    If you do a Test to prove the answer … be sure to tell us the results please?

    #123395

    … and as long as the platform version is the same.

    #123397
    VN

    ok thanks Nicolas for confirming!

    @nicolas, what would be your expectation if I set up a comparison run between a backtest strategy in DEMO but only looking at the results from the point the backtest is kicked off onwards (not past history) vs the same strategy code being put through the PRT AutoTrading functionality (still done out of the demo environment) and comparing the results between two methods in real time?

    So as i write this at 12:00pm UK time, if i kick off a backtest in Demo and simultaniously kick off the same strategy using the AutoTrading functionality from the same Demo platform and i look at the results from 12:00pm onwards as they come in ( I am only concerned on how the strategy perfoms in real time from 12:00pm ) what do you expect the two results to look like given they are running the same strategy code?

    #123406

    In that case, refer to my first post to know why some differences might occur between a backtest ( a computer calculation of a price difference ) with a real time trading affected by real life environnement.

    #123437

    There is another difference I found recently, at least for PRT-IG-Spain:

    There are differences in the minimun positon allowed for some actives, as in DAX (0.5 vs 1). I think is because when the minimun position was updated for some actives they did it in Live but not in Demo. In most of my systems that difference didn´t change nothing or very little, but in one of them in wich the order size could change a lot that different was big and made me crazy until I foud the reason.

    Related to this I think is good to know that when the position of any order is lower that the minimun required the sytem also behave different in backtest vs Live. In Backtest the order is executed with the minimun size but in Live the order is not executed and the system gives error and stop. This can also can create differences between Backtest and Live

    2 users thanked author for this post.
    #123447

    So as i write this at 12:00pm UK time, if i kick off a backtest in Demo and simultaniously kick off the same strategy using the AutoTrading functionality from the same Demo platform and i look at the results from 12:00pm onwards as they come in ( I am only concerned on how the strategy perfoms in real time from 12:00pm )

    Going Forward using the Backtest Window / Tool is subject to whatever fixed spread you enter into the Backtest settings and no slippage etc (as Nicolas elaborated on).

    If you enter same spread as is showing on your Platform (7.6 currently on DJI – see attached) then the results between Demo Backtest and Demo AutoTrade will be closer, but still subject to differences of slippage on the Auto-Trade window but not on Backtest.

    I know it sounds crazy that results on Demo Backtest and Demo AutoTrade are not the same, but very unfortunately … we have to make do with what we have?

    Attachments:
    #123470
    VN

    Merci Nicolas…

    @nicolas, my strategy evaluates a number of indicators across across 2 different timeframes. The strategy runs at 1 min candle (default setting), but some of the indicators are evaluated on 5min intervals using the MTF functionality (e.g. MACD, exp average etc). I have noticed on a few occasions that when running the backtest in demo environment and comparing its performance in real time to the same strategy being ran using the AutoTrading functionality there are differences in the timing of my entry orders. The entry condition as an example looks at where the indicators closed at end of each candle and then if the entry criteria is met trades will be executed at market price using the “SELLSHORT / BUY X CONTRACTS AT MARKET” command. I have mirrored the spread on the backtest to match IG, and 90% of the time entry time is the same between the backtest and the autotrade, but on other occasions I have noticed the PRT AutoTrade has not entered into a trade where as the backtest has and done so correctly. I can see through the graph function that the backtest entry confition is correct and a trade entry was right, but I cannot work out why the AutoTrade has not replicated it in live environment.

    I have checked with IG and there have be no rejections of trades from their end (assuming market moved drastically in the moment the order was sent), but even if that was the case IG would fill the order on the next availble price. In the cases i am seeing however there appears to be no order sent to IG via the AutoTrade whatsoever makinng me think the entry conditions (based on indicator closes) were not met. I cannot understand how that can be.

    Do you have any thoughts on what could be the reason for this?

    #123471

    In that specific case, of an order X not sent the day Y at time Z with the strategy W… I don’t know! In fact, only a deep investigation by an IT guy with the server logs would help.

    #123481
    VN

    thanks Grahal, yes I agree with you, if the fixed spread is entered to match IG results are as good as. Im just concerned about the instances where there appears to be incorrectly missing trade entries compared to the backtest as was in the example i illustrated to Nicolas. Debugging it shows the trade should have been put on, but it wasn’t.

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

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