Skipping over holidays

I’m trying to skip over market holidays when adding days using timedelta…I’ve got a way of generating a list of market holidays, but I’m not sure how to effectively skip over those days. Any ideas?

Thanks,

Jimmy

We use a different approach. We use “https://api.alpaca.markets/v2/calendar” endpoint that returns all trading days (the list can be larger and smaller by manipulating start/end params). We then check if a date-in-question is in the list. If not, then it’s a holiday or a weekend.

1 Like