// APPENDIX A · COURSE REFERENCE

Appendix A · Quick-reference formula sheet

Every formula in the course, checked against the primary literature, in a single reference.

Level intermediate-advancedEdition jul 2026Leer en español

How to use this formula sheet. This appendix condenses every operational formula in the course into two dense tables — one per area — using the exact notation of modules 7 through 9. Each row gives the concept, the formula, the symbols to fix before computing, and the usage caution; the most frequently consulted formulas also appear as display blocks, outside the table, so they can be copied at a glance. Global conventions: losses are positive unless stated otherwise; rtr_t = log return; α\alpha = tail level (0.01 for 99% VaR); zα=Φ−1(1−α)z_\alpha = \Phi^{-1}(1-\alpha); φ,Φ\varphi, \Phi = standard normal density and CDF; ww = weights, Σ\Sigma = covariances, 1\mathbf{1} = vector of ones. And the golden rule of the course: no formula is executed by the LLM — the LangChain agent orchestrates, explains, and alerts; the number is always produced by a deterministic tool.

13.1 Risk and performance

13.1.1 Formula table: delta-normal/historical/Monte Carlo VaR, ES/CVaR (Rockafellar-Uryasev), realized volatility, EWMA λ=0.94, GARCH(1,1), MDD, Sharpe/Sortino/Omega/Calmar/Sterling/Ulcer, beta, TE/IR + Grinold's law, skew/kurtosis, Cornish-Fisher, Component/Marginal VaR (Euler), Kupiec/Christoffersen LR, PSR/DSR

Key formulas for quick reference:

VaRα(h)=V(zα σh−μh),z0,05=1,645,    z0,01=2,326\mathrm{VaR}_{\alpha}(h) = V\left(z_{\alpha}\,\sigma\sqrt{h} - \mu h\right), \qquad z_{0{,}05}=1{,}645,\;\; z_{0{,}01}=2{,}326 ESα(L)=1α∫0αVaRu(L) du=E ⁣[L∣L≥VaRα(L)],ESαnormal=μ+σ φ(zα)α\mathrm{ES}_{\alpha}(L) = \frac{1}{\alpha}\int_{0}^{\alpha} \mathrm{VaR}_{u}(L)\,du = \mathbb{E}\!\left[L \mid L \ge \mathrm{VaR}_{\alpha}(L)\right], \qquad \mathrm{ES}_{\alpha}^{\text{normal}} = \mu + \sigma\,\frac{\varphi(z_{\alpha})}{\alpha} σt2=λ σt−12+(1−λ) rt−12    (EWMA, λ=0,94)σt2=ω+α εt−12+β σt−12    (GARCH(1,1))\sigma_t^2 = \lambda\,\sigma_{t-1}^2 + (1-\lambda)\,r_{t-1}^2 \;\;(\text{EWMA},\ \lambda=0{,}94) \qquad\qquad \sigma_t^2 = \omega + \alpha\,\varepsilon_{t-1}^2 + \beta\,\sigma_{t-1}^2 \;\;(\text{GARCH}(1,1)) S=Rp−Rfσp,Sanual=Sdiario252    (solo bajo i.i.d.)S = \frac{R_p - R_f}{\sigma_p}, \qquad S_{\mathrm{anual}} = S_{\mathrm{diario}}\sqrt{252} \;\;(\text{solo bajo i.i.d.}) zCF=z+16(z2−1)S+124(z3−3z)Kexceso−136(2z3−5z)S2z_{CF} = z + \frac{1}{6}(z^2 - 1)S + \frac{1}{24}(z^3 - 3z)K_{\mathrm{exceso}} - \frac{1}{36}(2z^3 - 5z)S^2 LRPOF=−2ln⁡ ⁣[(1−p)T−NpN(1−NT)T−N(NT)N]  ∼  χ12LR_{POF} = -2\ln\!\left[\frac{(1-p)^{T-N}p^{N}}{\left(1-\frac{N}{T}\right)^{T-N}\left(\frac{N}{T}\right)^{N}}\right] \;\sim\; \chi^2_1 DSR^=Φ ⁣((SR^−SR0)T−1 1−γ^3 SR^+γ^4−14SR^2 ),SR0=V ⁣[{SR^k}][(1−γEM) Φ−1 ⁣(1−1N)+γEM Φ−1 ⁣(1−1Ne)]\widehat{DSR} = \Phi\!\left( \frac{(\widehat{SR}-SR_0)\sqrt{T-1}}{\sqrt{\,1-\hat{\gamma}_3\,\widehat{SR}+\frac{\hat{\gamma}_4-1}{4}\widehat{SR}^{2}\,}} \right), \qquad SR_0 = \sqrt{\mathbb{V}\!\left[\{\widehat{SR}_k\}\right]}\left[(1-\gamma_{EM})\,\Phi^{-1}\!\left(1-\tfrac{1}{N}\right) + \gamma_{EM}\,\Phi^{-1}\!\left(1-\tfrac{1}{Ne}\right)\right]

