Skip to main content
PROJECT STRATA
  • Dashboard
  • Bond Lab
GlossaryAccountSign In
HomeWatchlistAccount
PROJECT STRATA

Methodology

How Project Strata calculates bond analytics, risk metrics, and portfolio values. All formulas are industry-standard and traceable.

Bond Pricing

Present value calculations for fixed-income securities

Dirty Price from Yield

Computes the present value of all future cashflows by discounting each at the yield to maturity using periodic compounding.

P=∑i=1nCFi(1+ym)m⋅tiP = \sum_{i=1}^{n} \frac{CF_i}{\left(1 + \frac{y}{m}\right)^{m \cdot t_i}}P=i=1∑n​(1+my​)m⋅ti​CFi​​

Variables

PPPDirty price (per 100 par)
CFiCF_iCFi​Cashflow at time t_i (coupon or principal)
yyyYield to maturity (annual, decimal)
mmmCoupon frequency (1, 2, 4, or 12 per year)
tit_iti​Time to cashflow i in years

Assumptions

  • •Periodic compounding at coupon frequency (not continuous)
  • •ACT/365 Fixed day count for time fractions
  • •No business day adjustments applied
  • •All cashflows received on scheduled dates

Industry Comparison

Excel PRICE(): Uses 30/360 by default; specify basis=3 for ACT/365 to match
Bloomberg DPRICE: Matches when configured with same day count and compounding

YTM Solver (Bisection)

Finds the yield that equates the discounted cashflows to the target dirty price. Uses bisection with bracket expansion.

Find y such that P(y)=Ptarget\text{Find } y \text{ such that } P(y) = P_{target}Find y such that P(y)=Ptarget​

Variables

yyyYield to maturity being solved for
P(y)P(y)P(y)Dirty price as a function of yield
PtargetP_{target}Ptarget​Target dirty price = clean + accrued

Assumptions

  • •Initial bracket: -5% to +50% yield
  • •Bracket expands (doubles upper bound) up to 8 times if needed
  • •Maximum 80 iterations for convergence
  • •Tolerance: 10^-10 price error

Industry Comparison

Excel YIELD(): Uses Newton-Raphson; may differ at edge cases
Bloomberg YLD: Generally matches for standard bonds

Cashflow Generation

Generates the coupon schedule by walking backward from maturity in regular coupon periods.

CFi=Cm⋅100(coupon)+100(at maturity)CF_i = \frac{C}{m} \cdot 100 \quad \text{(coupon)} \quad + \quad 100 \quad \text{(at maturity)}CFi​=mC​⋅100(coupon)+100(at maturity)

Variables

CFiCF_iCFi​Cashflow at period i (per 100 par)
CCCAnnual coupon rate (decimal)
mmmCoupon frequency per year

Assumptions

  • •Regular periods (no odd first/last coupons)
  • •Principal returned at maturity only
  • •No amortization

Curve Pricing (Zero Rates)

Discounts cashflows using interpolated zero rates from the yield curve with continuous compounding.

P=∑i=1nCFi⋅e−r(ti)⋅tiP = \sum_{i=1}^{n} CF_i \cdot e^{-r(t_i) \cdot t_i}P=i=1∑n​CFi​⋅e−r(ti​)⋅ti​

Variables

PPPDirty price (per 100 par)
CFiCF_iCFi​Cashflow at time t_i
r(ti)r(t_i)r(ti​)Interpolated zero rate at time t_i (continuous, decimal)
tit_iti​Time to cashflow in years

Assumptions

  • •Continuous compounding for discount factors
  • •Linear interpolation between curve points
  • •Flat extrapolation beyond curve boundaries
  • •ACT/365 Fixed for time fractions

Industry Comparison

Bloomberg CDSW: Uses similar interpolation; check compounding convention

Curve + Spread Pricing

Adds a credit spread to the benchmark UST yield, then prices using periodic compounding.

yeffective=yUST+s10000y_{effective} = y_{UST} + \frac{s}{10000}yeffective​=yUST​+10000s​

Variables

yeffectivey_{effective}yeffective​Effective yield for discounting (decimal)
yUSTy_{UST}yUST​Interpolated UST benchmark yield (decimal)
sssCredit spread in basis points

Assumptions

  • •UST benchmark matches bond maturity via interpolation
  • •Spread applied as parallel shift to all cashflows
  • •Periodic compounding (not continuous)

Industry Comparison

Bloomberg ASW: Asset swap spread may differ; uses different calculation

Curriculum reference

CFA L1 Fixed Income: Introduction to Fixed-Income Valuation

Risk Metrics

Duration, convexity, and sensitivity measures

Modified Duration

Measures the percentage price sensitivity to a 1% change in yield. Computed using finite difference (1bp bump).

Dmod=−1P⋅∂P∂y≈−1P⋅P+1bp−P−1bp2⋅0.0001D_{mod} = -\frac{1}{P} \cdot \frac{\partial P}{\partial y} \approx -\frac{1}{P} \cdot \frac{P_{+1bp} - P_{-1bp}}{2 \cdot 0.0001}Dmod​=−P1​⋅∂y∂P​≈−P1​⋅2⋅0.0001P+1bp​−P−1bp​​

Variables

DmodD_{mod}Dmod​Modified duration (years)
PPPCurrent dirty price
P+1bpP_{+1bp}P+1bp​Price at yield + 1bp
P−1bpP_{-1bp}P−1bp​Price at yield - 1bp

Assumptions

  • •Symmetric 1bp yield shock for finite difference
  • •Assumes parallel shift in yield curve
  • •Does not capture convexity effects

Industry Comparison

Excel MDURATION(): Uses analytical formula; small differences possible
Bloomberg DUR: Generally matches for standard fixed-rate bonds

Convexity

Measures the curvature of the price-yield relationship. Captures second-order effects not explained by duration.

C=1P⋅∂2P∂y2≈P+1bp+P−1bp−2PP⋅(0.0001)2C = \frac{1}{P} \cdot \frac{\partial^2 P}{\partial y^2} \approx \frac{P_{+1bp} + P_{-1bp} - 2P}{P \cdot (0.0001)^2}C=P1​⋅∂y2∂2P​≈P⋅(0.0001)2P+1bp​+P−1bp​−2P​

Variables

CCCConvexity (years squared)
PPPCurrent dirty price
P+1bpP_{+1bp}P+1bp​Price at yield + 1bp
P−1bpP_{-1bp}P−1bp​Price at yield - 1bp

Assumptions

  • •Second derivative approximation via central difference
  • •Same 1bp shock as duration calculation
  • •Positive for standard bonds (price-yield curve is convex)

Industry Comparison

Bloomberg CNVX: Matches for most standard bonds

DV01 (Dollar Value of 01)

The change in portfolio value for a 1 basis point move in yield. Expressed in currency units.

DV01=Dmod×MV×0.0001DV01 = D_{mod} \times MV \times 0.0001DV01=Dmod​×MV×0.0001

Variables

DV01DV01DV01Dollar value of 1bp (in notional currency)
DmodD_{mod}Dmod​Modified duration
MVMVMVMarket value = (P / 100) × Notional

Assumptions

  • •Linear approximation using duration
  • •Ignores convexity effects for large moves
  • •Negative sign convention: rising yields = loss

Industry Comparison

Bloomberg DV01: May use slightly different scaling conventions

CS01 (Credit Spread 01)

The change in value for a 1 basis point move in credit spread. Only applicable in Curve+Spread mode.

CS01=P(s+1bp)−P(s)CS01 = P(s+1bp) - P(s)CS01=P(s+1bp)−P(s)

Variables

CS01CS01CS01P&L impact per 1bp spread move (notional currency)
P(s)P(s)P(s)Price at current spread s
P(s+1bp)P(s+1bp)P(s+1bp)Price at spread s + 1bp

Assumptions

  • •One-sided difference (spread up only)
  • •UST benchmark held constant
  • •Represents credit-specific risk separate from rates

Curriculum reference

CFA L1 Fixed Income: Understanding Fixed-Income Risk and Return

Horizon Analysis

Projected returns when selling before maturity

Total Horizon Return

Decomposes the expected return from holding a bond to a future horizon into four components: carry, roll-down, price effect, and reinvestment.

Rtotal=Rcarry+Rrolldown+Rprice+RreinvestR_{total} = R_{carry} + R_{rolldown} + R_{price} + R_{reinvest}Rtotal​=Rcarry​+Rrolldown​+Rprice​+Rreinvest​

Variables

RtotalR_{total}Rtotal​Total return (% of initial investment)
RcarryR_{carry}Rcarry​Carry return from coupon income
RrolldownR_{rolldown}Rrolldown​Roll-down return from aging
RpriceR_{price}Rprice​Price return from yield changes
RreinvestR_{reinvest}Rreinvest​Reinvestment return from coupon compounding

Assumptions

  • •Horizon date is before bond maturity
  • •Bond is sold at horizon at market price
  • •Yield change is a parallel shift
  • •Coupons reinvested at specified rate until horizon

Carry Return

The return from coupon income received during the holding period, expressed as a percentage of the initial investment.

Rcarry=∑ti<TCFicouponP0⋅N100R_{carry} = \frac{\sum_{t_i < T} CF_i^{coupon}}{P_0 \cdot \frac{N}{100}}Rcarry​=P0​⋅100N​∑ti​<T​CFicoupon​​

