fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Auctions

5 algorithms in Matching Engines and Venue Logic · 5 with asserted arithmetic.

In this family#

  1. Maximum-Executable-Volume Auction verified

    Finds the price that crosses the most volume — the first and most important auction criterion. Ties are common, which is why the tie-break rules exist as their own topics. Prices and quantities are integer **atoms** — the venue's minimum increment — not floating-point currency. Matching arithmetic that rounds is matching arithmetic that disagrees with the exchange.

    maximumExecutableVolumeAuction(ordersRaw, referenceRaw, tickRaw)
  2. Minimum-Imbalance Tie-Break verified

    Applies the second auction criterion: among prices crossing equal volume, choose the one leaving the least unfilled imbalance.

    minimumImbalanceTieBreak(ordersRaw, referenceRaw, tickRaw)
  3. Opening-Cross Price verified

    Runs the full opening auction: maximum volume, minimum imbalance, then reference-price proximity, bounded by the permitted price range.

    openingCrossPrice(orders, previousClose, tick, low, high)
  4. Closing-Cross Price verified

    The closing auction, which sets the price index funds actually trade at. Same criteria as the open, different reference and typically a tighter permitted band.

    closingCrossPrice(orders, reference, tick, low, high)
  5. Volatility-Auction Reopening verified

    Decides, from an already-determined corridor state, whether continuous trading carries on, the auction has no executable quantity, the indicative price may reopen the book, or the auction must be extended. The dynamic and static corridors are both built from a reference and a band percentage, and the reopening test uses each corridor widened by the extension multiplier. The algorithm does not build a book or discover a price; the indicative price and executable quantity are supplied.

    volatilityAuctionReopening(inputs)

What they share#

Every topic here is a record-transform, so once you have called one the rest follow the same shape. Import paths differ only in the final segment:

ts
import { maximumExecutableVolumeAuction } from "fintech-algorithms/matching-engines-and-venue-logic/auctions/maximum-executable-volume-auction";
import { minimumImbalanceTieBreak } from "fintech-algorithms/matching-engines-and-venue-logic/auctions/minimum-imbalance-tie-break";

Read them in the order above — the sequence is pedagogical, not alphabetical.

Where this sits#

Matching Engines and Venue Logic collects 21 algorithms across 4 families. For the concept behind this family rather than the call signatures, see the concept guides.