bug-or-feature / pysystemtrade-fsb

Systematic spread betting in Python
https://pysystemtrade-fsb.bugorfeature.net/
GNU General Public License v3.0
10 stars 2 forks source link

temporary roll overrides? #37

Closed bug-or-feature closed 1 year ago

bug-or-feature commented 1 year ago

We need the ability to make ad-hoc changes to the roll sequence for FSBs. Occasionally, IG skip one contract for certain instruments. For example, right now (May 2023) the FSB reports shows

Possible unexpected IG roll schedule, or roll config
=======================================
           Problem FSB Rolls           
=======================================

                 Expected        Actual
Instrument                             
COTTON2_fsb  [H, K, N, V]  [H, K, N, Z]
SOYBEAN_fsb  [H, K, N, Q]  [H, K, N, X]

That means for COTTON2, IG are indicating that the next contract after July 2023 will be December instead of October. And that for SOYBEAN_fsb, after July they will have November instead of August.

I have seen this before, but previously I just changed the roll config, and rebuilt the data. Instead, I'd like to explore whether its possible to have a kind of roll override - more flexible. We could store information about the override in Mongo or config, and check it when building the roll schedule.

bug-or-feature commented 1 year ago

This also needs a check in the interactive roll tool - both the examples above should have been flagged at the point when we rolled from previous contract

bug-or-feature commented 1 year ago

Done