exchange_calendars icon indicating copy to clipboard operation
exchange_calendars copied to clipboard

XASX closing auction print

Open j7zAhU opened this issue 2 years ago • 3 comments

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

j7zAhU avatar Oct 13 '22 12:10 j7zAhU

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

maread99 avatar Oct 23 '22 16:10 maread99

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:

  • assume auction consumes 1 minute. Nothing official on end time to confirm this, maybe it's 1 second
  • map auction time to a trading interval as if it was during the session, then adjust the 'auction interval' close to match auction end time. If 'auction interval' overlaps the actual last session interval, merge them.

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.

ValueRaider avatar Oct 23 '22 16:10 ValueRaider

The final print happens at a random time within that minute

j7zAhU avatar Oct 23 '22 21:10 j7zAhU