Table A.1 — Risk and performance formula sheet: formula, key symbols, and usage cautions

ConceptFormulaKey symbolsUsage/caution
Delta-normal VaR (portfolio)VaRα=V zαw⊤Σw\mathrm{VaR}_{\alpha} = V\,z_{\alpha}\sqrt{w^{\top}\Sigma w}; single asset: see blockVV value, ww weights, μ,σ\mu,\sigma dailyFast and aggregable; fails with fat tails, skewness, and non-linearities (options); the h\sqrt{h} rule requires i.i.d.
Historical VaR (HS)VaRαHS=L(⌈T(1−α)⌉)\mathrm{VaR}_{\alpha}^{\mathrm{HS}} = L_{(\lceil T(1-\alpha) \rceil)}L(k)L_{(k)} = kk-th worst loss out of TT revalued P&LNo distributional assumptions; at 99% with T=250T=250 only ~2.5 tail observations; slow to react to regime changes
Monte Carlo VaR / FHSVaRαMC=F^L,N−1(1−α)\mathrm{VaR}_{\alpha}^{\mathrm{MC}} = \hat{F}^{-1}_{L,N}(1-\alpha)F^L,N\hat{F}_{L,N} = empirical CDF of NN simulated lossesThe risk shifts to the generator; FHS: resample residuals zt=rt/σtz_t = r_t/\sigma_t from a GARCH; Gaussian MC underestimates tails
ES / CVaRSee block; empirical: mean of the ⌊Tα⌋\lfloor T\alpha \rfloor worst lossesα\alpha tail; p=1−αp=1-\alpha confidenceCoherent and subadditive (VaR is not); FRTB: 97.5% ES =2,338σ≈= 2{,}338\sigma \approx 99% VaR =2,326σ= 2{,}326\sigma under normality
Rockafellar–UryasevCVaR^β=min⁡c{c+11−β⋅1T∑t=1T(Lt−c)+}\widehat{\mathrm{CVaR}}_{\beta} = \min_{c}\left\{ c + \frac{1}{1-\beta}\cdot\frac{1}{T}\sum_{t=1}^{T}(L_t - c)_{+} \right\}cc ≈ VaR; (⋅)+(\cdot)_{+} positive partTurns CVaR optimization into linear programming (ideal with cvxpy)
Realized volatilityRVt=∑i=1Mrt,i2RV_t = \sum_{i=1}^{M} r_{t,i}^{2}, RVolt=RVt\mathrm{RVol}_t = \sqrt{RV_t}MM evenly spaced intraday observationsConsistent estimator of quadratic variation; with microstructure noise, sample at ~5 min
EWMA (RiskMetrics)See block; expanded form σt2=(1−λ)∑i≥1λi−1rt−i2\sigma_t^2 = (1-\lambda)\sum_{i\ge1}\lambda^{i-1}r_{t-i}^2λ=0,94\lambda=0{,}94 daily, 0,970{,}97 monthlyEffective memory ≈1/(1−λ)≈17\approx 1/(1-\lambda)\approx 17 days; IGARCH with no mean reversion
GARCH(1,1)See block; long run σˉ2=ω/(1−α−β)\bar\sigma^2 = \omega/(1-\alpha-\beta); forecast Et[σt+k2]=σˉ2+(α+β)k−1(σt+12−σˉ2)\mathbb{E}_t[\sigma_{t+k}^2] = \bar\sigma^2 + (\alpha+\beta)^{k-1}(\sigma_{t+1}^2-\bar\sigma^2)ω>0\omega>0, α,β≥0\alpha,\beta\ge0, persistence α+β\alpha+\betaRequires α+β<1\alpha+\beta<1 for stationarity; EWMA is the limiting case ω=0\omega=0, α+β=1\alpha+\beta=1
Maximum drawdownMDDT=min⁡0≤t≤TVt−V‾tV‾t\mathrm{MDD}_T = \min_{0\le t\le T}\frac{V_t - \overline{V}_t}{\overline{V}_t}V‾t=max⁡s≤tVs\overline{V}_t = \max_{s\le t}V_s (high-water mark)Asymmetric recovery: g=d/(1−d)g = d/(1-d) (−50% ⇒ +100%); highly sensitive to the window
SharpeSee blockRfR_f risk-free, σp\sigma_p of the excessAnnualize with 252\sqrt{252} only under i.i.d.; with autocorrelation it can be overstated by up to 65% (Lo 2002) (Alpha Vantage)
SortinoSortino=Rp−τσd\mathrm{Sortino} = \frac{R_p - \tau}{\sigma_d}, σd=1N∑i=1Nmin⁡(Ri−τ, 0)2\sigma_d = \sqrt{\frac{1}{N}\sum_{i=1}^{N}\min(R_i-\tau,\,0)^2}τ\tau = MAR (0 or RfR_f)Penalizes downside volatility only; sensitive to the choice of τ\tau
OmegaΩ(θ)=E[(R−θ)+]E[(θ−R)+]\Omega(\theta) = \frac{\mathbb{E}[(R-\theta)^{+}]}{\mathbb{E}[(\theta-R)^{+}]}θ\theta threshold; (x)+=max⁡(x,0)(x)^{+}=\max(x,0)Uses the entire distribution with no moment assumptions; sanity check: Ω(Rˉ)=1\Omega(\bar R)=1
CalmarCalmar=CAGR/∣MDD∣\mathrm{Calmar} = \mathrm{CAGR}/\lvert\mathrm{MDD}\rvertTypical window: 36 monthsA crisis-free track record artificially inflates it; MAR variant over the full history
SterlingSterling=APRALD+10%\mathrm{Sterling} = \frac{APR}{ALD + 10\%}APRAPR annual return, ALDALD average of annual max DD±10%\pm 10\% convention ambiguous in the literature: state the one used (Alpha Vantage); modern variant: (CAGR−Rf)/MDD‾(\mathrm{CAGR}-R_f)/\overline{\mathrm{MDD}}
Ulcer IndexRi=100×Pi−max⁡j≤iPjmax⁡j≤iPjR_i = 100\times\frac{P_i - \max_{j\le i}P_j}{\max_{j\le i}P_j}, UI=1N∑i=1NRi2UI = \sqrt{\frac{1}{N}\sum_{i=1}^{N}R_i^2}% drawdown from the prior peakPenalizes depth and duration; UPI =(Rp−Rf)/UI= (R_p - R_f)/UI
Betaβi=Cov(Ri,Rm)Var(Rm)=ρi,m σiσm\beta_i = \frac{\mathrm{Cov}(R_i,R_m)}{\mathrm{Var}(R_m)} = \rho_{i,m}\,\frac{\sigma_i}{\sigma_m}Slope of the regression against the marketHighly sensitive to window, benchmark, and data frequency
TE / IR + GrinoldTE=σ(Rp−Rb)TE = \sigma(R_p - R_b), IR=E[Rp−Rb]TEIR = \frac{\mathbb{E}[R_p - R_b]}{TE}, IR≈ICBRIR \approx IC\sqrt{BR}ICIC information coefficient, BRBR breadthGrinold's law assumes independent forecasts; constraints reduce the achievable IR
Skew / kurtosisS^=μ^3/σ^3\hat{S} = \hat\mu_3/\hat\sigma^3, K^=μ^4/σ^4\hat{K} = \hat\mu_4/\hat\sigma^4, Kexceso=K^−3K_{\mathrm{exceso}} = \hat K - 33rd and 4th standardized momentsTypical equity: S<0S<0 and Kexceso>0K_{\mathrm{exceso}}>0 — the direct reason normal VaR underestimates
Cornish–FisherSee block; VaRmod=V[zCF σh−μh]\mathrm{VaR}_{\mathrm{mod}} = V\left[z_{CF}\,\sigma\sqrt{h} - \mu h\right]Sample SS, KexcesoK_{\mathrm{exceso}}Cheap non-Gaussian VaR; invalid if ∣S∣≳2\lvert S\rvert\gtrsim 2 or K≳6K\gtrsim 6 (non-monotonic quantiles): verify before reporting
Marginal / Component VaR (Euler)MVaRi=zα (Σx)iσp\mathrm{MVaR}_i = z_\alpha\,\frac{(\Sigma x)_i}{\sigma_p}, CVaRi=xi MVaRi=VaRi ρi,p\mathrm{CVaR}_i = x_i\,\mathrm{MVaR}_i = \mathrm{VaR}_i\,\rho_{i,p}xix_i monetary position, ρi,p\rho_{i,p} correlation with the portfolioExact aggregation: ∑iCVaRi=VaRp\sum_i \mathrm{CVaR}_i = \mathrm{VaR}_p; mathematical basis of narrative VaR attribution
Kupiec POFSee blockNN exceptions in TT days, pp nominal rateUnconditional frequency only; low power with small TT (250 days ⇒ ~12.5 expected exceptions at 95%)
ChristoffersenLRcc=LRuc+LRind∼χ22LR_{cc} = LR_{uc} + LR_{ind} \sim \chi^2_2π^01=n01n00+n01\hat\pi_{01} = \frac{n_{01}}{n_{00}+n_{01}}, π^11=n11n10+n11\hat\pi_{11} = \frac{n_{11}}{n_{10}+n_{11}}Detects exception clustering (independence); required in Basel internal-models frameworks
PSR / DSRSee block; DSR^=PSR^(SR0)\widehat{DSR} = \widehat{PSR}(SR_0)Sample γ^3,γ^4\hat\gamma_3,\hat\gamma_4; γEM≈0,5772\gamma_{EM}\approx 0{,}5772; NN trialsOperating rule: require DSR > 0.95 (PyPI); a backtest Sharpe without a declared number NN of trials is not evidence