Variables

RcarryR_{carry}Rcarry​Carry return (decimal)
CFicouponCF_i^{coupon}CFicoupon​Coupon payment at time t_i (per 100 par)
TTTHorizon date
P0P_0P0​Initial dirty price (per 100)
NNNNotional amount

Assumptions

  • •Only coupons received before horizon are included
  • •Coupon amounts are per 100 par, scaled by notional
  • •Initial investment is dirty price × notional / 100

Roll-Down Return

The price change from the bond 'aging' along the yield curve, assuming yields remain unchanged.

Rrolldown=PTunchanged−P0P0R_{rolldown} = \frac{P_T^{unchanged} - P_0}{P_0}Rrolldown​=P0​PTunchanged​−P0​​

Variables

RrolldownR_{rolldown}Rrolldown​Roll-down return (decimal)
PTunchangedP_T^{unchanged}PTunchanged​Clean price at horizon with unchanged yield
P0P_0P0​Initial clean price

Assumptions

  • •Yield to maturity remains constant
  • •Bond 'rolls down' the curve as maturity shortens
  • •Premium bonds have negative roll-down (pull to par)
  • •Discount bonds have positive roll-down (pull to par)

Industry Comparison

Bloomberg HRZN: Similar decomposition; may use different interpolation

Price Return (Yield Change)

The price change due to assumed yield (or spread) movements between today and the horizon.

Rprice=PTnew−PTunchangedP0R_{price} = \frac{P_T^{new} - P_T^{unchanged}}{P_0}Rprice​=P0​PTnew​−PTunchanged​​

Variables

RpriceR_{price}Rprice​Price return from yield change (decimal)
PTnewP_T^{new}PTnew​Clean price at horizon with new yield
PTunchangedP_T^{unchanged}PTunchanged​Clean price at horizon with unchanged yield
P0P_0P0​Initial dirty price

Assumptions

  • •Yield change is specified as basis points
  • •In Curve+Spread mode, rate and spread changes are additive
  • •Negative yield change → positive price return
  • •Positive yield change → negative price return

Reinvestment Return

The additional income earned by reinvesting coupon payments at a specified rate until the horizon.

Rreinvest=∑ti<TCFi⋅((1+r)T−ti−1)P0⋅N100R_{reinvest} = \frac{\sum_{t_i < T} CF_i \cdot ((1+r)^{T-t_i} - 1)}{P_0 \cdot \frac{N}{100}}Rreinvest​=P0​⋅100N​∑ti​<T​CFi​⋅((1+r)T−ti​−1)​

Variables

RreinvestR_{reinvest}Rreinvest​Reinvestment return (decimal)
CFiCF_iCFi​Coupon payment at time t_i
rrrAnnual reinvestment rate (decimal)
TTTTime to horizon (years)
tit_iti​Time of coupon payment (years)
P0P_0P0​Initial dirty price

Assumptions

  • •Coupons reinvested immediately upon receipt
  • •Annual compounding at reinvestment rate
  • •Default reinvestment rate equals current YTM
  • •Return is FV of reinvested coupons minus face value

Horizon Price Calculation

The expected price of the bond at the horizon date, computed by discounting remaining cashflows at the horizon yield.

PT=∑i:ti>TCFi(1+yTm)m⋅(ti−T)P_T = \sum_{i: t_i > T} \frac{CF_i}{\left(1 + \frac{y_T}{m}\right)^{m \cdot (t_i - T)}}PT​=i:ti​>T∑​(1+myT​​)m⋅(ti​−T)CFi​​

Variables

PTP_TPT​Dirty price at horizon (per 100)
CFiCF_iCFi​Cashflow at time t_i
yTy_TyT​Yield at horizon (initial yield + change)
mmmCoupon frequency
TTTHorizon date

Assumptions

  • •Same pricing formula as initial pricing
  • •Only cashflows after horizon are included
  • •Settlement date for horizon pricing is the horizon date
  • •Accrued interest at horizon affects clean/dirty split

Curriculum reference

CFA L1 Fixed Income: Understanding Fixed-Income Risk and Return

Day Count Conventions

Standard methods for computing time fractions

30/360 US (Bond Basis)

Assumes each month has 30 days and each year has 360 days. Standard for US corporate bonds.

t=360(Y2−Y1)+30(M2−M1)+(D2−D1)360t = \frac{360(Y_2 - Y_1) + 30(M_2 - M_1) + (D_2 - D_1)}{360}t=360360(Y2​−Y1​)+30(M2​−M1​)+(D2​−D1​)​

Variables

tttYear fraction
Y1,Y2Y_1, Y_2Y1​,Y2​Start and end years
M1,M2M_1, M_2M1​,M2​Start and end months
D1,D2D_1, D_2D1​,D2​Start and end days (adjusted)

Assumptions

  • •If D1 = 31, set D1 = 30
  • •If D1 = 30 or 31 and D2 = 31, set D2 = 30
  • •If D1 is last day of February, set D1 = 30
  • •If both D1 and D2 are last day of February, set D2 = 30

Industry Comparison

Excel YEARFRAC(): Use basis=0 for 30/360 US

ACT/ACT ISDA

Uses actual days, split across year boundaries. Standard for government securities.

t=days in non-leap years365+days in leap years366t = \frac{\text{days in non-leap years}}{365} + \frac{\text{days in leap years}}{366}t=365days in non-leap years​+366days in leap years​

Variables

tttYear fraction

Assumptions

  • •Period split at January 1 of each year
  • •Each year portion uses that year's day count (365 or 366)
  • •Full intermediate years count as exactly 1.0

Industry Comparison

Excel YEARFRAC(): Use basis=1 for ACT/ACT

ACT/360

Actual days divided by 360. Common for money market instruments.

t=actual days360t = \frac{\text{actual days}}{360}t=360actual days​

Variables

tttYear fraction

Assumptions

  • •Simple actual day count
  • •Always divides by 360 regardless of leap year
  • •Results in year fractions > 1 for periods > 360 days

Industry Comparison

Excel YEARFRAC(): Use basis=2 for ACT/360

ACT/365 Fixed

Actual days divided by 365. Ignores leap years. Used for UK gilts and some Asian markets.

t=actual days365t = \frac{\text{actual days}}{365}t=365actual days​

Variables

tttYear fraction

Assumptions

  • •Fixed denominator of 365
  • •Does not adjust for leap years
  • •Simple and predictable

Industry Comparison

Excel YEARFRAC(): Use basis=3 for ACT/365

Accrued Interest

Coupon accrual and clean/dirty price relationship

Accrued Interest

The portion of the next coupon that has accrued to the seller since the last coupon date.

AI=Cm×taccruedtperiodAI = \frac{C}{m} \times \frac{t_{accrued}}{t_{period}}AI=mC​×tperiod​taccrued​​

Variables

AIAIAIAccrued interest (per 100 par)
CCCAnnual coupon rate (decimal)
mmmCoupon frequency per year
taccruedt_{accrued}taccrued​Year fraction from last coupon to settlement
tperiodt_{period}tperiod​Year fraction for the full coupon period

Assumptions

  • •Pro-rata accrual within coupon period
  • •Day count convention determines time fractions
  • •Buyer pays seller accrued at settlement

Industry Comparison

Excel ACCRINT(): Matches with same day count convention

Clean vs Dirty Price

The dirty (full) price includes accrued interest; the clean (quoted) price excludes it.

Pdirty=Pclean+AIP_{dirty} = P_{clean} + AIPdirty​=Pclean​+AI

Variables

PdirtyP_{dirty}Pdirty​Dirty/full price (actual settlement amount per 100)
PcleanP_{clean}Pclean​Clean/quoted price (for comparability)
AIAIAIAccrued interest

Assumptions

  • •Clean prices are quoted for comparability across bonds
  • •Dirty price is the actual amount paid at settlement
  • •Settlement amount = (Dirty / 100) × Notional

Portfolio Aggregation

Multi-asset calculations and currency conversion

Market-Value Weighted Metrics

Portfolio-level metrics are computed as market-value weighted averages of individual holdings.

Xportfolio=∑iwi⋅Xi∑iwiX_{portfolio} = \frac{\sum_i w_i \cdot X_i}{\sum_i w_i}Xportfolio​=∑i​wi​∑i​wi​⋅Xi​​

Variables

XportfolioX_{portfolio}Xportfolio​Portfolio-level metric (e.g., duration, yield)
XiX_iXi​Metric for holding i
wiw_iwi​Market value of holding i (in display currency)

Assumptions

  • •All values converted to display currency before weighting
  • •Weights are positive market values
  • •Simple weighted average (not duration-weighted for some metrics)

FX Cross-Rate Calculation

Converts between currencies using triangulation through a base currency (USD).

FROMTO=1rates[FROM]×rates[TO]\frac{FROM}{TO} = \frac{1}{\text{rates}[FROM]} \times \text{rates}[TO]TOFROM​=rates[FROM]1​×rates[TO]

Variables

FROMFROMFROMSource currency
TOTOTOTarget currency
ratesratesratesMap of currency → units per 1 USD

Assumptions

  • •USD is the base currency for rate quotes
  • •All rates quoted as: 1 USD = X currency
  • •Cross rates derived via USD triangulation

Industry Comparison

ECB rates: Primary source; EUR-based, converted to USD base

Portfolio Shock Analysis

