Portfolio LabKnowledgeSign inCreate account

How Portfolio Lab calculates

For every tool: which data it uses, how it calculates returns and metrics, which assumptions and defaults apply and where its limits are. The pages describe the code that actually runs.

Backtest methodology: data, process, rebalancing and costsHow the Portfolio Lab backtest calculates: prices with distributions, currencies, rebalancing dates, savings plans, withdrawals, trading costs and time-weighted return.In depth · 12 min readMetrics methodology: how Portfolio Lab measures return and riskAll Portfolio Lab metrics with formulas: CAGR, volatility, Sharpe, Sortino, Calmar, drawdown, VaR, beta, alpha, tracking error, capture ratios and withdrawal rates.In depth · 5 min readOptimization methodology: estimation, objectives, Black-Litterman, resampling and walk-forwardHow Portfolio Lab optimizes: Ledoit-Wolf covariance, eight objective functions, min-CVaR, efficient frontier, Black-Litterman, Michaud resampling and rolling tests.Advanced · 8 min readTactical allocation methodology: how the eleven tactical models workTrend following, dual momentum, rotation (PAA, VAA, DAA, ADM), target volatility, adaptive allocation, CAPE and regime (HMM): signals, defaults, cash, comparison.In depth · 13 min readCPPI backtest: methodologyHow Portfolio Lab calculates CPPI: equities = multiplier × cushion, floor with TIPP and lock-in, review dates, costs, gap risk and the comparison with a constant mix.Advanced · 10 min readCarry backtest: methodology for FX and bond carryHow Portfolio Lab calculates carry: forward rates from the rate differential, currency ranking, volatility target, crash filter, costs, and coupon and roll-down for bonds.Advanced · 14 min readLong/short and statistical arbitrage: methodologyHow Portfolio Lab computes long/short: pairs trading with hedge ratio and z-score, pair portfolios, Avellaneda/Lee s-score, rank strategies, costs and borrow fee.Advanced · 13 min readMonte Carlo methodology: how Portfolio Lab simulates wealth pathsHow the Portfolio Lab Monte Carlo simulation works: bootstrap, block bootstrap, normal and t distribution, contributions, withdrawals, percentiles and success rate.In depth · 5 min readFinancial goals methodology: how Portfolio Lab simulates a life planHow the Financial goals page calculates: payment plan, priorities with a reserve, simulated return paths, a glide path between two portfolios and the required savings rate.Advanced · 7 min readALM methodology: how Portfolio Lab measures assets against liabilitiesHow Portfolio Lab's ALM page works: payment schedule, present value and duration of the liabilities, funded status, interest rate risk and the simulation of all portfolios.Advanced · 6 min readFactor regression, factor allocation and factor statistics: methodologyHow Portfolio Lab calculates factor regressions: Fama-French models, momentum, bond factors, t-statistics, return attribution, factor allocation and factor statistics.Advanced · 6 min readReturns-based style analysis: methodologyHow Portfolio Lab runs Sharpe's style analysis: optimizing the style weights, standard errors, rolling analysis, out-of-sample selection and the style map.Advanced · 6 min readAsset analysis: methodology from correlation to cointegrationHow Portfolio Lab calculates correlations, principal components, autocorrelation, the variance ratio, cointegration and the fund comparison as of a common reference date.Advanced · 7 min readLook-through: how Portfolio Lab sees inside fundsWhere Portfolio Lab gets a fund's holdings, how it adds up countries, sectors and individual securities across all funds, and how it classifies positions in its taxonomy.In depth · 6 min readRisk factors in the look-through: methodologyHow Portfolio Lab calculates interest rate duration by currency, key rate durations, spread duration by issuer and equity beta from holdings lists and returns.Advanced · 6 min readRisk & attribution: methodology of risk decomposition and Brinson attributionHow Portfolio Lab calculates Euler risk contributions, VaR and CVaR, tracking error, factor risk and Brinson-Fachler attribution with Carino and Menchero linking.Advanced · 9 min readESG methodology: sustainability in the look-throughHow Portfolio Lab calculates with freely usable data: shares in companies with coal, oil and gas assets, recorded emissions per company, SFDR and limitations.In depth · 10 min readAsset classes with a long history: methodologyHow Portfolio Lab chains 202 asset classes from funds, index data, synthetic bonds and proxies into long monthly series, handles currencies and deducts fund costs.In depth · 10 min readMacro dashboard and regime analysis: methodologyHow Portfolio Lab prepares macro data for the US, the euro area and Germany, defines six regimes and evaluates portfolios by business cycle, inflation and rate phase.In depth · 14 min readValuation with the Shiller P/E: methodologyHow Portfolio Lab prepares the US stock market CAPE since 1881, ranks it historically and turns it into a real expected return by regression with Newey-West errors.Advanced · 8 min readVolatility dashboard: methodologyHow Portfolio Lab calculates the volatility barometer, VIX maturities, futures curve, VX30, roll yield, Traders-VRP and correlation, and ranks each by percentile.Advanced · 13 min readSentiment: methodology for the fear and greed index, put/call ratio and COTHow Portfolio Lab calculates its own fear and greed index, put/call ratios, COT positioning, financial stress and cross-asset signals, and what came next.Advanced · 8 min readOption pricer: how Portfolio Lab values optionsHow the option pricer works: Black-Scholes with cost of carry, binomial trees, barriers, Asians, lookbacks, Greeks, implied volatility, SVI smile and strategies.Advanced · 18 min readBubble indicator (LPPLS): methodologyHow Portfolio Lab computes the LPPLS model: formula, calibration after Filimonov and Sornette, search space, filters, 26 windows, confidence, history and limitations.Advanced · 9 min readRegime methodology: how the hidden Markov model worksHow Portfolio Lab computes its hidden Markov model: Baum-Welch, Hamilton filter, smoothing, Viterbi, metrics per regime, BIC and walk-forward in Tactical.Advanced · 17 min readShips at chokepoints (beta): methodologyHow Portfolio Lab counts tankers and cargo ships at Hormuz, Suez, Malacca and more: AIS messages, rectangles, ship type, draft, counting windows and limitations.In depth · 10 min readData checks: loading, preparing and checking price seriesHow Portfolio Lab loads, cleans and checks price data: jumps, factor-of-100 errors, frozen prices and gaps, with limits per type of security and clear notes.In depth · 6 min readDimensions methodology: how Portfolio Lab counts independent risksHow Portfolio Lab calculates dimensions: eigenvalues against the Marchenko-Pastur bound, effective number of bets, minimum torsion, absorption ratio and history.Advanced · 8 min readEconomic pulse: how Portfolio Lab calculates early indicatorsHow the economic pulse works for the US, the euro area and Germany: day-exact year-on-year change, robust z-score without look-ahead, weights and minimum coverage.In depth · 10 min readMethodology of the free calculators: savings plan, withdrawal and leveraged ETFHow Portfolio Lab's free calculators work: a savings plan with compound interest and costs, a withdrawal plan with Monte Carlo and a leveraged ETF with volatility drag.In depth · 8 min readPrivate markets methodology: analyzing funds, forecasting cash flows, planning commitmentsHow Portfolio Lab calculates private markets funds: XIRR, TVPI and DPI, KS-PME, direct alpha and Long-Nickels, Geltner and GLM desmoothing, forecasting and pacing.Advanced · 10 min readOverfitting check and diversification return: the calculations in Backtest and TacticalHow Portfolio Lab calculates the PSR, minimum track record length, deflated Sharpe ratio and probability of backtest overfitting, and decomposes the diversification return.Advanced · 15 min readScenario methodology: how Portfolio Lab runs stress testsHow Portfolio Lab calculates scenarios: regression on seven factors, shocks with conditional expectation, historical crisis windows and a reverse stress test.Advanced · 10 min read

Past results are not a forecast. The methodology explains calculations; it is not investment or tax advice.