gerrymanoim / exchange_calendars

Calendars for various securities exchanges.
Apache License 2.0
425 stars 133 forks source link

XASX closing auction print #248

Open j7zAhU opened 1 year ago

j7zAhU commented 1 year ago

Normal trading ceases at 1600 for the ASX, after which there is a dutch auction at 1610 for the final day-close print. Would it be possible to account for this somehow. Perhaps a 'match' session?

Cheers

maread99 commented 1 year ago

Hi @j7zAhU.

exchange_calendars has historically only been concerned with regular trading times. Although, that's not to say that it couldn't incorporate additional timings. I suspect we'd be open to a PR suggesting a framework to register / provide such information (@gerrymanoim - ?).

I believe pandas_market_calendars now provides for something along these lines - perhaps start by having a look at how it's been implemented there?

Cheers

ValueRaider commented 1 year ago

I've implemented a solution to this, but in another code so cannot comment on feasibility of modifying trading_index(). But happy to discuss the framework.

I add an "auction" datetime column to calendar, that's only change to schedule. Most work is in creating the trading intervals:

Merging should only happen with large periods e.g. 1h. With small periods e.g. 5m there should be a gap between close and auction.

j7zAhU commented 1 year ago

The final print happens at a random time within that minute