Backtesting over GMT/BST periods…?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #208705 quote
    Monobrow
    Participant
    Senior

    So someone just asked me this and i’ve never considered this before.. when you backtest, and the period goes over gmt/bst/any time change period, what happens to the backtest? Does it know to automatically shift +1/-1 or should we stop the back tests at winter/summer breakpoints and run them again with different time settings?

    yours confused!

    thanks

    #208720 quote
    PeterSt
    Participant
    Master
    DLS = 0   // 30-10-2022,PS. 0 = Normal. 1 = Autumn. 2 = Spring.
    
    // 05-11-2022,PS, Build in data range limit, so backtesting works after all (but mind the 1M bars where this is NOT made for).
    
    If Date >= 20221031 and Date <= 20221104 then
      DLS = 1   // Autumn. USA is one hour early. 
    endif  
    

    (spring not shown)

    Adjust this (for) each year and mind the backtests which span more than one year (see the 1M remark).

    Act upon DLS how and where you want …

    Monobrow thanked this post
    #208721 quote
    robertogozzi
    Moderator
    Master

    Charts are not affected by any time change, i.e. the 9am hourly candle will always be there tagged 09:00.

    The same for markets, their opening and closing will be shifted, as well.

    It’s the code that will have to account for such time changes, such as DST, if they operate on markets which are non subject to change simultaneously. So when EU will enter DST the last Sunday of March, some countries (and markets thereof) may have already done it before, some may adopt it later and some will never make any change at all. If your code may be affected by those changes, then you will have to take it into account changing the code at the beginning of each year, when dates are already scheduled for changes.

    Monobrow thanked this post
    #208722 quote
    robertogozzi
    Moderator
    Master

    Something like PeterSt showed while I was posting.

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

Backtesting over GMT/BST periods…?


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Monobrow @monobrow Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by robertogozzi
3 years ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/29/2023
Status: Active
Attachments: No files
Logo Logo
Loading...