Usage notes — risk and performance. When each formula fails: delta-normal VaR systematically underestimates risk under fat tails and negative skewness (S<0S<0, Kexceso>0K_{\mathrm{exceso}}>0 in equity) and does not capture derivative non-linearities; historical VaR relies on a single path and at 99% with 250 days has only ~2.5 tail observations; Monte Carlo shifts the risk to the stochastic generator — the comparative evidence shows that Gaussian MC underestimates tails relative to filtered historical simulation. The h\sqrt{h} rule and Sharpe annualization with 252\sqrt{252} are valid only under i.i.d. returns: with serial autocorrelation, Lo (2002) documents annualized Sharpe ratios overstated by up to 65% (Alpha Vantage). Fixed course conventions: λ=0,94\lambda=0{,}94 daily (0.97 monthly; effective memory ≈ 17 days), per the RiskMetrics Technical Document (Godel Discount); EWMA does not revert to the mean — if reversion is needed, use GARCH(1,1) with α+β<1\alpha+\beta<1. Sterling is the least standardized formula in the literature: the original version adds 10% to the denominator, but variants with −10%-10\% or with RfR_f circulate; always state the convention used (±10% tolerance) (Alpha Vantage). Cornish-Fisher stops being monotonic for ∣S∣≳2\lvert S\rvert\gtrsim 2 or K≳6K\gtrsim 6: verify the monotonicity of zCFz_{CF} in α\alpha before reporting. Kupiec has low power with small TT and does not detect time clustering — which is why it is complemented with Christoffersen. Calmar and MDD depend on the window: a crisis-free history inflates them. And no backtest Sharpe is evidence without DSR > 0.95 after declaring the NN trials (PyPI).

