formula.cfored.com · docs · cbmas-orb-formulas v0.1

cbmas-orb-formulas

Quantitative-finance formula library for the CBMAS ORB commodity trading pipeline. 40 formula groups across 9 clusters, verified against textbook and canonical published values.

01 — QUICK LINKS

Start here

02 — BY CLUSTER

Nine packages, one import root

PackageHighlight
optimizationSGD, softmax, activations
microstructureFVG + CE, OFI, Hill β̂, Sato-Kanazawa √Q
mean_reversionOU + half-life, ADF gate, Johansen
trend_followingWonham + HJB, Markov, Hurst router
risk_sizingKelly, EV gate, CVaR LP, Robust CVaR
derivativesPut-call parity, cost of carry
statisticsBin/Pois/Normal + 9 extended distributions
foundationsBayes, Black-Scholes, Sharpe/CAPM, VaR
03 — HIGHEST-IMPACT SINGLE FORMULA

risk_sizing.cvar_lp_solve_robust

Closes a +34% under-estimation gap on canonical commodity β̂=4 tail-index values relative to Normal-scenario CVaR. One-line drop-in for any portfolio_optimizer.py that currently uses np.random.multivariate_normal for scenario generation.

04 — HIGHEST-IMPACT COMBINED PATTERN

Wonham + Beta-Bernoulli + EV gate

Wonham filter for regime-probability tracking + Beta-Bernoulli conjugate for π refinement + EV gate for entry authorization. Together these form an auditable Bayesian trade-authorization pipeline where every π update is a single log line, every entry is a π-conditioned EV check, and every exit is a probability-threshold crossing.

Auditable by construction. One line per π update; one gate verdict per entry; one threshold crossing per exit.