Financial Risk and Performance Statistics
10 algorithms in Financial Mathematics, Statistics, and Data Foundations · 10 with asserted arithmetic.
In this family#
-
Volatility and Annualized Volatility verified
Takes the sample standard deviation of a return series and rescales it to an annual horizon by the square root of the observations per year.
volatilityAndAnnualizedVolatility(input) -
Downside Deviation and Target Shortfall verified
Measures dispersion of returns below a target only, so upside swings do not count as risk.
downsideDeviationAndTargetShortfall(input) -
Drawdown and Maximum Drawdown verified
Compounds a return series into a wealth path and tracks how far that path sits below its own running peak.
drawdownAndMaximumDrawdown(input) -
Loss Distributions and Loss Quantiles verified
Flips a return series into losses, sorts them, and reads off the quantile at the requested confidence by linear interpolation between neighbours.
lossDistributionsAndLossQuantiles(input) -
Value at Risk Intuition verified
Reads historical value at risk straight off the sorted loss series and counts how many observed losses ran past it.
valueAtRiskIntuition(input) -
Expected Shortfall Intuition verified
Averages the losses that sit at or beyond the value-at-risk threshold, describing the tail rather than only its edge.
expectedShortfallIntuition(input) -
Beta and Market-Relative Risk verified
Divides the sample covariance between a return series and its benchmark by the benchmark's sample variance.
betaAndMarketRelativeRisk(input) -
Sharpe, Sortino, and Information Ratio Intuition verified
Computes three reward-per-unit-of-risk ratios from the same series, each dividing an average by a different notion of risk.
sharpeSortinoAndInformationRatioIntuition(input) -
Active Return and Tracking Error verified
Subtracts the benchmark from the portfolio period by period, then reports the average and the annualized volatility of that difference.
activeReturnAndTrackingError(input) -
Covariance Matrices, Portfolio Variance, and Diversification verified
Combines portfolio weights with a covariance matrix into portfolio variance, and isolates the share of it that comes from the off-diagonal terms.
covarianceMatricesPortfolioVarianceAndDiversification(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 { volatilityAndAnnualizedVolatility } from "fintech-algorithms/foundations/financial-risk-and-performance-statistics/volatility-and-annualized-volatility";
import { downsideDeviationAndTargetShortfall } from "fintech-algorithms/foundations/financial-risk-and-performance-statistics/downside-deviation-and-target-shortfall";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.