Core
Shared errors, conventions, validation, dates, formatting, OCC symbols and artifacts.
Types and utilities every domain shares: the typed error hierarchy, conventions and defaults that are always echoed, validation helpers, date handling without the machine clock, formatting and OCC option symbols.
Common APIs
class
QuantErrorBase class for every TotalFinance error.classInputErrorInvalid or nonsensical input (programmer error or malformed payload).fnisQuantErrorType guard: is this value a QuantError (and optionally a specific code)?fnparseOccSymbolParse an OCC option symbol into its components.fnformatOccSymbolFormat option components into a compact OCC option symbol.fndiscountFactorDiscount factor for `rate` over `years` under any {@link InterestCompounding} form.fnresolveAsOfResolve a DATE-GRANULAR `asOf` to epoch ms — ledgers, calendars, fundamentals, performance and research windows, where "as of 2026-07-06" means the calendar date.fnresolvedExpiryResolve an expiry label to the REQUIRED contract fields (E2): the spreadable `{ expiresAt, expiryConvention }` pair for constructing an `OptionContract` from a label — the same resolution the option builders stamp.fnformatMoneyFormat a number as currency using the platform `Intl` (browser-safe).Guides
Complete API reference
Browse all public exports, types, and feature imports below.