Is there an easy way to count actual trading days on a forward looking basis ?
So for example, S&P 500 e-mini trades 1700 to 1615, starting on Sunday night
I'd like to be able to easily make the following computations :
Mon 7 Jan 13 17:15 + 3 trading days = Thu 10 Jan 13 17:15 [i.e. 72 hours later]
Tue 9 Jan 13 17:15 + 3 trading days = Sun 13 Jan 13 17:15 [i.e. treat the Sunday open as if it were right after the Friday close]
Wed 9 Jan 13 12:00 + 3 trading days = Mon 14 Jan 13 12:00
Mon 30 Dec 12 12:00 + 3 trading days = Fri 4 Jan 13 12:00 [i.e. take into account the New Year's holiday]
I can't find such a functionality, and I don't want to have to make tables in Excel that have to get looked up. Doesn't NT already have the products calendars built in (with holidays?) and is there a way of accessing that to count trading days forwards ?
I started programming something, but then I get thrown off by trying to make something that adapts to those weekend rules correctly. I also would need to make a table of holidays for each relevant contract, which is a nightmare.
Alternatively, is there a way to get whether a forward date is within the trading horus of a contract ? I could always make a loop that counts days and checks whether it's in trading hours and then count again if needed. I can't find that either. I don't mind the performance hit on that, as this computation doesn't need to be performed frequently.
Thanks
Andrew
Comment