๐งช
Test Documentation
19 test modules with mathematical background, numerical examples, and step-by-step Excel reproduction guides. Designed for mathematician audit.
Browse Tests โโ๏ธ
Core Modules
21 pure function modules implementing Black-Scholes pricing, portfolio optimization, Uniswap v3 math, and analysis utilities.
Browse Core โ๐ Key Formulas Documented
Black-Scholes Put
P = KeโปสณแตN(-dโ) - SN(-dโ)
Put Payoff
payoff = max(K - S, 0) ร qty
Optimization Objective
min ฮฃแตข |profit[i] - |IL[i]||
Impermanent Loss
IL = V_LP / V_HODL - 1
๐ Option Pricing
๐ฏ Portfolio Optimization
test_solver
test
Hedge optimization with L-BFGS-B, SLSQP, trust-constr solvers. Full Excel reproduction guide.
test_solver_edge
edge
Edge cases: narrow ranges, equal bounds, changeable masks
test_solver_mask
test
Variation include/exclude mask building for filtered optimization
test_portfolio
test
Portfolio display: quantity_per_eth, allocation_pct, scaling formulas
test_position
test
Hedge position creation and premium calculations
test_strikes
test
Dynamic strike generation algorithms and configurations
๐ Analysis & Formatting
๐ข DeFi Mathematics
test_uniswap
test
Uniswap v3 math: sqrt prices, liquidity, token amounts, IL calculations
test_uniswap_edge
edge
Edge cases: zero values, boundary conditions
test_lifetime
test
Time calculations: days to expiry, annualization factors
test_math
test
Core math utilities: decimal precision, rounding functions