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

Location, Ranking, and Exploratory Summaries

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

In this family#

  1. Count, Sum, Minimum, Maximum, and Range verified

    Reduces one numeric series to the five headline aggregates: how many observations there are, their total, the smallest and largest value, and the distance between those extremes.

    countSumMinimumMaximumAndRange(input)
  2. Arithmetic Mean verified

    Divides the sum of a numeric series by the number of observations and reports both the mean and the count it was divided by.

    arithmeticMean(input)
  3. Weighted Mean verified

    Computes a weighted average of values using the parallel weights series, dividing the sum of value-times-weight products by the total weight.

    weightedMean(input)
  4. Median and Mode verified

    Reports the middle of a numeric series and its most frequent values, tallying exact equality so a tie produces several modes rather than one arbitrary winner.

    medianAndMode(input)
  5. Trimmed and Winsorized Means verified

    Cuts the same number of observations off each tail of the sorted series and averages what is left, then averages again with those tails replaced by the surviving boundary values instead of discarded.

    trimmedAndWinsorizedMeans(input)
  6. Percentiles, Quantiles, and Quartiles verified

    Returns the three quartiles of a numeric series and the interquartile range between the first and third, using linear interpolation between neighbouring order statistics.

    percentilesQuantilesAndQuartiles(input)
  7. Ranks, Ties, and Percentile Rank verified

    Assigns each observation its position in the sorted series, giving tied observations the average of the positions they span, and rescales those ranks onto a 0-to-100 percentile scale.

    ranksTiesAndPercentileRank(input)
  8. Frequency Tables and Relative Frequency verified

    Counts how often each distinct value occurs in a numeric series and expresses those counts as shares of the total.

    frequencyTablesAndRelativeFrequency(input)
  9. Histograms and Empirical Distribution Functions verified

    Splits the observed span into equal-width bins and counts the observations in each, alongside the empirical distribution function evaluated at every sorted observation.

    histogramsAndEmpiricalDistributionFunctions(input)
  10. Five-Number Summary and Box Plot verified

    Produces the minimum, three quartiles, and maximum of a numeric series, the Tukey 1.5-IQR fences drawn from them, and the observations lying outside those fences.

    fiveNumberSummaryAndBoxPlot(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 { countSumMinimumMaximumAndRange } from "fintech-algorithms/foundations/location-ranking-and-exploratory-summaries/count-sum-minimum-maximum-and-range";
import { arithmeticMean } from "fintech-algorithms/foundations/location-ranking-and-exploratory-summaries/arithmetic-mean";

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.