Time Series Shifting Tip

Answered

Comments

1 comment

  • Official comment
    Avatar
    Jason

    This is a known issue (not necessarily a bug) that has a simple work-around. In test models I have used to explore this issue, I'm able to resolve the problem by simply including an extra day at the beginning (i.e. 31/12/1955, in your case) or an extra day at the end (i.e. 1/1/2012). Then, the wrapping should pick up in the first year of your Time Series.

    This has to do with the way that GoldSim finds the first year (with the needed date i.e. month and day) in the Time Series. If the data ends on the 31st day of December, it doesn't simply look for the first January 1 in the Time Series. To our minds, this seems like the logical way, but because of the way dates and Time Series are represented under the hood, GoldSim can't do it this way. Instead (if I remember correctly), it steps back in time in intervals of 365.25 days (since this is an average year) until this results in a date that's earlier than the first date in the Time Series. Then, it "rewinds" or steps forward by a full 365.25 day interval to the date that it hit just before it went past the earliest date in the Time Series.

    Depending on where leap years fall in the data, you may end up with a situation where the 365.25 interval it's using to step back in time just barely goes beyond the beginning of the Time Series. In this case, it has to "rewind" (i.e. step back forward) to essentially a year (365.25 days) into the Time Series and start from there. I believe this is what is happening in your case.

    Below, you can see three examples, the first is a Time Series that goes from 1 Jan 2020 through 31 Dec 2025. The second has an extra day at the beginning (i.e. 31 Dec 2019) and the third has an extra day at the end (i.e. 1 Jan 2026). Notice that you get correct wrapping (to the first year in the series) in the second and third examples. If you think about it, the first series is technically 1 day short of a full 6 years. Imagine that the date entry in each row of the Time Series represents the midnight at the start of that day. That would mean that the last entry (31 Dec 2025) is midnight at the start of the 31st day of December. Technically, you would need just one more entry (1 Jan 2026) to represent the end of the 31st day of December.

     

    For more information about this issue and how to work around it, please read this article: https://support.goldsim.com/hc/en-us/articles/360038937413-Time-Series-Wrapping-Behavior

    Comment actions Permalink

Please sign in to leave a comment.