13.2 Portfolios and execution

13.2.1 Formula table: Markowitz MVO + GMV + tangency, CAPM, FF3/FF5, Black-Litterman (π=δΣw, posterior, Idzorek ω), Kelly (discrete/continuous/fractional), ERC (Spinu), Ledoit-Wolf δ*, HRP, Almgren-Chriss (trajectory, κ, E(X), V(X)), square-root law, signal cross-sectional z-score

Key formulas for quick reference:

wGMV=Σ−111⊤Σ−11,wtan=Σ−1(μ−rf1)1⊤Σ−1(μ−rf1)\mathbf{w}_{\mathrm{GMV}} = \frac{\boldsymbol{\Sigma}^{-1}\mathbf{1}}{\mathbf{1}^{\top}\boldsymbol{\Sigma}^{-1}\mathbf{1}}, \qquad \mathbf{w}_{\mathrm{tan}} = \frac{\boldsymbol{\Sigma}^{-1}(\boldsymbol{\mu} - r_f\mathbf{1})}{\mathbf{1}^{\top}\boldsymbol{\Sigma}^{-1}(\boldsymbol{\mu} - r_f\mathbf{1})} π=δ Σ wm,μBL=[(τΣ)−1+P⊤Ω−1P]−1[(τΣ)−1π+P⊤Ω−1q]\boldsymbol{\pi} = \delta\,\boldsymbol{\Sigma}\,\mathbf{w}_{m}, \qquad \boldsymbol{\mu}_{BL} = \left[(\tau\boldsymbol{\Sigma})^{-1} + P^{\top}\boldsymbol{\Omega}^{-1}P\right]^{-1}\left[(\tau\boldsymbol{\Sigma})^{-1}\boldsymbol{\pi} + P^{\top}\boldsymbol{\Omega}^{-1}\mathbf{q}\right] f∗=bp−(1−p)b=p−qb    (discreto),f∗=μ−rfσ2,f∗=Σ−1(μ−rf1)    (continuo)f^{*} = \frac{bp - (1-p)}{b} = p - \frac{q}{b} \;\;(\text{discreto}), \qquad f^{*} = \frac{\mu - r_f}{\sigma^{2}}, \quad \mathbf{f}^{*} = \boldsymbol{\Sigma}^{-1}(\boldsymbol{\mu} - r_f\mathbf{1}) \;\;(\text{continuo}) RCi=wi (Σw)iσp=σpn∀ i    (ERC),σp=∑i=1nRCiRC_i = \frac{w_i\,(\boldsymbol{\Sigma}\mathbf{w})_i}{\sigma_p} = \frac{\sigma_p}{n} \quad \forall\, i \;\;(\text{ERC}), \qquad \sigma_p = \sum_{i=1}^{n} RC_i xj=sinh⁡ ⁣(κ (T−tj))sinh⁡(κT) X,κ  ∼  λ σ2η    (Almgren–Chriss)x_j = \frac{\sinh\!\big(\kappa\,(T-t_j)\big)}{\sinh(\kappa T)}\,X, \qquad \kappa \;\sim\; \sqrt{\frac{\lambda\,\sigma^{2}}{\eta}} \;\;(\text{Almgren--Chriss}) I(Q)=Y σD(QVD)1/2,Y≈0,3 ⁣− ⁣1I(Q) = Y\,\sigma_{D}\left(\frac{Q}{V_{D}}\right)^{1/2}, \qquad Y \approx 0{,}3\!-\!1

