Financial Arithmetic, Time Value, and Returns
10 algorithms in Financial Mathematics, Statistics, and Data Foundations · 10 with asserted arithmetic.
In this family#
-
Simple Interest verified
Computes interest that accrues on the original principal only, never on interest already earned, and the balance that leaves at the end.
simpleInterest(input) -
Compound Interest verified
Grows a principal at a periodic rate applied
compoundsPerPeriodtimes within each period, so earned interest starts earning interest itself.compoundInterest(input) -
Present Value and Future Value verified
Moves money along the timeline in both directions at once: it compounds
principalforward and discounts a suppliedfutureValueback, over the same number of periods at the same rate.presentValueAndFutureValue(input) -
Discount Factors and Discount Rates verified
Converts a rate and a horizon into the single multiplier that pulls a future amount back to today, and converts that multiplier back into the per-period rate it implies.
discountFactorsAndDiscountRates(input) -
Cash-Flow Timelines and Net Present Value verified
Discounts a dated series of cash flows back to today at a single rate and sums them into a net present value.
cashFlowTimelinesAndNetPresentValue(input) -
Simple Return verified
Measures the plain percentage gain between a starting and an ending value over one holding period.
simpleReturn(input) -
Log Return verified
Takes the natural logarithm of the growth ratio between a starting and an ending value, and converts it back to show the two are the same move.
logReturn(input) -
Holding-Period and Cumulative Return verified
Chains a series of period returns into the single growth factor they compound to, and applies that factor to a starting value.
holdingPeriodAndCumulativeReturn(input) -
Arithmetic versus Geometric Average Return verified
Averages the same return series two ways, by adding and by compounding, so the gap between the plain mean and the rate actually realised is visible.
arithmeticVersusGeometricAverageReturn(input) -
Return Annualization and Deannualization verified
Scales a single-period return up to an annual figure by compounding it
frequencytimes, then scales that annual figure back down to confirm the two conversions are inverses.returnAnnualizationAndDeannualization(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:
import { simpleInterest } from "fintech-algorithms/foundations/financial-arithmetic-time-value-and-returns/simple-interest";
import { compoundInterest } from "fintech-algorithms/foundations/financial-arithmetic-time-value-and-returns/compound-interest";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.