Discrepancy between Backtest and RealTrading

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #119399 quote
    TempusFugit
    Participant
    Veteran

    Hi,

    I am trying to create some MoneyManagement alternatives for my systems and working on that I think I discovered a discrepancy between backtest results and RealTrading operations, at least for automated trading with IG. That is:

    • In BACKTEST when the size of any order given by the automated system is less than the minimum required for that active in IG (p.e. In FX is 1, in DAX is 0,5….) the order is NOT EXECUTED
    • On the contrary in REAL TRADING when the above happen the order is EXECUTED with the minimum size required.

    That discrepancy can make quite a lot of difference in the results of the ideas I´ve been trying.

    With this post I want to:

    1. Check with you if I am right with this because it wouldn´t be the first time I am wrong with this kind of things
    2. Warn everybody about this, because at least for me with this MM ideas is quite a important thing to consider
    3. Ask if is possible to fix this discrepancy

    Thanks

    #119402 quote
    Vonasi
    Moderator
    Master

    You should always have in any code that varies position size something that stops any orders below minimum size from being placed. This can be by either turning the size to zero if it is below minimum size or by changing the size to match minimum size if it is below it.

    minsize  0.2
    minsizetype = 1 //1 = match to minsize  2 = no trade if under minsize
    
    //your money management code here
    
    //match to minimum size
    if minsizetype = 1 then
    positionsize = max(positionsize, minsize)
    endif
    
    //no trade if under minimum size
    if minsizetype = 2 then
    if positionsize < minsize then
    positionsize = 0
    endif
    endif
    
    TempusFugit thanked this post
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Discrepancy between Backtest and RealTrading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Vonasi
6 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/12/2020
Status: Active
Attachments: No files
Logo Logo
Loading...