How Project Strata calculates bond analytics, risk metrics, and portfolio values. All formulas are industry-standard and traceable.
Present value calculations for fixed-income securities
Computes the present value of all future cashflows by discounting each at the yield to maturity using periodic compounding.
Finds the yield that equates the discounted cashflows to the target dirty price. Uses bisection with bracket expansion.
Generates the coupon schedule by walking backward from maturity in regular coupon periods.
Discounts cashflows using interpolated zero rates from the yield curve with continuous compounding.
Adds a credit spread to the benchmark UST yield, then prices using periodic compounding.
CFA L1 Fixed Income: Introduction to Fixed-Income Valuation
Duration, convexity, and sensitivity measures
Measures the percentage price sensitivity to a 1% change in yield. Computed using finite difference (1bp bump).
Measures the curvature of the price-yield relationship. Captures second-order effects not explained by duration.
The change in portfolio value for a 1 basis point move in yield. Expressed in currency units.
The change in value for a 1 basis point move in credit spread. Only applicable in Curve+Spread mode.
CFA L1 Fixed Income: Understanding Fixed-Income Risk and Return
Projected returns when selling before maturity
Decomposes the expected return from holding a bond to a future horizon into four components: carry, roll-down, price effect, and reinvestment.
The return from coupon income received during the holding period, expressed as a percentage of the initial investment.
The price change from the bond 'aging' along the yield curve, assuming yields remain unchanged.
The price change due to assumed yield (or spread) movements between today and the horizon.
The additional income earned by reinvesting coupon payments at a specified rate until the horizon.
The expected price of the bond at the horizon date, computed by discounting remaining cashflows at the horizon yield.
CFA L1 Fixed Income: Understanding Fixed-Income Risk and Return
Standard methods for computing time fractions
Assumes each month has 30 days and each year has 360 days. Standard for US corporate bonds.
Uses actual days, split across year boundaries. Standard for government securities.
Actual days divided by 360. Common for money market instruments.
Actual days divided by 365. Ignores leap years. Used for UK gilts and some Asian markets.
Coupon accrual and clean/dirty price relationship
The portion of the next coupon that has accrued to the seller since the last coupon date.
The dirty (full) price includes accrued interest; the clean (quoted) price excludes it.
Multi-asset calculations and currency conversion
Portfolio-level metrics are computed as market-value weighted averages of individual holdings.
Converts between currencies using triangulation through a base currency (USD).
Estimates P&L impact of rate/spread shocks using duration approximation.
Efficient frontier optimization, Monte Carlo simulation, and risk metrics (VaR, CVaR)
The variance of portfolio returns depends on individual asset variances and their covariances. This is the foundation of Modern Portfolio Theory (Markowitz, 1952).
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.
Shows the risk-return trade-off for portfolios combining the risk-free asset with the tangency (max Sharpe) portfolio.
Estimates the covariance structure from historical returns. We use sample covariance with n-1 denominator (Bessel's correction).
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).
Transforms independent random variables into correlated ones using the Cholesky decomposition of the covariance matrix. This is the standard method in finance.
Estimates the maximum loss at a given confidence level. We use the percentile of simulated terminal values (historical simulation approach).
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.
For bonds without direct price history, we proxy returns using UST yield changes and duration. This captures rate sensitivity but not credit spread movements.
DCF (2-stage, 3-stage, reverse), FCFE, WACC (CAPM four-component), DDM (Gordon Growth, H-Model), and comparable company analysis
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.
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.
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.
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.
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.
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.
The Gordon Growth Model values a stock as the present value of its perpetually growing dividend stream, assuming a constant growth rate forever.
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.
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.
Black-Scholes-Merton option pricing, Greeks, implied volatility, CRR binomial trees, forward and FX forward pricing, interest rate swaps, and CVA/DVA
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.
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.
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.
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.
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.
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.
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.
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.
G-Spread, I-Spread, Z-Spread, Option-Adjusted Spread (OAS) via BDT tree, and Asset Swap Spread (ASW)
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.
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.
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.
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.
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.
External data feeds and refresh schedules
US Treasury par yields for benchmark pricing
Foreign exchange rates for currency conversion
Stock prices, fundamentals, and historical data
Standardised financial statement data sourced from SEC XBRL inline filings (10-K and 10-Q)
US macroeconomic and rates data from the St. Louis Federal Reserve
Annual datasets from Prof. Aswath Damodaran (NYU Stern) used for market-implied equity risk premium, industry betas, and default spreads
Project Strata is for educational purposes. Calculations are illustrative and should not be used for actual trading decisions.