Estimates P&L impact of rate/spread shocks using duration approximation.

ΔP≈−Dmod×P×Δy\Delta P \approx -D_{mod} \times P \times \Delta yΔP≈−Dmod​×P×Δy

Variables

ΔP\Delta PΔPEstimated price change
DmodD_{mod}Dmod​Modified duration
PPPCurrent price
Δy\Delta yΔyYield shock (decimal)

Assumptions

  • •Linear approximation (first-order only)
  • •Ignores convexity (underestimates gains, overestimates losses)
  • •Assumes parallel shift across all holdings

Portfolio Analytics

Efficient frontier optimization, Monte Carlo simulation, and risk metrics (VaR, CVaR)

Portfolio Variance

The variance of portfolio returns depends on individual asset variances and their covariances. This is the foundation of Modern Portfolio Theory (Markowitz, 1952).

σp2=wTΣw=∑i=1n∑j=1nwiwjσij\sigma_p^2 = \mathbf{w}^T \mathbf{\Sigma} \mathbf{w} = \sum_{i=1}^{n} \sum_{j=1}^{n} w_i w_j \sigma_{ij}σp2​=wTΣw=i=1∑n​j=1∑n​wi​wj​σij​

Variables

σp2\sigma_p^2σp2​Portfolio variance
w\mathbf{w}wVector of asset weights (sum to 1)
Σ\mathbf{\Sigma}ΣCovariance matrix of asset returns
σij\sigma_{ij}σij​Covariance between assets i and j

Assumptions

  • •Weights sum to 1 (fully invested)
  • •Returns are multivariate normal
  • •Covariance matrix is estimated from historical data
  • •Past correlations persist in the future

Industry Comparison

Bloomberg PORT: Uses same formula; may apply shrinkage to covariance matrix
BARRA: Uses factor model covariance instead of sample covariance

Efficient Frontier (Mean-Variance Optimization)

Finds the set of portfolios offering the lowest variance for each level of expected return. We solve the exact mean-variance quadratic program (QP) — each frontier point minimizes variance subject to a target return, a fully-invested budget, and box constraints — via a primal active-set method, then sweep the target return from the global minimum-variance (GMV) portfolio up to the maximum feasible return. The maximum-Sharpe (tangency) portfolio is the point on this frontier with the steepest line from the risk-free rate.

min⁡w12 wTΣ ws.t.1Tw=1,    μTw=t,    L≤wi≤U\min_{\mathbf{w}} \tfrac{1}{2}\,\mathbf{w}^T \mathbf{\Sigma}\,\mathbf{w} \quad \text{s.t.} \quad \mathbf{1}^T\mathbf{w}=1, \;\; \boldsymbol{\mu}^T\mathbf{w}=t, \;\; L \le w_i \le Uwmin​21​wTΣws.t.1Tw=1,μTw=t,L≤wi​≤U

Variables

w\mathbf{w}wAsset weight vector to optimize
μ\boldsymbol{\mu}μVector of expected returns (annualized)
Σ\mathbf{\Sigma}ΣCovariance matrix (annualized, positive definite)
tttTarget portfolio return swept along the frontier
L, UL,\,UL,UPer-asset weight box (long-only when L = 0)

Assumptions

  • •Exact convex QP (primal active-set), not a grid-search approximation
  • •Long-only box constraints (0 ≤ wᵢ ≤ maxWeight) on the public endpoint
  • •Covariance matrix must be positive definite (no ridge regularization)
  • •GMV closed form Σ⁻¹1/(1ᵀΣ⁻¹1) and tangency Σ⁻¹(μ−rf·1)/(1ᵀΣ⁻¹(μ−rf·1)) recover the unconstrained solutions when the box does not bind
  • •Expected returns estimated from the historical mean — the usual mean-variance input sensitivity applies

Industry Comparison

Bloomberg PORT: Also uses a quadratic-programming solver for exact mean-variance optimization
Excel Solver: GRG Nonlinear / Simplex; equivalent optimum on the same convex QP

Sharpe Ratio

Measures risk-adjusted return: the excess return per unit of volatility. The tangency portfolio has the highest Sharpe ratio on the efficient frontier.

SR=E[Rp]−RfσpSR = \frac{E[R_p] - R_f}{\sigma_p}SR=σp​E[Rp​]−Rf​​

Variables

SRSRSRSharpe ratio
E[Rp]E[R_p]E[Rp​]Expected portfolio return (annualized)
RfR_fRf​Risk-free rate (annualized)
σp\sigma_pσp​Portfolio volatility (annualized)

Assumptions

  • •Risk-free rate input by user (default 4%)
  • •Returns are normally distributed
  • •Excess return is the only measure of value
  • •Volatility is the only measure of risk

Industry Comparison

Morningstar: Uses same formula; may adjust for survivorship bias

Capital Market Line (CML)

Shows the risk-return trade-off for portfolios combining the risk-free asset with the tangency (max Sharpe) portfolio.

E[R]=Rf+E[Rm]−Rfσm⋅σE[R] = R_f + \frac{E[R_m] - R_f}{\sigma_m} \cdot \sigmaE[R]=Rf​+σm​E[Rm​]−Rf​​⋅σ

Variables

E[R]E[R]E[R]Expected return on CML portfolio
RfR_fRf​Risk-free rate
E[Rm]E[R_m]E[Rm​]Expected return of tangency portfolio
σm\sigma_mσm​Volatility of tangency portfolio
σ\sigmaσTarget portfolio volatility

Assumptions

  • •Investors can borrow/lend at the risk-free rate
  • •No transaction costs or taxes
  • •All investors have homogeneous expectations

Sample Covariance Matrix

