Not setting a spread on a backtest.

Forums ProRealTime English forum ProOrder support Not setting a spread on a backtest.

Viewing 11 posts - 1 through 11 (of 11 total)
  • #89482

    Hi,

     

    Sorry if this is a stupid question, but what would the difference be if I backtest a system with a 1 pip spread and 25 pip stop-loss vs. just setting a 26 pip stop-loss?

    Regards,

    #89488

    1/2 / half / 0.5  a pip? 🙂

    You could try it in less than 5 mins?

    Let us know?

    I’ll try it when I next have my Platform open. I just closed all 4 Platforms as everything was getting jumpy due to RAM Hogging!

    #89531

    Yep there’s a difference. 🙂 Have a look at these pics. And also the code:

    The first pic shows a backtest with 1 pip spread on the DAX. Stop loss 95, limit 85. The second pic shows the same system but with stop loss 96 and limit 84. I always get better results when I don’t define the spread. Any idea how there can be a difference between these two?

    #89539

    Spread = cost.

    You need to pay for every trade(in and out) that you make.
    If you code it “into the stop loss” then ur not seeing that cost on every trade that does not hit stop loss.

    lets say you take a trade and it hits target. if you have your “spread” coded into your stop loss then that trade would be free, when in fact in real life that trade would have cost u the spread for in and out.

    1 user thanked author for this post.
    #89552

    The second pic shows the same system but with stop loss 96 and limit 84.

    Are you saying you had no spread entered in the box in the above example?

    If yes to above , then isn’t above equivalent to a spread of 2 (whereas you had spread = 1 when Stop loss 95, limit 85).

    Coffee has not woken my brain yet my suggestion above may be wrong?

    #89559

    Spread = cost.

    You need to pay for every trade(in and out) that you make.

    If you code it “into the stop loss” then ur not seeing that cost on every trade that does not hit stop loss.

    lets say you take a trade and it hits target. if you have your “spread” coded into your stop loss then that trade would be free, when in fact in real life that trade would have cost u the spread for in and out.

    Okey, great answer. So I could basically go through each and every trade that doesn’t hit stop or limit to calculate how much the spread cost would be for those specific trades.

    #89561

    Easiest way if ur unable to add spread/cost into your backtest then you can basicly just take your amount of trades (correct me if im wrong here anyone) and mulitply them with the average spread, then multiply that with 2.

    100 trades * 1 pip (average spread) = 100 pips * 2 (1 for entry and 1 for exit) => 200 pips cost for doing 100 trades

    Note that for example IG have different average spread depending on the time of the day.

    Guessing this method is not the most accurate one because the spread does ultimately change your target and stop loss, depending on how youve coded ur system.

    if ur using PRT just put the spread in.

    #89562

    The second pic shows the same system but with stop loss 96 and limit 84.

    Are you saying you had no spread entered in the box in the above example?

    If yes to above , then isn’t above equivalent to a spread of 2 (whereas you had spread = 1 when Stop loss 95, limit 85).

    Coffee has not woken my brain yet my suggestion above may be wrong?

    Hmm, but both system would stop out at the same level if I run the backtests like this right? The one that has 86 pip stop loss would stop out on the same price as with 85 pip stop loss with spread included.

    #89573

    You need to pay for entry as well as exit. if your stopping urself out 1 pip less, or taking a profit target 1 pip less, then thats just 1 pip. You would need 2. But this is affecting your backtest because your now moving your stop loss and target to try to calculate the spread, when you could actually just add the spread into backtest.. Also if you have trades that do not hit stop or target (but exit via an actual exit or trailing stop loss) then ur calculations are off again.

     

    just add the spread and accept the hardship hehe

     

    Example: lets say your “range” is profit target – stop loss = 50 pips. if you now start to remove pips to calculate for the spread ur new range would be 46, that might be a very big change in your system depending on ur pip pr trade on avg. (because ur removing 2 pips from the target, but also from your stop loss, leaving u with a much smaller range than your system normally would have if you just add the spread in the backtest.

    #89575

    100 trades * 1 pip (average spread) = 100 pips * 2 (1 for entry and 1 for exit) => 200 pips cost for doing 100 trades

    Unless my coffee STILL hasn’t worked through 🙂 if the spread = 1 then that is all you pay re spread costs?

    Ask – Bid = 1 so you buy at the Ask and sell at the Bid, cost 1 pip?

    #89633

    All in all I think it’s best not to mess around with the spread considering there will be a lot of trades closed without hitting stops or limits.
    Thank you guys for the answers. 🙂

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

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