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

Bayesian and Robust Allocation

5 algorithms in Portfolio Construction.

In this family#

  1. Black-Litterman contract

    Combines market-implied equilibrium returns with stated views and their confidence, producing the posterior expected returns an optimizer then uses.

    blackLittermanAllocate(input)
  2. Resampled Efficient Frontier contract

    Averages optimizer weights across seeded bootstrap resamples at matching return rank, so the reported allocation reflects estimation noise rather than one sample.

    resampledEfficientFrontier(returns, resampleIndices, ranks)
  3. Robust Mean-Variance contract

    Optimizes against an explicit ellipsoidal uncertainty set around the mean, so the robustness claim names the uncertainty it is built to survive.

    robustMeanVariance(mean, covariance, uncertaintyShape, kappa, riskPenalty, maxIterations, tolerance)
  4. Distributionally Robust Portfolio contract

    Minimizes the worst-case probability of a loss across every distribution sharing a given mean and covariance, subject to a return floor.

    distributionallyRobustPortfolio(mean, covariance, lossThreshold, returnFloor, tolerance, maxIterations)
  5. Kelly Allocation contract

    Maximizes expected logarithmic growth over a discrete scenario set, separating the long-run growth criterion from the single-coin-toss intuition.

    kellyAllocation(returns, probabilities, maxIterations, tolerance)

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 { blackLittermanAllocate } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/black-litterman";
import { resampledEfficientFrontier } from "fintech-algorithms/portfolio-construction/bayesian-and-robust-allocation/resampled-efficient-frontier";

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

Where this sits#

Portfolio Construction collects 20 algorithms across 4 families. For the concept behind this family rather than the call signatures, see the concept guides.