Estimates the covariance structure from historical returns. We use sample covariance with n-1 denominator (Bessel's correction).

σ^ij=1T−1∑t=1T(ri,t−rˉi)(rj,t−rˉj)\hat{\sigma}_{ij} = \frac{1}{T-1} \sum_{t=1}^{T} (r_{i,t} - \bar{r}_i)(r_{j,t} - \bar{r}_j)σ^ij​=T−11​t=1∑T​(ri,t​−rˉi​)(rj,t​−rˉj​)

Variables

σ^ij\hat{\sigma}_{ij}σ^ij​Estimated covariance between assets i and j
ri,tr_{i,t}ri,t​Return of asset i at time t
rˉi\bar{r}_irˉi​Mean return of asset i
TTTNumber of observations (default 252 days = 1 year)

Assumptions

  • •Returns are stationary (stable over time)
  • •Sample size is sufficient for reliable estimates
  • •No structural breaks in correlation regime
  • •Simple sample estimator (no shrinkage)

Industry Comparison

Bloomberg: Often uses Ledoit-Wolf shrinkage for more stable estimates
BARRA/Axioma: Uses factor models to reduce estimation error

Monte Carlo Simulation (Geometric Brownian Motion)

Projects portfolio value using correlated random walks. Each asset follows a log-normal process, which is the standard model in finance (same assumption as Black-Scholes).

St+Δt=St⋅exp⁡[(μ−σ22)Δt+σΔt⋅Z]S_{t+\Delta t} = S_t \cdot \exp\left[(\mu - \frac{\sigma^2}{2})\Delta t + \sigma \sqrt{\Delta t} \cdot Z\right]St+Δt​=St​⋅exp[(μ−2σ2​)Δt+σΔt​⋅Z]

Variables

StS_tSt​Asset price at time t
μ\muμExpected return (drift)
σ\sigmaσVolatility
Δt\Delta tΔtTime step (1 month)
ZZZStandard normal random variable

Assumptions

  • •Returns are log-normally distributed
  • •Volatility and correlations are constant
  • •No jumps or regime changes
  • •Monthly time steps for computational efficiency

Industry Comparison

RiskMetrics: Similar approach; may use GARCH for time-varying volatility
Bloomberg MARS: Uses more complex models for derivatives

Cholesky Decomposition for Correlated Simulation

Transforms independent random variables into correlated ones using the Cholesky decomposition of the covariance matrix. This is the standard method in finance.

X=L⋅Z,where Σ=LLT\mathbf{X} = \mathbf{L} \cdot \mathbf{Z}, \quad \text{where } \mathbf{\Sigma} = \mathbf{L} \mathbf{L}^TX=L⋅Z,where Σ=LLT

Variables

X\mathbf{X}XCorrelated random vector
L\mathbf{L}LLower triangular Cholesky factor
Z\mathbf{Z}ZVector of independent standard normals
Σ\mathbf{\Sigma}ΣTarget covariance matrix

Assumptions

  • •Covariance matrix is positive semi-definite
  • •Small regularization (10^-10) added for numerical stability
  • •Independent normals generated via Box-Muller transform

Industry Comparison

All major risk systems: Cholesky is the universal standard for correlated simulation

Value at Risk (Historical Simulation VaR)

Estimates the maximum loss at a given confidence level. We use the percentile of simulated terminal values (historical simulation approach).

VaRα=Initial Value−Percentile1−α(Terminal Values)\text{VaR}_{\alpha} = \text{Initial Value} - \text{Percentile}_{1-\alpha}(\text{Terminal Values})VaRα​=Initial Value−Percentile1−α​(Terminal Values)

Variables

VaRα\text{VaR}_{\alpha}VaRα​Value at Risk at α confidence (e.g., 95%)
α\alphaαConfidence level (0.95 or 0.99)
1−α1-\alpha1−αLeft tail percentile (5% or 1%)

Assumptions

  • •Simulated returns from Monte Carlo paths
  • •VaR reported as positive loss amount
  • •Horizon-specific (not scaled by square-root of time)
  • •Does not indicate severity beyond VaR threshold

Industry Comparison

Basel III/IV: Requires historical simulation or internal models
RiskMetrics: Also offers parametric VaR using delta-normal method

CVaR / Expected Shortfall

The average loss in the worst α% of scenarios. Unlike VaR, CVaR tells you how bad losses are when they exceed VaR. Required by Basel III for market risk.

CVaRα=E[Loss∣Loss>VaRα]=1ntail∑i:Li>VaRLi\text{CVaR}_{\alpha} = E[\text{Loss} \mid \text{Loss} > \text{VaR}_{\alpha}] = \frac{1}{n_{tail}} \sum_{i: L_i > \text{VaR}} L_iCVaRα​=E[Loss∣Loss>VaRα​]=ntail​1​i:Li​>VaR∑​Li​

Variables

CVaRα\text{CVaR}_{\alpha}CVaRα​Conditional VaR / Expected Shortfall at α
ntailn_{tail}ntail​Number of observations in tail (worst 5%)
LiL_iLi​Loss in scenario i

Assumptions

  • •Simple average of losses beyond VaR threshold
  • •More conservative than VaR (always ≥ VaR)
  • •Coherent risk measure (subadditive)
  • •Sensitive to tail distribution shape

Industry Comparison

Basel III: Required for market risk capital; called Expected Shortfall
Solvency II: Insurance uses similar tail-based risk measures

Bond Return Proxy (Duration Approximation)

For bonds without direct price history, we proxy returns using UST yield changes and duration. This captures rate sensitivity but not credit spread movements.

rbond≈c252−Dmod⋅Δyr_{bond} \approx \frac{c}{252} - D_{mod} \cdot \Delta yrbond​≈252c​−Dmod​⋅Δy

Variables

rbondr_{bond}rbond​Daily bond return estimate
cccAnnual coupon rate (decimal)
DmodD_{mod}Dmod​Modified duration
Δy\Delta yΔyDaily change in benchmark UST yield

Assumptions

  • •UST benchmark matched by duration: ^IRX (3M), ^FVX (5Y), ^TNX (10Y), ^TYX (30Y)
  • •Credit spread held constant (rates-only proxy)
  • •Linear duration approximation (ignores convexity)
  • •Daily carry approximated as annual coupon / 252

Industry Comparison

Bloomberg BRTN: Uses actual price changes; more accurate for corporate bonds

Curriculum reference

  • •CFA L1 Portfolio Management: Portfolio Risk and Return Part I
  • •CFA L1 Portfolio Management: Portfolio Risk and Return Part II
  • •CFA L2 Portfolio Management: Measuring and Managing Market Risk

Equity Valuation

DCF (2-stage, 3-stage, reverse), FCFE, WACC (CAPM four-component), DDM (Gordon Growth, H-Model), and comparable company analysis

Weighted Average Cost of Capital (WACC)

WACC blends the after-tax cost of each capital component weighted by its share of total capital. It serves as the discount rate for unlevered free cash flows in DCF models.

WACC=wE⋅kE+wD⋅kD(1−t)kE=Rf+β⋅ERP+CRP+SPkD=∣Interest Expense∣Total Debt×(1−t)\begin{aligned} \text{WACC} &= w_E \cdot k_E + w_D \cdot k_D(1 - t) \\ k_E &= R_f + \beta \cdot \text{ERP} + \text{CRP} + \text{SP} \\ k_D &= \frac{|\text{Interest Expense}|}{\text{Total Debt}} \times (1 - t) \end{aligned}WACCkE​kD​​=wE​⋅kE​+wD​⋅kD​(1−t)=Rf​+β⋅ERP+CRP+SP=Total Debt∣Interest Expense∣​×(1−t)​

Variables

wE,wDw_E, w_DwE​,wD​Market-value weights of equity and debt
kEk_EkE​Cost of equity (CAPM, four-component)
kDk_DkD​Pre-tax cost of debt (implied from financials)
tttEffective tax rate
RfR_fRf​Risk-free rate (10-year UST; FRED DGS10)
β\betaβEquity beta (FMP live; falls back to Damodaran industry median)
ERP\text{ERP}ERPEquity risk premium (Damodaran implied; fallback 4.60%)
CRP\text{CRP}CRPCountry risk premium (Damodaran; 0 for US)
SP\text{SP}SPSize premium (user-specified; default 0)

Assumptions

  • •Beta is re-levered via Hamada equation when using unlevered industry median
  • •Cost of debt derived from income statement; not yield-to-maturity on outstanding bonds
  • •Risk-free rate falls back to 4.25% when FRED is unavailable
  • •Tax rate sourced from income statement or Damodaran sector median; fallback 21%

Industry Comparison

Bloomberg WACC function: Uses market-implied beta and YTM-based cost of debt; more precise for large-cap listed firms

Hamada Equation — Beta (Un)levering

The Hamada equation adjusts equity beta for financial leverage, allowing industry-median unlevered betas to be re-levered to a firm's specific capital structure.

βU=βL1+(1−t)⋅D/EβL=βU⋅[1+(1−t)⋅D/E]\begin{aligned} \beta_U &= \frac{\beta_L}{1 + (1 - t) \cdot D/E} \\ \beta_L &= \beta_U \cdot \left[1 + (1 - t) \cdot D/E\right] \end{aligned}βU​βL​​=1+(1−t)⋅D/EβL​​=βU​⋅[1+(1−t)⋅D/E]​

Variables

βL\beta_LβL​Levered (observed) equity beta
βU\beta_UβU​Unlevered (asset) beta
D/ED/ED/EDebt-to-equity ratio at market values
tttEffective tax rate

Assumptions

  • •Assumes debt is risk-free (Miles–Ezzell and Harris–Pringle adjustments not applied)
  • •Tax shield assumed to be permanent (perpetual rebalancing ignored)

Two-Stage Discounted Cash Flow

The standard DCF model discounts explicit free cash flows (FCFs) during a forecast period, then adds the present value of a terminal value representing the going-concern business beyond the forecast.

V0=∑t=1NFCFt(1+WACC)t−0.5⋅1mid+TV(1+WACC)NFCFt=FCF1⋅(1+g1)t−1TVGordon=FCFN⋅(1+gT)WACC−gT,WACC>gTTVexit=EV/EBITDA×EBITDANP0=V0−Net DebtShares Outstanding\begin{aligned} V_0 &= \sum_{t=1}^{N} \frac{\text{FCF}_t}{(1 + \text{WACC})^{t - 0.5 \cdot \mathbf{1}_{\text{mid}}}} + \frac{\text{TV}}{(1 + \text{WACC})^{N}} \\ \text{FCF}_t &= \text{FCF}_1 \cdot (1 + g_1)^{t-1} \\ \text{TV}_{\text{Gordon}} &= \frac{\text{FCF}_N \cdot (1 + g_T)}{\text{WACC} - g_T}, \quad \text{WACC} > g_T \\ \text{TV}_{\text{exit}} &= \text{EV/EBITDA} \times \text{EBITDA}_N \\ P_0 &= \frac{V_0 - \text{Net Debt}}{\text{Shares Outstanding}} \end{aligned}V0​FCFt​TVGordon​TVexit​P0​​=t=1∑N​(1+WACC)t−0.5⋅1mid​FCFt​​+(1+WACC)NTV​=FCF1​⋅(1+g1​)t−1=WACC−gT​FCFN​⋅(1+gT​)​,WACC>gT​=EV/EBITDA×EBITDAN​=Shares OutstandingV0​−Net Debt​​

Variables

FCFt\text{FCF}_tFCFt​Free cash flow to firm in year t
g1g_1g1​Stage-1 growth rate (constant over forecast)
gTg_TgT​Terminal (long-run) growth rate
WACC\text{WACC}WACCWeighted average cost of capital
NNNLength of explicit forecast period (years)
1mid\mathbf{1}_{\text{mid}}1mid​1 if mid-year convention active, else 0
TV\text{TV}TVTerminal value (Gordon Growth or exit multiple)

Assumptions

  • •Mid-year convention applies only to explicit-period FCFs; terminal value is always discounted at end of year N
  • •Gordon Growth terminal value is undefined when WACC ≤ g_T (returns null)
  • •Net debt subtracted at enterprise-to-equity bridge (EV − Net Debt = Equity Value)

Industry Comparison

Bloomberg DSCF: Consensus estimates for explicit period; same Gordon terminal value formula

Three-Stage DCF with Linear Growth Fade

An extension of the two-stage model that inserts a transition period (Stage 2) during which the growth rate decays linearly from a near-term rate to the terminal rate, before the Gordon Growth perpetuity.

gt(2)=g2,start+(g2,end−g2,start)⋅tN2V0=∑t=1N1FCFt(1+WACC)t+∑t=N1+1N1+N2FCFt(1+WACC)t+TV(1+WACC)N1+N2\begin{aligned} g_t^{(2)} &= g_{2,\text{start}} + (g_{2,\text{end}} - g_{2,\text{start}}) \cdot \frac{t}{N_2} \\ V_0 &= \sum_{t=1}^{N_1} \frac{\text{FCF}_t}{(1+\text{WACC})^t} + \sum_{t=N_1+1}^{N_1+N_2} \frac{\text{FCF}_t}{(1+\text{WACC})^t} + \frac{\text{TV}}{(1+\text{WACC})^{N_1+N_2}} \end{aligned}gt(2)​V0​​=g2,start​+(g2,end​−g2,start​)⋅N2​t​=t=1∑N1​​(1+WACC)tFCFt​​+t=N1​+1∑N1​+N2​​(1+WACC)tFCFt​​+(1+WACC)N1​+N2​TV​​

Variables

N1N_1N1​Length of Stage 1 (constant high growth)
N2N_2N2​Length of Stage 2 (linear fade period)
g2,startg_{2,\text{start}}g2,start​Growth rate at start of fade (equals Stage 1 rate)
g2,endg_{2,\text{end}}g2,end​Growth rate at end of fade (equals terminal rate)

Assumptions

  • •Linear interpolation in Stage 2 is a simplification; H-model (DDM) uses the same linearity assumption
  • •Stage 2 growth can be above WACC temporarily; only the terminal rate must satisfy g_T < WACC

Reverse DCF — Implied Growth Rate

The reverse DCF inverts the valuation model: given the market price, it solves for the Stage-1 growth rate that equates the DCF value to the current stock price, revealing the market's implicit growth expectation.

g∗=arg⁡min⁡g∣P0DCF(g)−P0market∣g^* = \arg\min_{g} \left| P_0^{\text{DCF}}(g) - P_0^{\text{market}} \right|g∗=arggmin​​P0DCF​(g)−P0market​​

Variables

g∗g^*g∗Implied growth rate (bisection solution)
P0DCF(g)P_0^{\text{DCF}}(g)P0DCF​(g)DCF-implied price as a function of Stage-1 growth
P0marketP_0^{\text{market}}P0market​Current market price

Assumptions

  • •Solved via bisection over the interval [−50%, 100%]; bracket expands up to 500% if needed
  • •All other DCF inputs (WACC, terminal growth, forecast years) are held constant
  • •Returns null when no solution is found within the search range

Free Cash Flow to Equity (FCFE) Model

The FCFE model discounts cash flows available to equity holders directly, bypassing the enterprise-to-equity bridge. The cost of equity (not WACC) is used as the discount rate.

FCFE=NI+D&A−CapEx−ΔWC+Net BorrowingP0=∑t=1NFCFEt(1+kE)t+TV(1+kE)N\begin{aligned} \text{FCFE} &= \text{NI} + D\&A - \text{CapEx} - \Delta\text{WC} + \text{Net Borrowing} \\ P_0 &= \sum_{t=1}^{N} \frac{\text{FCFE}_t}{(1 + k_E)^t} + \frac{\text{TV}}{(1 + k_E)^N} \end{aligned}FCFEP0​​=NI+D&A−CapEx−ΔWC+Net Borrowing=t=1∑N​(1+kE​)tFCFEt​​+(1+kE​)NTV​​

Variables

NI\text{NI}NINet income
D&AD\&AD&ADepreciation and amortisation
CapEx\text{CapEx}CapExCapital expenditures
ΔWC\Delta\text{WC}ΔWCChange in working capital
Net Borrowing\text{Net Borrowing}Net BorrowingNew debt issuance minus repayment
kEk_EkE​Cost of equity

Assumptions

  • •No net debt subtraction at bridge (equity cash flows are already post-debt-service)
  • •Terminal value uses the same Gordon Growth formula with k_E as the discount rate

Gordon Growth Model (DDM — Single Stage)

The Gordon Growth Model values a stock as the present value of its perpetually growing dividend stream, assuming a constant growth rate forever.

P0=D0⋅(1+g)r−g,r>gP_0 = \frac{D_0 \cdot (1 + g)}{r - g}, \quad r > gP0​=r−gD0​⋅(1+g)​,r>g

Variables

D0D_0D0​Most recent annual dividend per share
gggConstant long-term dividend growth rate
rrrRequired rate of return (cost of equity)

Assumptions

  • •Model is undefined (returns null) when r ≤ g
  • •Assumes a stable, mature firm with dividends growing at a sustainable rate
  • •Appropriate only for dividend-paying firms in steady state

Industry Comparison

CFA Level I curriculum: Standard single-stage Gordon Growth formulation

H-Model (DDM — Two Stage with Linear Decay)

The H-Model extends the Gordon Growth Model by allowing the dividend growth rate to decline linearly from a high short-term rate to a sustainable long-term rate over a transition period. H = half-life of the high-growth phase.

P0=D0(1+gL)r−gL+D0⋅H⋅(gS−gL)r−gLH=High-Growth Years2\begin{aligned} P_0 &= \frac{D_0 (1 + g_L)}{r - g_L} + \frac{D_0 \cdot H \cdot (g_S - g_L)}{r - g_L} \\ H &= \frac{\text{High-Growth Years}}{2} \end{aligned}P0​H​=r−gL​D0​(1+gL​)​+r−gL​D0​⋅H⋅(gS​−gL​)​=2High-Growth Years​​

Variables

gSg_SgS​Short-term (initial) dividend growth rate
gLg_LgL​Long-term (terminal) dividend growth rate
HHHHalf the high-growth period (years)
rrrRequired rate of return

Assumptions

  • •Model is undefined (returns null) when r ≤ g_L
  • •Temporary high-growth phase (g_S > r) is permitted; only g_L ≥ r makes terminal value blow up
  • •Linear growth decay is an approximation — actual transitions rarely follow a straight line

Industry Comparison

CFA Level II curriculum (LM: Equity Valuation): Standard H-Model formulation; widely used for emerging-market firms with transitional growth

Comparable Company Analysis (Comps)

Comps derives implied equity value by applying peer-group trading multiples to the target firm's fundamentals. The model triangulates across price and enterprise-value multiples.

Implied Mkt CapP/E=Multiple×Net IncomeImplied Mkt CapP/S=Multiple×RevenueImplied EVEV/EBITDA=Multiple×EBITDAEquity Value=Implied EV−Net DebtP0=Equity ValueShares Outstanding\begin{aligned} \text{Implied Mkt Cap}_{P/E} &= \text{Multiple} \times \text{Net Income} \\ \text{Implied Mkt Cap}_{P/S} &= \text{Multiple} \times \text{Revenue} \\ \text{Implied EV}_{\text{EV/EBITDA}} &= \text{Multiple} \times \text{EBITDA} \\ \text{Equity Value} &= \text{Implied EV} - \text{Net Debt} \\ P_0 &= \frac{\text{Equity Value}}{\text{Shares Outstanding}} \end{aligned}Implied Mkt CapP/E​Implied Mkt CapP/S​Implied EVEV/EBITDA​Equity ValueP0​​=Multiple×Net Income=Multiple×Revenue=Multiple×EBITDA=Implied EV−Net Debt=Shares OutstandingEquity Value​​

Variables

Multiple\text{Multiple}MultiplePeer-group median or mean ratio (P/E, P/S, EV/EBITDA, EV/FCF)
Net Debt\text{Net Debt}Net DebtTotal debt minus cash (enterprise-to-equity bridge)

Assumptions

  • •Peer group selected from live /api/equity/peers endpoint; user can add or remove peers
  • •Multiples sourced from Financial Modeling Prep (FMP); fundamentals from SEC XBRL financials
  • •Negative or zero multiples excluded from peer statistics
  • •Football field chart shows min/max/median/mean range per metric

Industry Comparison

Bloomberg COMP: Uses real-time consensus estimates; Strata uses trailing twelve-month (TTM) actuals from SEC filings

Curriculum reference

  • •CFA L1 Corporate Issuers: Cost of Capital
  • •CFA L2 Equity: Return Concepts
  • •CFA L2 Equity: Free Cash Flow Valuation
  • •CFA L2 Equity: Discounted Dividend Valuation
  • •CFA L2 Equity: Market-Based Valuation: Price and Enterprise Value Multiples

Derivatives Pricing

Black-Scholes-Merton option pricing, Greeks, implied volatility, CRR binomial trees, forward and FX forward pricing, interest rate swaps, and CVA/DVA

Black-Scholes-Merton Option Pricing

The Merton (1973) extension of Black-Scholes prices European options on dividend-paying stocks using a continuous dividend yield. It is the foundation for all options analytics in the Derivatives Lab.

d1=ln⁡(S/K)+(r−δ+σ2/2)TσTd2=d1−σTC=Se−δTN(d1)−Ke−rTN(d2)P=Ke−rTN(−d2)−Se−δTN(−d1)\begin{aligned} d_1 &= \frac{\ln(S/K) + (r - \delta + \sigma^2/2)T}{\sigma\sqrt{T}} \\ d_2 &= d_1 - \sigma\sqrt{T} \\ C &= S e^{-\delta T} N(d_1) - K e^{-rT} N(d_2) \\ P &= K e^{-rT} N(-d_2) - S e^{-\delta T} N(-d_1) \end{aligned}d1​d2​CP​=σT​ln(S/K)+(r−δ+σ2/2)T​=d1​−σT​=Se−δTN(d1​)−Ke−rTN(d2​)=Ke−rTN(−d2​)−Se−δTN(−d1​)​

Variables

SSSCurrent spot price of the underlying
KKKStrike price
rrrContinuously compounded risk-free rate
δ\deltaδContinuous dividend yield
σ\sigmaσAnnualised volatility of the underlying
TTTTime to expiry in years
N(⋅)N(\cdot)N(⋅)Cumulative standard normal distribution

Assumptions

  • •European exercise only; use the CRR binomial tree for American options
  • •Constant volatility and risk-free rate (no term structure or smile)
  • •No transaction costs, taxes, or short-sale restrictions
  • •Continuous dividend yield; discrete dividends require PV-of-dividend adjustment

Industry Comparison

Bloomberg OVME: Uses local volatility or stochastic vol (Heston) surfaces; BSM is the flat-vol special case

Option Greeks

Greeks measure the sensitivity of an option's price to changes in the underlying parameters. They are the primary tools for hedging and risk management of options positions.

ΔC=e−δTN(d1),ΔP=−e−δTN(−d1)Γ=e−δTn(d1)SσTΘ=−Se−δTn(d1)σ2T−rKe−rTN(d2)+δSe−δTN(d1)(call, per day)V=Se−δTn(d1)T⋅0.01ρC=KTe−rTN(d2)⋅0.01\begin{aligned} \Delta_C &= e^{-\delta T} N(d_1), \quad \Delta_P = -e^{-\delta T} N(-d_1) \\ \Gamma &= \frac{e^{-\delta T} n(d_1)}{S \sigma \sqrt{T}} \\ \Theta &= -\frac{S e^{-\delta T} n(d_1) \sigma}{2\sqrt{T}} - rK e^{-rT} N(d_2) + \delta S e^{-\delta T} N(d_1) \quad \text{(call, per day)} \\ \mathcal{V} &= S e^{-\delta T} n(d_1) \sqrt{T} \cdot 0.01 \\ \rho_C &= K T e^{-rT} N(d_2) \cdot 0.01 \end{aligned}ΔC​ΓΘVρC​​=e−δTN(d1​),ΔP​=−e−δTN(−d1​)=SσT​e−δTn(d1​)​=−2T​Se−δTn(d1​)σ​−rKe−rTN(d2​)+δSe−δTN(d1​)(call, per day)=Se−δTn(d1​)T​⋅0.01=KTe−rTN(d2​)⋅0.01​

Variables

Δ\DeltaΔPrice change per unit move in underlying
Γ\GammaΓRate of change of delta per unit move in underlying
Θ\ThetaΘPrice decay per calendar day (annual theta / 365)
V\mathcal{V}VPrice change per 1% increase in implied volatility
ρ\rhoρPrice change per 1% increase in risk-free rate
n(⋅)n(\cdot)n(⋅)Standard normal probability density function

Assumptions

  • •Theta is scaled to per-calendar-day by dividing annual theta by 365
  • •Vega and rho are scaled per 1% change (divided by 100) for practical interpretation
  • •Greeks assume all other parameters remain constant (no cross-Greeks)

Implied Volatility (Newton–Raphson)

Implied volatility is the volatility value that equates the BSM model price to a given market price. It is solved numerically using Newton–Raphson iteration with an adaptive initial seed.

σn+1=σn−VBSM(σn)−VmarketV(σn)σ0={0.20∣ln⁡(S/K)∣<0.050.35∣ln⁡(S/K)∣<0.200.60otherwise\begin{aligned} \sigma_{n+1} &= \sigma_n - \frac{V^{\text{BSM}}(\sigma_n) - V^{\text{market}}}{\mathcal{V}(\sigma_n)} \\ \sigma_0 &= \begin{cases} 0.20 & |\ln(S/K)| < 0.05 \\ 0.35 & |\ln(S/K)| < 0.20 \\ 0.60 & \text{otherwise} \end{cases} \end{aligned}σn+1​σ0​​=σn​−V(σn​)VBSM(σn​)−Vmarket​=⎩⎨⎧​0.200.350.60​∣ln(S/K)∣<0.05∣ln(S/K)∣<0.20otherwise​​

Variables

VmarketV^{\text{market}}VmarketObserved market option price
VBSM(σn)V^{\text{BSM}}(\sigma_n)VBSM(σn​)BSM model price at iteration n
V(σn)\mathcal{V}(\sigma_n)V(σn​)BSM vega at current sigma estimate

Assumptions

  • •Maximum 50 iterations; convergence tolerance 1×10⁻⁷
  • •Returns null if vega falls below 1×10⁻¹⁰ (deep in-the-money or near-zero time)
  • •ATM seed 0.20 reflects typical equity vol; deep-OTM seed 0.60 improves convergence for skewed options

Cox-Ross-Rubinstein (CRR) Binomial Tree

The CRR model discretises the stock price process into an up-down tree and prices options via backward induction. American options can be exercised early at any node.

u=eσΔt,d=1up∗=e(r−δ)Δt−du−dVn,j=e−rΔt[p∗Vn+1,j+1+(1−p∗)Vn+1,j]Vn,jAm=max⁡ ⁣(Vn,jhold,  (Sn,j−K)+)\begin{aligned} u &= e^{\sigma\sqrt{\Delta t}}, \quad d = \tfrac{1}{u} \\ p^* &= \frac{e^{(r - \delta)\Delta t} - d}{u - d} \\ V_{n,j} &= e^{-r\Delta t} \left[ p^* V_{n+1,j+1} + (1-p^*) V_{n+1,j} \right] \\ V_{n,j}^{\text{Am}} &= \max\!\left(V_{n,j}^{\text{hold}},\; (S_{n,j} - K)^+\right) \end{aligned}up∗Vn,j​Vn,jAm​​=eσΔt​,d=u1​=u−de(r−δ)Δt−d​=e−rΔt[p∗Vn+1,j+1​+(1−p∗)Vn+1,j​]=max(Vn,jhold​,(Sn,j​−K)+)​

Variables

u,du, du,dUp and down factors for the stock price tree
p∗p^*p∗Risk-neutral probability of an up move (using cost-of-carry r−δ)
Δt=T/n\Delta t = T/nΔt=T/nLength of each time step
Vn,jV_{n,j}Vn,j​Option value at step n with j up-moves
Sn,jS_{n,j}Sn,j​Stock price at node (n, j): S₀ × u^j × d^(n−j)

Assumptions

  • •Risk-neutral probability uses cost-of-carry (r−δ) to account for continuous dividends
  • •CRR tree converges to BSM as n → ∞
  • •American early exercise compared node-by-node: exercise if intrinsic > continuation value
  • •Visualisation limited to 1–3 steps; full pricing uses more steps internally

Industry Comparison

CFA Level II curriculum (LM 32: Valuation of Contingent Claims): Standard two-period CRR tree formulation; Strata extends to n-period

Forward and FX Forward Pricing

Forward prices are derived from the no-arbitrage cost-of-carry relationship. For equities with discrete dividends, the present value of dividends is subtracted from the spot price before compounding.

F0(T)=(S0−PV(Div))erTF0(T)yield=S0⋅e(r−δ)TFd/f=Sd/f⋅e(rd−rf)T(CIRP)Fwd Pts=(F−S)×10,000\begin{aligned} F_0(T) &= \left(S_0 - \text{PV}(\text{Div})\right) e^{rT} \\ F_0(T)^{\text{yield}} &= S_0 \cdot e^{(r - \delta)T} \\ F^{d/f} &= S^{d/f} \cdot e^{(r_d - r_f)T} \quad \text{(CIRP)} \\ \text{Fwd Pts} &= (F - S) \times 10{,}000 \end{aligned}F0​(T)F0​(T)yieldFd/fFwd Pts​=(S0​−PV(Div))erT=S0​⋅e(r−δ)T=Sd/f⋅e(rd​−rf​)T(CIRP)=(F−S)×10,000​

Variables

S0S_0S0​Current spot price
PV(Div)\text{PV}(\text{Div})PV(Div)Present value of discrete dividends paid before T
δ\deltaδContinuous dividend yield
rd,rfr_d, r_frd​,rf​Domestic and foreign continuously compounded risk-free rates
Fd/fF^{d/f}Fd/fForward exchange rate (domestic per foreign)

Assumptions

  • •Continuous compounding throughout; no bid-ask spread or transaction costs
  • •CIRP assumes free capital flows and no currency controls

Forward Rate Agreement (FRA) Settlement

An FRA locks in a borrowing or lending rate for a future period. At settlement, the present value of the difference between the contracted rate and the prevailing market rate is exchanged.

Settlement=(L−FRA)×N×days/basis1+L×days/basis\text{Settlement} = \frac{(L - \text{FRA}) \times N \times \text{days}/\text{basis}}{1 + L \times \text{days}/\text{basis}}Settlement=1+L×days/basis(L−FRA)×N×days/basis​

Variables

LLLSettlement reference rate (e.g., SOFR)
FRA\text{FRA}FRAContracted FRA rate
NNNNotional principal
days/basis\text{days}/\text{basis}days/basisAccrual fraction (Act/360 for USD)

Assumptions

  • •Payment discounted back to settlement date at prevailing reference rate
  • •Positive settlement value favours the fixed-rate receiver when L > FRA

Interest Rate Swap Pricing

An at-market IRS requires no upfront payment. The par (fixed) swap rate is set so the fixed and floating legs have equal present value. Mid-life value reflects the change in the discount curve since inception.

SFR=1−DFN∑i=1NDFi⋅δiVfloat=NVfixed=N⋅SFR⋅∑i=1NDFi⋅δi+N⋅DFNVswappay-fixed=Vfloat−Vfixed\begin{aligned} \text{SFR} &= \frac{1 - DF_N}{\sum_{i=1}^{N} DF_i \cdot \delta_i} \\ V_{\text{float}} &= N \\ V_{\text{fixed}} &= N \cdot \text{SFR} \cdot \sum_{i=1}^{N} DF_i \cdot \delta_i + N \cdot DF_N \\ V_{\text{swap}}^{\text{pay-fixed}} &= V_{\text{float}} - V_{\text{fixed}} \end{aligned}SFRVfloat​Vfixed​Vswappay-fixed​​=∑i=1N​DFi​⋅δi​1−DFN​​=N=N⋅SFR⋅i=1∑N​DFi​⋅δi​+N⋅DFN​=Vfloat​−Vfixed​​

Variables

SFR\text{SFR}SFRPar swap fixed rate
DFiDF_iDFi​Discount factor at payment date i
δi\delta_iδi​Day-count fraction for period i
NNNNotional principal
VfloatV_{\text{float}}Vfloat​Floating leg value (equals par at each reset)

Assumptions

  • •Floating leg resets to par at each coupon date under the floating-rate bond analogy
  • •Discount factors derived from the bootstrapped SOFR zero curve
  • •DV01 computed by bumping the entire zero curve by 1 basis point
  • •⚠ Model scope: a single-curve construction — one SOFR zero curve both discounts the swap and implies the floating leg (V_float = N at reset). This is the CFA Level II curriculum convention, not a modern multi-curve (OIS-discount + separate forwarding) desk model.
  • •⚠ Stylized conventions: idealized period times (Tᵢ = i / frequency) and a constant day-count fraction δ = round(365 / frequency) / basis, with continuous compounding. Methodologically transparent and directionally meaningful, but not calendar-accurate — and the USD swap curve is itself estimated (see Data Sources). Values are not intended for trade execution.

Industry Comparison

CFA Level II curriculum (Swap Valuation): Standard fixed-rate bond / floating-rate bond decomposition

Credit Valuation Adjustment (CVA) and DVA

CVA captures the expected loss from counterparty default on an OTC derivative. DVA is the symmetric adjustment for own credit risk. BCVA (Bilateral CVA) is the net of both.

λ=Spreadcp10,000×LGDcp,PD(t)=1−e−λtEE(t)=DV01⋅T−tT⋅σr⋅t⋅φ(0)NEE(t)=EE(t)CVA=−∑iLGDcp⋅DFi⋅EE(ti)⋅ΔPDcp,iDVA=+∑iLGDown⋅DFi⋅NEE(ti)⋅ΔPDown,iBCVA=CVA+DVA\begin{aligned} \lambda &= \frac{\text{Spread}_{\text{cp}}}{10{,}000 \times \text{LGD}_{\text{cp}}}, \quad \text{PD}(t) = 1 - e^{-\lambda t} \\ \text{EE}(t) &= \text{DV01} \cdot \sqrt{\tfrac{T - t}{T}} \cdot \sigma_{r} \cdot \sqrt{t} \cdot \varphi(0) \\ \text{NEE}(t) &= \text{EE}(t) \\ \text{CVA} &= -\sum_{i} \text{LGD}_{\text{cp}} \cdot DF_i \cdot \text{EE}(t_i) \cdot \Delta\text{PD}_{\text{cp},i} \\ \text{DVA} &= +\sum_{i} \text{LGD}_{\text{own}} \cdot DF_i \cdot \text{NEE}(t_i) \cdot \Delta\text{PD}_{\text{own},i} \\ \text{BCVA} &= \text{CVA} + \text{DVA} \end{aligned}λEE(t)NEE(t)CVADVABCVA​=10,000×LGDcp​Spreadcp​​,PD(t)=1−e−λt=DV01⋅TT−t​​⋅σr​⋅t​⋅φ(0)=EE(t)=−i∑​LGDcp​⋅DFi​⋅EE(ti​)⋅ΔPDcp,i​=+i∑​LGDown​⋅DFi​⋅NEE(ti​)⋅ΔPDown,i​=CVA+DVA​

Variables

λ\lambdaλHazard (default intensity) rate
LGD\text{LGD}LGDLoss given default (1 − Recovery Rate)
EE(t)\text{EE}(t)EE(t)Expected exposure at time t (convex DV01 decay × half-normal mean φ(0) = 1/√(2π))
NEE(t)\text{NEE}(t)NEE(t)Negative expected exposure; symmetric IRS profile ⇒ NEE(t) = EE(t)
DF(ti)DF(t_i)DF(ti​)Risk-free discount factor
ΔPD(ti)\Delta\text{PD}(t_i)ΔPD(ti​)Marginal default probability in period i

Assumptions

  • •Expected exposure modelled with convex DV01 decay: EE(t) ∝ √((T−t)/T) × √t — a stated modelling choice (textbook uses linear (T−t)/T), peaks mid-life
  • •NEE = EE: the swap exposure profile is symmetric, so expected negative exposure equals expected positive exposure. The credit asymmetry between the two parties enters through λ_own vs λ_cp (i.e. ΔPD_own vs ΔPD_cp), NOT a spread-ratio weight on the exposure
  • •Exposure integral discretised over N = 20 time steps (left-edge sum); CVA is stored as a negative number; BCVA = CVA + DVA (not CVA − DVA)
  • •Screening estimate only; production-grade CVA uses Monte Carlo simulation of the full trade NPV path with netting sets and collateral

Industry Comparison

Bloomberg CVA function: Uses full simulation with netting sets, collateral, and IMM-approved models (Basel III); Strata is an indicative estimate only

Curriculum reference

  • •CFA L1 Derivatives: Basics of Derivative Pricing and Valuation
  • •CFA L1 Derivatives: Pricing and Valuation of Forward Commitments
  • •CFA L2 Derivatives: Valuation of Contingent Claims
  • •CFA L2 Derivatives: Pricing and Valuation of Interest Rates and Other Swaps
  • •CFA L2 Fixed Income: Credit Default Swaps

Credit Spread Analytics

G-Spread, I-Spread, Z-Spread, Option-Adjusted Spread (OAS) via BDT tree, and Asset Swap Spread (ASW)

G-Spread (Government Spread)

The G-Spread is the difference between a bond's yield-to-maturity (converted to a continuously compounded basis) and the interpolated government zero rate at the same maturity. It reflects total credit, liquidity, and issuer-specific risk relative to the sovereign benchmark.

ycc=f⋅ln⁡ ⁣(1+yperiodicf)G-Spread=(ycc−rgovt)×10,000 bp\begin{aligned} y^{\text{cc}} &= f \cdot \ln\!\left(1 + \frac{y^{\text{periodic}}}{f}\right) \\ \text{G-Spread} &= (y^{\text{cc}} - r^{\text{govt}}) \times 10{,}000 \text{ bp} \end{aligned}yccG-Spread​=f⋅ln(1+fyperiodic​)=(ycc−rgovt)×10,000 bp​

Variables

yperiodicy^{\text{periodic}}yperiodicBond YTM on the coupon compounding frequency basis
fffCoupon frequency (e.g., 2 for semi-annual)
yccy^{\text{cc}}yccContinuously compounded equivalent YTM
rgovtr^{\text{govt}}rgovtInterpolated government zero rate (continuously compounded)

Assumptions

  • •USD bonds use the UST zero curve (treasury.gov); EUR bonds use the ECB AAA euro area curve
  • •GBP, JPY, and other currency bonds currently use UST as benchmark — values are not comparable across currencies without a label
  • •YTM is converted to continuous compounding before subtraction to ensure compatibility with the zero curve

Industry Comparison

Bloomberg YAS G-Spread: Bloomberg uses the same YTM-to-continuous conversion; benchmark selection is currency-aware

I-Spread (Interpolated Swap Spread)

The I-Spread measures a bond's yield over the swap curve at the same maturity. It isolates credit risk from the government rate by benchmarking against the interbank swap rate, which already incorporates bank credit risk.

ycc=f⋅ln⁡ ⁣(1+yperiodicf)I-Spread=(ycc−rswap)×10,000 bp\begin{aligned} y^{\text{cc}} &= f \cdot \ln\!\left(1 + \frac{y^{\text{periodic}}}{f}\right) \\ \text{I-Spread} &= (y^{\text{cc}} - r^{\text{swap}}) \times 10{,}000 \text{ bp} \end{aligned}yccI-Spread​=f⋅ln(1+fyperiodic​)=(ycc−rswap)×10,000 bp​

Variables

rswapr^{\text{swap}}rswapInterpolated USD swap zero rate at bond maturity

Assumptions

  • •⚠ Known limitation: the USD swap curve is estimated — FRED SOFR compounded averages (0–6M) blended with UST + post-GFC spread adjustments (1Y–30Y). This is not a live traded par swap curve.
  • •Post-GFC spread adjustments range from +5 bp (1Y) to −25 bp (30Y), reflecting the term structure inversion observed after 2008
  • •Values are directionally meaningful but not precise enough for trading or ISDA documentation
  • •Free live par swap rates are not publicly available via any free API (FRED ICE and H.15 series discontinued)

Industry Comparison

Bloomberg YAS I-Spread: Uses live traded SOFR par swap rates; significantly more accurate than the estimated curve used here

Z-Spread (Zero-Volatility Spread)

The Z-Spread is a constant parallel shift added to the entire zero (spot) rate curve such that the sum of discounted cashflows equals the bond's dirty price. Unlike G-Spread and I-Spread, Z-Spread accounts for the full term structure.

Pdirty=∑tCFte(z(t)+Z)⋅tZ=arg⁡min⁡Z∣Pdirty(Z)−Pdirty,mkt∣\begin{aligned} P^{\text{dirty}} &= \sum_{t} \frac{\text{CF}_t}{e^{(z(t) + Z) \cdot t}} \\ Z &= \arg\min_{Z} \left| P^{\text{dirty}}(Z) - P^{\text{dirty,mkt}} \right| \end{aligned}PdirtyZ​=t∑​e(z(t)+Z)⋅tCFt​​=argZmin​​Pdirty(Z)−Pdirty,mkt​​

Variables

z(t)z(t)z(t)Zero (spot) rate at maturity t from the government curve
ZZZZ-Spread — constant shift applied to all zero rates (decimal)
CFt\text{CF}_tCFt​Bond cashflow (coupon or principal) at time t

Assumptions

  • •Solved via bisection over [−500 bp, +5000 bp]; convergence tolerance 0.001 bp
  • •Uses the same government zero curve as G-Spread (UST or ECB depending on currency)
  • •Z-Spread equals the G-Spread when the yield curve is flat
  • •No optionality adjustment; callable/putable bonds require OAS instead

Industry Comparison

Bloomberg YAS Z-Spread: Identical algorithm; differences arise only from curve construction methodology

Option-Adjusted Spread (OAS) — BDT Tree

OAS removes the value of embedded options from the Z-Spread, isolating the pure credit/liquidity premium. It is computed using a Black-Derman-Toy (BDT) lognormal interest rate tree calibrated to the current zero curve.

r(n,j)=r(n,0)⋅e2jσΔtVn,j=12(Vn+1,j+1+Vn+1,j)⋅11+r(n,j)Δt+CFn,jOAS=arg⁡min⁡s∣Pmodel(s)−Pmkt∣Opt Val=Popt-free(OAS)−Popt-adj(OAS)\begin{aligned} r(n,j) &= r(n,0) \cdot e^{2j\sigma\sqrt{\Delta t}} \\ V_{n,j} &= \frac{1}{2} \bigl(V_{n+1,j+1} + V_{n+1,j}\bigr) \cdot \frac{1}{1 + r(n,j) \Delta t} + \text{CF}_{n,j} \\ \text{OAS} &= \arg\min_{s} \left| P^{\text{model}}(s) - P^{\text{mkt}} \right| \\ \text{Opt Val} &= P^{\text{opt-free}}(\text{OAS}) - P^{\text{opt-adj}}(\text{OAS}) \end{aligned}r(n,j)Vn,j​OASOpt Val​=r(n,0)⋅e2jσΔt​=21​(Vn+1,j+1​+Vn+1,j​)⋅1+r(n,j)Δt1​+CFn,j​=argsmin​​Pmodel(s)−Pmkt​=Popt-free(OAS)−Popt-adj(OAS)​

Variables

r(n,j)r(n,j)r(n,j)Short rate at tree node (step n, state j)
r(n,0)r(n,0)r(n,0)Lowest state rate at step n (calibrated by bisection)
σ\sigmaσShort-rate lognormal volatility
Δt\Delta tΔtLength of each time step
OAS\text{OAS}OASConstant spread added to all tree rates to match market price

Assumptions

  • •BDT lognormal tree ensures non-negative rates and mean-reversion in volatility
  • •Tree calibrated step-by-step: at each step, bisect on r(n,0) to match the target discount factor from the zero curve
  • •Callable bond: at each node v = min(v, callPrice); putable bond: v = max(v, putPrice)
  • •OAS duration (OAD) and convexity (OAC) computed by bumping the zero curve ±25 bp and rebuilding the full tree
  • •BDT assumes constant short-rate volatility; Hull-White or LMM are more flexible alternatives

Industry Comparison

Bloomberg OAS1 / YAS OAS: Uses full term-structure-consistent models (Hull-White or multi-factor LMM); BDT is the classical single-factor approximation

Asset Swap Spread (ASW)

The asset swap spread measures the spread over the floating-rate leg of a par asset swap. A bond is purchased at par and swapped into floating-rate payments; the spread compensates for any difference between the coupon and the swap rate, and for price deviation from par.

ASW≈CouponSwapbp+PriceAdjbpCouponSwapbp=(Coupon%−Swap Rate%)×100PriceAdjbp=100−PcleanPeriods×f×100\begin{aligned} \text{ASW} &\approx \text{CouponSwap}_{\text{bp}} + \text{PriceAdj}_{\text{bp}} \\ \text{CouponSwap}_{\text{bp}} &= (\text{Coupon}\% - \text{Swap Rate}\%) \times 100 \\ \text{PriceAdj}_{\text{bp}} &= \frac{100 - P^{\text{clean}}}{\text{Periods}} \times f \times 100 \end{aligned}ASWCouponSwapbp​PriceAdjbp​​≈CouponSwapbp​+PriceAdjbp​=(Coupon%−Swap Rate%)×100=Periods100−Pclean​×f×100​

Variables

Swap Rate\text{Swap Rate}Swap RatePar swap rate for the bond's maturity (from USD swap curve)
PcleanP^{\text{clean}}PcleanBond clean price (% of par)
Periods\text{Periods}PeriodsNumber of remaining coupon periods
fffCoupon frequency

Assumptions

  • •⚠ Known limitation: uses the same estimated USD swap curve as I-Spread (FRED SOFR + post-GFC adjustments)
  • •Price adjustment uses straight-line amortisation — a simplified approximation of the full present-value method
  • •Full asset swap pricing requires a bootstrapped swap curve and exact coupon schedule; this formula provides a directional approximation
  • •ASW ≈ Z-Spread for bonds priced near par; diverges materially for deep-discount or premium bonds

Industry Comparison

Bloomberg YAS ASW / YASN: Uses exact par asset swap pricing with live SOFR swap rates; straight-line approximation introduces non-trivial error for off-market bonds

Curriculum reference

  • •CFA L1 Fixed Income: Fundamentals of Credit Analysis
  • •CFA L2 Fixed Income: The Term Structure and Interest Rate Dynamics
  • •CFA L2 Fixed Income: Valuation and Analysis of Bonds with Embedded Options

Data Sources

External data feeds and refresh schedules

UST Yield Curve

US Treasury par yields for benchmark pricing

Daily (market close)
  • •Source: treasury.gov XML feed
  • •Tenors: 1M, 2M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 7Y, 10Y, 20Y, 30Y
  • •Interpolated for non-standard maturities

FX Exchange Rates

Foreign exchange rates for currency conversion

Daily (ECB reference rate)
  • •Primary: European Central Bank (ECB)
  • •Fallback providers for ECB downtime
  • •Supports G10 + RUB, THB

Equity Market Data

Stock prices, fundamentals, and historical data

Intraday (delayed)
  • •Price history: Alpha Vantage
  • •Fundamentals: Financial Modeling Prep (FMP)
  • •Some fundamental metrics may be unavailable

SEC EDGAR XBRL Financials

Standardised financial statement data sourced from SEC XBRL inline filings (10-K and 10-Q)

As filed (SEC updates within hours of submission)
  • •Source: SEC EDGAR XBRL API (free, no key required)
  • •60+ standardised metrics: revenue, operating income, net income, EPS, assets, liabilities, equity, capex, D&A, working capital
  • •Up to 20 years of annual history where available
  • •Rate limit: 10 req/sec; User-Agent: Project Strata/1.0
  • •Bank/financial sector requires alternate GAAP line items (e.g., InterestAndDividendIncomeOperating)
  • •Used in: Equity Lab financials tab, DCF inputs auto-population, comps fundamentals

FRED — Federal Reserve Economic Data

US macroeconomic and rates data from the St. Louis Federal Reserve

Daily (market close for rates series)
  • •Series used: DGS10 (10Y UST yield, risk-free rate for WACC/CAPM)
  • •SOFR compounded averages (SOFR30DAYAVG, SOFR90DAYAVG, SOFR180DAYAVG) for short end of USD swap curve
  • •DGS2, DGS5, DGS10, DGS30 for market context panel
  • •FRED FEDFUNDS for federal funds rate display
  • •ICE swap rate series (ICERATES*) and H.15 DSWP series discontinued — not available
  • •Fallback: DGS10 defaults to 4.25% when FRED is unreachable

Damodaran Online — Valuation Datasets

Annual datasets from Prof. Aswath Damodaran (NYU Stern) used for market-implied equity risk premium, industry betas, and default spreads

Annual (updated each January)
  • •Implied equity risk premium (ERP): used as fallback when live ERP is unavailable (default 4.60%)
  • •Industry unlevered betas: used when FMP live beta is outside [0.1, 5.0] or unavailable
  • •Country risk premiums (CRP) by nation for international WACC estimation
  • •Default spreads by credit rating and seniority for cost-of-debt estimation
  • •Hosted at: pages.stern.nyu.edu/~adamodar/

Project Strata is for educational purposes. Calculations are illustrative and should not be used for actual trading decisions.