Back Testing Not Respecting Spreads

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #165021 quote
    charleskyriakou
    Participant
    Junior

    I have a back testing strategy for the Tesla (TSLA) market which returns the same gain results whether or not I specify a spread. E.g if I specify a spread of zero I get the same results as when I have a spread of 100. By the way, I have tick mode on. This hasn’t happened when I have put together strategies for Wall Street, where the specified spread is respected. Have anyone else found a similar situation or know why this could be?

    #165063 quote
    GraHal
    Participant
    Master

    I specify a spread of zero I get the same results as when I have a spread of 100.

    Specify meaning entered in the backtest engine settings (not hard coded in)?

    charleskyriakou thanked this post
    #165098 quote
    charleskyriakou
    Participant
    Junior

    I mean that I click on the Spread check and enter the number of points. Not in the code. Please see attachment. Thanks for taking an interest GraHa. Much appreciated!

    GraHal thanked this post
    2021-03-23_20-13-22.png 2021-03-23_20-13-22.png
    #165116 quote
    GraHal
    Participant
    Master

    Attached image 1 is with spread = 0, image 2 is with spread = 100

    There is a difference of 9827 – 9175 over 669 trades.

    It would appear there is some inbuilt limit on spread as a % of price or some absolute limit on spread value?

    Why would you use / enter a spread of 100 anyway?

    Why not use what the spread actually is … 0.41 currently??

    charleskyriakou thanked this post
    Tesla.jpg Tesla.jpg Tesla-2.jpg Tesla-2.jpg
    #165153 quote
    charleskyriakou
    Participant
    Junior

    Interesting result. Thanks for that. Correct me if I’m wrong but (9827 – 9175)/ 669 trades means an implied spread limit in the system of 0.974. I used a spread of 100 just to see whether there would be a difference in the resulting gain. However, as you’ll know, Tesla has a very volatile spread which seems to vary between 40 and even over 100 depending on when one trades so in a back testing strategy I like to use more of an average spread rather than what the spread is at the time. For Wall Street I specify a spread of 3.2 which is excessive but introduces a margin of safety, and find that the back testing and actual results in my IG demo/live accounts against live data are pretty much in line as a result.

    #165170 quote
    GraHal
    Participant
    Master

    implied spread limit in the system of 0.974

    The difference between above and 1 is maybe due to slippage?

    I agree with all of the rest of your comment and I do the same re use worst case spread etc.

    I tests I posted above were from on my CDF Platform … hence the spread I quoted of 0.41.

    You must be testing on your SB Platform when you say spread 40 and even over 100?  True price (currently $669) is multiplied by 100 to give point size = $1 on IG SB Platform (current Tesla price is $66,900).

    I just bought 1 Tesla share on IG SB and straight off I am $87 down due to spread! 🙂

    charleskyriakou thanked this post
    #165171 quote
    GraHal
    Participant
    Master

    The difference between above and 1 is maybe due to slippage?

    I deviated in previous post … so spread of 1 on CFD would be same as 100 on IG SB Platform.

    I’ll do another test later and let you know!

    charleskyriakou thanked this post
    #165172 quote
    GraHal
    Participant
    Master

    Attached image 1 is Tesla on SB with spread = 0

    Image 2 is Tesla on SB with spread = 100

    Oh for no spread, we all be billionaires! 🙂

    So spread of 100 is taken into account, There were 2,545 trades with spread = 100 … you do the maths from values on rhs of equity curve.

    SBTesla-2.jpg SBTesla-2.jpg SBTesla.jpg SBTesla.jpg
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.

Back Testing Not Respecting Spreads


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by GraHal
4 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/23/2021
Status: Active
Attachments: 5 files
Logo Logo
Loading...