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.
Variables
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
YTM Solver (Bisection)
Finds the yield that equates the discounted cashflows to the target dirty price. Uses bisection with bracket expansion.
Variables
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
Cashflow Generation
Generates the coupon schedule by walking backward from maturity in regular coupon periods.
Variables
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.
Variables
Assumptions
- •Continuous compounding for discount factors
- •Linear interpolation between curve points
- •Flat extrapolation beyond curve boundaries
- •ACT/365 Fixed for time fractions
Industry Comparison
Curve + Spread Pricing
Adds a credit spread to the benchmark UST yield, then prices using periodic compounding.
Variables
Assumptions
- •UST benchmark matches bond maturity via interpolation
- •Spread applied as parallel shift to all cashflows
- •Periodic compounding (not continuous)
Industry Comparison
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).
Variables
Assumptions
- •Symmetric 1bp yield shock for finite difference
- •Assumes parallel shift in yield curve
- •Does not capture convexity effects
Industry Comparison
Convexity
Measures the curvature of the price-yield relationship. Captures second-order effects not explained by duration.
Variables
Assumptions
- •Second derivative approximation via central difference
- •Same 1bp shock as duration calculation
- •Positive for standard bonds (price-yield curve is convex)
Industry Comparison
DV01 (Dollar Value of 01)
The change in portfolio value for a 1 basis point move in yield. Expressed in currency units.
Variables
Assumptions
- •Linear approximation using duration
- •Ignores convexity effects for large moves
- •Negative sign convention: rising yields = loss
Industry Comparison
CS01 (Credit Spread 01)
The change in value for a 1 basis point move in credit spread. Only applicable in Curve+Spread mode.
Variables
Assumptions
- •One-sided difference (spread up only)
- •UST benchmark held constant
- •Represents credit-specific risk separate from rates
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.
Variables
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.
Variables
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.
Variables
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
Price Return (Yield Change)
The price change due to assumed yield (or spread) movements between today and the horizon.
Variables
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.
Variables
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.
Variables
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
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.
Variables
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
ACT/ACT ISDA
Uses actual days, split across year boundaries. Standard for government securities.
Variables
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
ACT/360
Actual days divided by 360. Common for money market instruments.
Variables
Assumptions
- •Simple actual day count
- •Always divides by 360 regardless of leap year
- •Results in year fractions > 1 for periods > 360 days
Industry Comparison
ACT/365 Fixed
Actual days divided by 365. Ignores leap years. Used for UK gilts and some Asian markets.
Variables
Assumptions
- •Fixed denominator of 365
- •Does not adjust for leap years
- •Simple and predictable
Industry Comparison
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.
Variables
Assumptions
- •Pro-rata accrual within coupon period
- •Day count convention determines time fractions
- •Buyer pays seller accrued at settlement
Industry Comparison
Clean vs Dirty Price
The dirty (full) price includes accrued interest; the clean (quoted) price excludes it.
Variables
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.
Variables
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).
Variables
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
Portfolio Shock Analysis
Estimates P&L impact of rate/spread shocks using duration approximation.
Variables
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).
Variables
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
Efficient Frontier (Mean-Variance Optimization)
Finds the set of portfolios offering the highest expected return for each level of risk. We use grid search over weight combinations to trace the frontier.
Variables
Assumptions
- •Grid search with 5% weight increments (20 steps)
- •Long-only by default (weights ≥ 0)
- •Maximum 15 assets for performance
- •Expected returns estimated from historical mean
Industry Comparison
Capital Market Line (CML)
Shows the risk-return trade-off for portfolios combining the risk-free asset with the tangency (max Sharpe) portfolio.
Variables
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).
Variables
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
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).
Variables
Assumptions
- •Returns are log-normally distributed
- •Volatility and correlations are constant
- •No jumps or regime changes
- •Monthly time steps for computational efficiency
Industry Comparison
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.
Variables
Assumptions
- •Covariance matrix is positive semi-definite
- •Small regularization (10^-10) added for numerical stability
- •Independent normals generated via Box-Muller transform
Industry Comparison
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).
Variables
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
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.
Variables
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
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.
Variables
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
Data Sources
External data feeds and refresh schedules
UST Yield Curve
US Treasury par yields for benchmark pricing
- •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
- •Primary: European Central Bank (ECB)
- •Fallback providers for ECB downtime
- •Supports G10 + RUB, THB
Equity Market Data
Stock prices, fundamentals, and historical data
- •Price history: Alpha Vantage
- •Fundamentals: Financial Modeling Prep (FMP)
- •Some fundamental metrics may be unavailable
Project Strata is for educational purposes. Calculations are illustrative and should not be used for actual trading decisions.