Table A.2 — Portfolio and execution formula sheet: formula, key symbols, and usage cautions

ConceptFormulaKey symbolsUsage/caution
MVO (Markowitz)min⁡ww⊤Σw\min_w w^{\top}\Sigma w s.a. w⊤μ=μˉw^{\top}\mu = \bar\mu, w⊤1=1w^{\top}\mathbf{1} = 1; dual: w∗=1λΣ−1μ\mathbf{w}^{*} = \frac{1}{\lambda}\Sigma^{-1}\muλ\lambda risk aversion"Error maximizer" (Michaud): errors in μ\mu weigh ~11× those of variances; never with raw sample Σ\Sigma
GMVSee block; σGMV2=1/(1⊤Σ−11)\sigma_{\mathrm{GMV}}^2 = 1/(\mathbf{1}^{\top}\Sigma^{-1}\mathbf{1})Does not use μ\muThe most robust out of sample; long-only + bounds = implicit shrinkage (Jagannathan–Ma)
Tangency (max Sharpe)See block; SRtan=(μ−rf1)⊤Σ−1(μ−rf1)SR_{\mathrm{tan}} = \sqrt{(\mu - r_f\mathbf{1})^{\top}\Sigma^{-1}(\mu - r_f\mathbf{1})}With rfr_f; tangency point of the CMLExtremely sensitive to μ^\hat\mu; multivariate Kelly = unnormalized tangency (λ=1\lambda=1)
CAPME[Ri]=rf+βi(E[Rm]−rf)\mathbb{E}[R_i] = r_f + \beta_i\big(\mathbb{E}[R_m] - r_f\big)βi\beta_i from the previous row; equilibriumBasis of the Black-Litterman prior; SML: assets above it are undervalued
FF3 / FF5Ri,t−rf,t=αi+βMMKTt+βSMBSMBt+βHMLHMLt (+βRMWRMWt+βCMACMAt)+εi,tR_{i,t} - r_{f,t} = \alpha_i + \beta_M MKT_t + \beta_{SMB}SMB_t + \beta_{HML}HML_t\,(+\beta_{RMW}RMW_t + \beta_{CMA}CMA_t) + \varepsilon_{i,t}Size, value (+ profitability, investment) factorsFactor attribution of alpha; Carhart adds WMLWML (momentum); data: Ken French Data Library
Black-LittermanSee block; Idzorek: ωk=τ pk Σ pk⊤\omega_k = \tau\,\mathbf{p}_k\,\Sigma\,\mathbf{p}_k^{\top}; ΣBL=Σ+M\Sigma_{BL} = \Sigma + Mδ≈2,5 ⁣− ⁣3,5\delta\approx 2{,}5\!-\!3{,}5; τ\tau prior scale; P,q,ΩP,\mathbf{q},\Omega viewsτ∈[0,025, 0,05]\tau \in [0{,}025,\ 0{,}05] or τ=1/T\tau = 1/T (Github); views are the auditable entry point for signals (incl. LLM)
Discrete KellySee blockbb net odds, pp win probability, q=1−pq=1-pGrowth-optimal capital fraction; at full Kelly the drawdowns are intolerable
Continuous / multivariate KellySee blockMaximizes E[ln⁡W]\mathbb{E}[\ln W] (log utility)f∗=Σ−1(μ−rf1)\mathbf{f}^{*} = \Sigma^{-1}(\mu - r_f\mathbf{1}) coincides with the unnormalized tangency portfolio
Fractional Kellyf^=c⋅f∗\hat f = c\cdot f^{*}, c∈(0,1)c\in(0,1)c=1/2c = 1/2 or 1/41/4 in practice1/2-Kelly ≈ 75% of growth with ~50% of the volatility (Github); protects against overestimated edge
ERC (risk parity, Spinu)See block; wERC=arg⁡min⁡∑i,j(wi(Σw)i−wj(Σw)j)2\mathbf{w}_{ERC} = \arg\min \sum_{i,j}\big(w_i(\Sigma w)_i - w_j(\Sigma w)_j\big)^2 s.a. w⊤1=1w^{\top}\mathbf{1}=1, wi≥0w_i\ge0RCiRC_i risk contributionNo general closed-form solution; sits between 1/N1/N and GMV on the diversification-risk spectrum
Ledoit–WolfΣ^LW=δ∗F+(1−δ∗)S\widehat{\Sigma}_{LW} = \delta^{*}F + (1-\delta^{*})S, δ∗=∑i≠jVar^(sij)∑i≠j(sij−fij)2\delta^{*} = \frac{\sum_{i\ne j}\widehat{\mathrm{Var}}(s_{ij})}{\sum_{i\ne j}(s_{ij}-f_{ij})^2}Sample SS; FF target (constant correlation or Tr(S)nI\frac{\mathrm{Tr}(S)}{n}I)Closed-form δ∗\delta^{*}, no free parameters; mandatory standard before inverting Σ\Sigma with 10+ assets
HRPdij=12(1−ρij)d_{ij} = \sqrt{\tfrac{1}{2}(1-\rho_{ij})}; allocation α1=1−V1V1+V2\alpha_1 = 1 - \frac{V_1}{V_1+V_2}, α2=1−α1\alpha_2 = 1-\alpha_1Clustering + seriation + recursive bisection; VcV_c intra-cluster varianceDiversifies without inverting Σ\Sigma: robust to ill-conditioning
Almgren–ChrissSee block; E(x)=12γX2+ε∑j∣nj∣+η~τ∑jnj2E(x) = \tfrac{1}{2}\gamma X^2 + \varepsilon\sum_j\lvert n_j\rvert + \frac{\tilde\eta}{\tau}\sum_j n_j^2, η~=η−12γτ\tilde\eta = \eta - \tfrac{1}{2}\gamma\tau; V(x)=σ2τ∑jxj2V(x) = \sigma^2\tau\sum_j x_j^2γ\gamma permanent impact, η\eta temporary, λ\lambda aversion, τ=T/N\tau=T/NκT≪1\kappa T\ll1 ⇒ ≈TWAP; κT≫1\kappa T\gg1 ⇒ front-loaded with half-life 1/κ1/\kappa; the naive strategy (λ=0\lambda=0) is never optimal (Blockchain News)
Square-root lawSee block; practical: Cimpacto≈0,1×spread+YσDQ/VDC_{\mathrm{impacto}} \approx 0{,}1\times\text{spread} + Y\sigma_D\sqrt{Q/V_D}QQ meta-order, VDV_D daily volume, σD\sigma_D daily vol.Concave in QQ: defines the strategy's capacity; Almgren et al. propose a 3/5 exponent for blocks (🦜️🔗 LangChain)
Cross-sectional z-scorezi,t=si,t−sˉtσt(s)z_{i,t} = \dfrac{s_{i,t} - \bar{s}_t}{\sigma_t(s)}ss signal (e.g., LLM score), mean and standard deviation per date ttWinsorize before standardizing; the basis of long-short ranking and of weights ∝z\propto z; handle the point mass at "neutral"

