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

Statistical Computing and Reproducibility

10 algorithms in Financial Mathematics, Statistics, and Data Foundations · 10 with asserted arithmetic.

In this family#

  1. Floating-Point Representation, Overflow, and Underflow verified

    Inspects one double-precision number: whether it is finite, how large one representable step at its magnitude is, and whether squaring it would stay inside a stated magnitude ceiling.

    floatingPointRepresentationOverflowAndUnderflow(input)
  2. Stable Summation and Mean Calculation verified

    Adds a list twice, once straight left to right and once carrying a running compensation term, so the two totals can be put side by side.

    stableSummationAndMeanCalculation(input)
  3. Stable Online Variance and Welford's Algorithm verified

    Runs Welford's single-pass update to produce the mean and sample variance without ever accumulating a sum of raw squares.

    stableOnlineVarianceAndWelfordsAlgorithm(input)
  4. Batch, Rolling, and Streaming Statistic Equivalence verified

    Computes the same fixed-window mean two ways, by re-averaging each window slice and by a running add-and-drop sum, then checks that they agree.

    batchRollingAndStreamingStatisticEquivalence(input)
  5. Missing, Infinite, Invalid, and Unsupported-State Policies verified

    Screens a mixed raw list down to the entries that are genuinely finite numbers and reports how many were turned away.

    missingInfiniteInvalidAndUnsupportedStatePolicies(input)
  6. Pseudorandom Numbers, Seeds, and Reproducibility verified

    Draws a run of unit-interval numbers from a seeded linear congruential generator, so the same seed always replays the same stream.

    pseudorandomNumbersSeedsAndReproducibility(input)
  7. Vectorization, Index Alignment, and Shape Safety verified

    Inner-joins two labelled vectors on their index field and reports what each side lost in the process.

    vectorizationIndexAlignmentAndShapeSafety(input)
  8. Leakage-Free Fitting, Scaling, and Preprocessing verified

    Fits a standardizing centre and scale on the training split alone, then applies that one transform to both splits.

    leakageFreeFittingScalingAndPreprocessing(input)
  9. Fixtures, Numerical Tolerances, and Property Tests verified

    Compares an actual vector against an expected one under an absolute tolerance, the way a fixture check does.

    fixturesNumericalTolerancesAndPropertyTests(input)
  10. Reproducible Analysis, Metadata, and Audit Trails verified

    Serializes a run's inputs, method, version and seed into a deterministic JSON string and fingerprints it with a 32-bit FNV-1a hash.

    reproducibleAnalysisMetadataAndAuditTrails(input)

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 { floatingPointRepresentationOverflowAndUnderflow } from "fintech-algorithms/foundations/statistical-computing-and-reproducibility/floating-point-representation-overflow-and-underflow";
import { stableSummationAndMeanCalculation } from "fintech-algorithms/foundations/statistical-computing-and-reproducibility/stable-summation-and-mean-calculation";

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

Where this sits#

Financial Mathematics, Statistics, and Data Foundations collects 120 algorithms across 12 families. For the concept behind this family rather than the call signatures, see the concept guides.