Portfolio Construction & Simulation
Efficient frontier, minimum variance frontier, rebalancing simulation (drift vs schedule), and Monte Carlo bootstrap: building and stress-testing portfolios in Thrive.
From Thrive on YouTube
Watch the matching Thrive video
Win Rate vs Reward to Risk: The Math That Decides If You Make Money
Part of Risk Management and Position Sizing. Education only. Not financial advice.
The Efficient Frontier
The efficient frontier is the most important visualization in portfolio theory. It plots the set of portfolios that achieve the maximum return for each level of risk, forming a curve in risk-return space. Every portfolio below or to the right of this curve is suboptimal. You could either reduce risk without sacrificing return or increase return without adding risk by moving to the frontier.
In Thrive's Workbench, the efficient frontier is computed by solving hundreds of portfolio optimizations across a range of target returns and plotting the results. The tangent point (where a line from the risk-free rate touches the frontier) is the Maximum Sharpe portfolio. The leftmost point on the frontier is the Minimum Variance portfolio. Your current portfolio likely sits below the frontier: the gap between your position and the curve represents the improvement available through optimization.
1-- Compute the efficient frontier for your asset universe2SELECT *3FROM portfolio_efficient_frontier();45-- Returns points along the frontier:6-- target_return | portfolio_volatility | weights_json7-- 0.10 | 0.28 | {"BTC":0.70,"ETH":0.25,"SOL":0.05}8-- 0.15 | 0.32 | {"BTC":0.55,"ETH":0.30,"SOL":0.15}9-- 0.20 | 0.38 | {"BTC":0.40,"ETH":0.30,"SOL":0.30}10-- ...1112-- Each row is an optimal portfolio for a given return level.13-- Plot target_return vs portfolio_volatility to see the curve.Minimum Variance Frontier
The minimum variance frontier includes portfolios both above and below the minimum variance point. The upper portion is the efficient frontier: rational portfolios. The lower portion represents inefficient portfolios where you take the same risk but receive less return. No rational investor would choose a portfolio on the lower branch, yet many crypto traders unwittingly hold them by over-concentrating in high-correlation, low-return altcoins.
The Global Minimum Variance portfolio (GMV) is the single portfolio with the absolute lowestvolatility achievable from the given asset universe. It represents the most risk you can eliminate through diversification alone. In a pure crypto portfolio, the GMV typically has 50–70% BTC allocation because BTC has the lowest volatility among major crypto assets. Adding even a small TradFi allocation (gold, bonds) can push the GMV's volatility dramatically lower.
Rebalancing Simulation
Once you have target weights, the question becomes: how and when do you rebalance? Portfolio weights drift over time as assets move at different rates. An equal-weight portfolio of BTC and SOL will drift to 70/30 if SOL outperforms by enough. Two primary approaches exist, and both are available as simulations in the Workbench.
Fixed-Schedule Rebalancing
Rebalance at fixed intervals (daily, weekly, monthly, or quarterly) regardless of how far weights have drifted. Monthly rebalancing is the most common. It is simple to implement and creates a natural "buy low, sell high" dynamic: you trim winners and add to underperformers. In trending crypto markets, this can hurt returns because you are cutting winners early. In mean-reverting markets, it adds value.
Drift-Weight Threshold Rebalancing
Rebalance only when any asset's weight drifts more than a threshold (e.g., 5% or 10%) from its target. This approach trades less frequently, reducing transaction costs and tax events. The threshold choice matters: too tight (2%) and you rebalance constantly with high costs. Too loose (20%) and you effectively never rebalance, letting concentration risk build.
1-- Simulate different rebalancing strategies2SELECT *3FROM portfolio_simulation()4WHERE scenario IN (5 'monthly_rebalance',6 'quarterly_rebalance',7 'drift_5pct_rebalance',8 'drift_10pct_rebalance',9 'no_rebalance'10);1112-- Compare: total_return | max_drawdown | sharpe | turnover | rebalance_count13-- monthly: 45.2% | -32.1% | 1.12 | 2.4x | 1214-- quarterly: 48.1% | -34.5% | 1.08 | 1.1x | 415-- drift 5%: 46.8% | -33.0% | 1.15 | 1.8x | 816-- drift 10%: 47.5% | -35.2% | 1.06 | 0.9x | 517-- no rebalance:52.1% | -41.3% | 0.92 | 0.0x | 0The rebalancing decision
Monte Carlo Bootstrap Simulation
Monte Carlo simulation stress-tests your portfolio by generating thousands of hypothetical return paths based on your portfolio's statistical properties. The bootstrap variant resamples from your actual historical returns (with replacement), preserving the real distribution including fat tails and skewness, rather than assuming normal returns.
Each simulation draws random samples from your historical daily returns, constructs a multi-year equity curve, and records the final value, maximum drawdown, and Sharpe ratio. After 10,000 simulations, you have a probability distribution of outcomes. The 5th percentile shows your worst-case scenario. The median shows the most likely outcome. The spread between the 5th and 95th percentiles shows the range of uncertainty.
1-- Run Monte Carlo bootstrap simulation2SELECT *3FROM portfolio_simulation()4WHERE scenario = 'monte_carlo_bootstrap';56-- Returns distributional statistics:7-- metric | p5 | p25 | median | p75 | p958-- final_value | $72,100 | $94,300 | $118,500| $148,200| $205,7009-- max_drawdown | -52.1% | -38.4% | -29.7% | -22.1% | -14.3%10-- annualized_return | -3.8% | 8.2% | 15.1% | 22.4% | 35.6%11-- sharpe_ratio | -0.12 | 0.45 | 0.82 | 1.18 | 1.721213-- The spread between p5 and p95 quantifies your uncertainty.14-- A wider spread means less predictability in outcomes.1-- Compare current allocation vs optimized2SELECT *3FROM portfolio_simulation()4WHERE scenario IN (5 'current_allocation_bootstrap',6 'optimized_hrp_bootstrap',7 'equal_weight_bootstrap'8);910-- Shows how your current portfolio compares to11-- optimized alternatives across the full distribution12-- of possible outcomes, not just the expected case.Using Monte Carlo for position sizing
1.Your portfolio currently sits below the efficient frontier. What does this mean?
2.A Monte Carlo simulation shows a median final portfolio value of $120k but a 5th percentile of $68k. How should you interpret this?
Put this lesson to work
Free on Thrive, no account needed.