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.

In this family#

  1. Maximum-Executable-Volume Auction contract

    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 contract

    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 contract

    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 contract

    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 contract

    Determines the reopening price after a volatility halt, including whether the auction may conclude at all or must be extended. An auction that reopens outside the band simply extends rather than printing.

    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.