What Spread to use for BackTesting

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #168354 quote
    deletedaccount051022
    Participant
    New

    Hi,

    I was wondering what spread methodology people are using in their backtesting so wanted to create this post to hopefully gather peoples feedback and ideas.

    For testing purposes I’ve been trying different approaches in my never ending attempt to reduce the minor differences between testing and production.  One idea I’d considered was a weighted spread approach based on data from the broker (IG) where I trade CFD GBP Contracts , but fear this might be too low where a strategy is not constrained by start and end times.  So am looking for inspiration please.

     

    Thank you very much.

    IG-CFD-GBP-Contracts-Spreads.png IG-CFD-GBP-Contracts-Spreads.png
    #168359 quote
    GraHal
    Participant
    Master

    I use worst case scenario, so for example, on DJI worst case is 4.8 (apart from market closed and flash crashes) so I always use spread = 5 for DJI.

    Which are you concerned about …

    1. Trades not being executed on backtest due to your use of  incorrect spread?
    2. Profits being overstated due to your use of too low a spread on backtest?

    My view on 2. above is … if your strategy is resulting in such a low overall profit that spread value is a big factor in low profit, then you should rework the strategy to get higher profit overall.

    thanked this post
    #168371 quote
    Vonasi
    Moderator
    Master

    I’d suggest testing on best case scenario and worst case scenario too and a few spreads in between. This way you get to see the best possible result (knowing that you will never ever achieve this) as well as what sort of spread might break your strategy.

    If it takes a very big spread to break your strategy then the actual spread becomes rather insignificant and you can then concentrate on robustness testing to ensure that you haven’t just got a curve fit strategy.

    thanked this post
    #168396 quote
    deletedaccount051022
    Participant
    New

    Thank you GraHal for sharing what you use, I like that idea.

    In response to your question, I am looking to align that actual profits I make as closely as possible to the results in baktesting.  I run various strategies live, and each week I compare the actual results to those shown on the backtest within PRT, and there are occasional differences in profit/loss for each of the strategies.  The backtesting is always slight higher, no more than 5-10%.

    Kovit thanked this post
    #168398 quote
    deletedaccount051022
    Participant
    New

    Thank you Vonasi for sharing your ideas.  I like the worst case approach and will consider adopting this in future testing as part of the suite of tests.

    I am currently running this strategy which I shared previously on a live account and there are minor differences of around 5-7 points on one trade out of every 5 on average.  This tells me I am not allowing for enough of a spread.

    Improving Strategy’s Trailing Stop Loss

    #168508 quote
    Vivien
    Participant
    Average

    Hi @samsampop,

    I define a spread as two times greater than the habitual spread while the optimization of my trading strategy. After that, I process the spread increase test to see how my trading strategy reacts. If the strategy becomes losing too rapidly after a little spread increase, I consider it is over-fitted. If the strategy is insensitive to the spread increase, I consider it is too under-fitted.

    https://artificall.com/prorealtime/validate-a-trading-strategy-thanks-to-stress-tests/#Simulation-of-spread-increasing-on-Probacktest

     

    Be careful if you set a too different spread than the real spread because the defined spread will impact the stop loss and target exécution. That may produce misleading results of your backtest and distort the behavior while the real execution of your strategy.

     

    Regards

    GraHal and thanked this post
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

What Spread to use for BackTesting


ProOrder: Automated Strategies & Backtesting

New Reply
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by Vivien
4 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/29/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...