Usage notes — portfolios and execution. The weak link of MVO is not the QP but μ\mu: errors in means weigh ~11× those of variances (Chopra–Ziemba) and the optimizer systematically maximizes them (Michaud); that is why GMV, ERC, and HRP — which do not use μ\mu or do not invert Σ\Sigma — tend to win out of sample, and long-only constraints with bounds act as implicit shrinkage (Jagannathan–Ma). In production, never feed the raw sample Σ\Sigma: Ledoit–Wolf with closed-form δ∗\delta^{*} is the standard before any Σ−1\Sigma^{-1}. In Black-Litterman, τ\tau scales the confidence in the equilibrium prior: institutional practice is τ∈[0,025, 0,05]\tau\in[0{,}025,\ 0{,}05] or τ=1/T\tau = 1/T, with Ω\Omega calibrated per Idzorek (Github); the views (P,q,Ω)(P,\mathbf{q},\Omega) are the auditable entry point for signals, including LLM-generated ones. Full Kelly maximizes growth but with intolerable drawdowns: in practice it is traded fractionally at 1/4–1/2 — half-Kelly retains ≈ 75% of the growth with ~50% of the volatility (Github). In execution: κT≪1\kappa T\ll1 reproduces TWAP; κT≫1\kappa T\gg1 liquidates front-loaded with half-life 1/κ1/\kappa, and the naive strategy (λ=0\lambda=0) is never optimal for a risk-averse trader (Blockchain News). The square-root law is concave in QQ — "it costs ~1 day of volatility to move 1 day of volume" (🦜️🔗 LangChain): liquidating X=1,000,000X = 1{,}000{,}000 shares with Q/VD=0,25Q/V_D = 0{,}25, σD=2%\sigma_D = 2\% and Y=0,6Y=0{,}6 costs ≈0,6×2%×0,5=60\approx 0{,}6\times2\%\times0{,}5 = 60 bp. The cross-sectional z-score requires winsorizing the signal by date before ranking; with LLM signals, explicitly handle the point mass in the neutral class.


Appendix A of 3 — LangChain for Quantitative Trading. Data and versions verified as of July 2026; prices and market figures subject to change. LangChain 1.3.14 / langchain-core 1.5.2.