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

Handle / warn about IG auto rolls around weekends #50

Open bug-or-feature opened 10 months ago

bug-or-feature commented 10 months ago

On 2023-10-27 (Friday) I had a position in BRENT_W_fsb, and the expiry was 2023-10-30 18:30:00 (Monday). I set the roll state to Force Outright. IG auto rolled the position Friday evening; although normally auto-rolling happens 24 hours before expiry, in this case, that would have been on a Sunday when markets were closed. It seems they brought it forward to Friday evening.

On Monday as soon as the stack handler started it locked the instrument. We should handle this better