Investment portfolio simulator: from intuition to the efficient frontier
Building a portfolio is not picking assets you like; it is designing a system with expected return, volatility, and a correlation matrix that lets you survive the left tail and capture the mean. Markowitz's modern portfolio theory, the Sharpe-Lintner CAPM, the Fama-French factor model, and 40 years of index-fund evidence converge on the same thesis: asset allocation explains over 90% of the variance of a diversified portfolio's return, while individual security selection explains under 10%. A serious simulator is built on that evidence, not on the hunch of the last analyst to call the radio.
The basic math every simulator solves
For a portfolio of N assets with weights w, expected returns u, and covariance matrix S, the portfolio's expected return is E[Rp] = wT . u and variance is Sp^2 = wT . S . w. Volatility Sp is the square root of variance. The Sharpe ratio - the central metric of risk-adjusted efficiency - is calculated as:
Sharpe = (E[Rp] - Rf) / Sp
where Rf is the risk-free rate (3-month T-bill, 28-day CETES, Treasury bond depending on market). A Sharpe below 0.5 over a 10-year horizon signals suboptimal allocation; a sustained Sharpe above 1.0 is exceptional and frequently implies hidden leverage, sample bias, or capture of illiquidity premium.
The covariance matrix S is the heart of the simulation. It is estimated with at least 36-60 months of returns so that correlations are robust. In stress regimes correlations rise - the phenomenon known as correlation breakdown - and the diversification that worked for 10 years can collapse in 3 weeks. That is why serious simulators let you specify conditional correlation matrices: one for the normal regime, another for the crisis regime, with weights assigned according to historical probability.
Sortino, maximum drawdown, and sequence-of-returns risk
Sharpe penalizes all volatility equally, but a rational investor does not fear upside volatility. The Sortino ratio replaces Sp with the semi-deviation of negative returns and measures return per unit of downside risk. For portfolios with asymmetric returns (options, high-yield, crypto, private equity with smoothed marks), Sortino is more honest than Sharpe.
Maximum drawdown is the peak-to-trough percentage decline observed in the period. For a traditional 60/40 portfolio (S&P 500 + Bloomberg US Aggregate) the historical drawdown is ~27% in 2008; for a 100% developed-market equity portfolio it reaches 51% over the same period. The figure matters because sequence-of-returns risk during retirement can destroy an apparently viable plan: two portfolios with the same 30-year average return but different ordering of bad years produce terminal balances that differ by an order of magnitude. The retiree who suffers -30% in year 1 of retirement ends up with 40% less capital at year 30 than the retiree who suffers -30% in year 28, assuming the same 30 returns but reordered.
Numeric example: 60/40 allocation vs global diversified
Portfolio A, 60% S&P 500 (expected return 7.5%, vol 15%) + 40% US Aggregate Bonds (return 3.5%, vol 5%), correlation 0.1:
E[Rp] = 0.6 x 7.5 + 0.4 x 3.5 = 5.9%Sp = sqrt(0.6^2 x 15^2 + 0.4^2 x 5^2 + 2 x 0.6 x 0.4 x 0.1 x 15 x 5) ~ 9.3%Sharpe (Rf=3%) ~ 0.31
Portfolio B, 40% US equity + 20% ex-US developed (MSCI EAFE) + 10% emerging markets + 25% US Aggregate + 5% REITs, with correlations between 0.3 and 0.7 and compound expected return ~6.3%, vol ~10.5%, Sharpe ~0.31. Gross return rises only 40 basis points, but the expected drawdown in US-equity stress scenarios moderates because the geographic factor decorrelates. The Markowitz efficient frontier formalizes this optimization: for each target risk level, there is a unique portfolio that maximizes expected return.
On the frontier, the portfolio tangent to the ray from the risk-free rate is the one with the highest possible Sharpe ratio. Any combination of that tangent portfolio with the risk-free rate dominates any other portfolio on the frontier on Sharpe terms. That is the theoretical basis of the CAPM's market portfolio and the practical rule of combining a global index fund with cash or short-duration bonds based on risk tolerance.
Monte Carlo on Geometric Brownian Motion
Serious simulators do not project a single deterministic scenario; they generate thousands of trajectories using Geometric Brownian Motion with asset correlation implemented via Cholesky decomposition of the covariance matrix. With 10,000 trajectories over a 30-year horizon, you obtain the empirical distribution of the terminal balance, from which percentiles are extracted: P10 (bad scenario), P50 (median), P90 (favorable scenario). Probability of ruin - probability of depleting capital before the horizon - is the critical output for retirement planning and pension funds.
The classic limitation of GBM is that it assumes log-normal returns, while real markets exhibit fat tails (kurtosis above 3) and negative skewness (longer left tails). Professional simulators correct this using Student-t distributions, jumps (Merton jump-diffusion), or block resampling of historical data. For the sophisticated retail investor, complementing Monte Carlo with a backtest over 30-40 real years - including 1973-1974, 2000-2002, 2008-2009, and 2020-2022 - is the safety net against the optimism of normal models.
Rebalancing, drift, and real costs
A 60/40 portfolio does not stay 60/40 on its own. After a year with equity +20% and bonds +2%, real equity weight rises to ~64%. Without rebalancing, the portfolio drifts toward higher risk right after prices rose. Disciplined rebalancing (annual calendar, +/-5% threshold, or volatility bands) captures a small mean-reversion premium and keeps the risk profile stable.
The simulator should let you compare rebalancing strategies - including the tax cost for investors in taxable accounts, a factor that Portfolio Visualizer underweights but that in many markets (Mexico with 10% capital-gains income tax, Spain with savings-income rates up to 28%, Brazil with regressive IR by tenor) is decisive. In historical retrospect, optimal rebalancing for taxable accounts is usually +/-5% bands rather than annual calendar, because it reduces turnover and therefore tax cost. For tax-deferred retirement accounts, quarterly calendar is acceptable.
Factors, risk premium, and style
The modern CAPM extension is the Fama-French five-factor model: market, size (SMB), value (HML), profitability (RMW), and investment (CMA), complemented by Carhart's momentum factor. A full simulator lets you decompose your portfolio's return into exposure to each factor and compare against a benchmark. If your portfolio has a net -0.3 exposure to the value factor, you are actively betting against value without having decided to - the simulator shows you so that it becomes a conscious decision or you neutralize it.
Factor-investing ETFs (iShares Edge, Dimensional, Vanguard Factor) let you build portfolios with intentional factor tilts. The simulator projects how those tilts impact expected return, volatility, and tracking error against the benchmark.
Conditional correlation and market regimes
Diversification is fragile at the worst moment. In March 2020, the correlation between global equity and US government bonds jumped from -0.2 to +0.5 for two weeks, because liquidity dried up and funds sold what they could. The same happened in 2022 when the Fed raised rates 475 basis points and both asset classes dropped in tandem. A simulator that assumes constant correlation creates a false sense of security.
Sophisticated simulators use regime-switching models (Hamilton 1989, Ang-Bekaert) that define two or three market regimes with their own correlation matrices and transition probabilities between regimes. Portfolio expected return and volatility are recomputed as weighted averages by regime. It is an important technical step that separates institutional simulators from retail ones.
Differentiation from Excel and enterprise SaaS
Excel with VAR.S and COVARIANCE.M formulas delivers the basic mechanics but does not generate Monte Carlo trajectories with realistic correlation nor facilitate sensitivity analysis. Portfolio Visualizer is excellent but overwhelms with 40+ parameters and exists only in English. Bloomberg PORT, FactSet, and MSCI Barra cost $25,000-$60,000 USD per user per year, out of reach for most independent advisors, small family offices, and boutique RIAs.
A simulator designed for the sophisticated retail investor and the bilingual independent advisor closes the gap: correct math, accessible UX, interpretable output. Asset allocation is a rare decision; it is made two or three times in a financial life. It deserves a simulation that does not feel like a PhD in econometrics, but that also does not leave out conditional correlation regimes, factor premium, or sequence-of-returns risk. This simulator delivers both.
Taxes, rebalancing, and asset location in LatAm
In Latin America, tax treatment varies by jurisdiction: Mexico charges 10% income tax (ISR) on local equity gains; Argentina applies 15% on financial income in foreign currency; Brazil taxes with a regressive table by tenor; Chile applies CGT of 10% with annual caps. The asset location concept - placing each asset class in the account with the best tax treatment - can add 40-80 basis points annually to net return without changing the nominal allocation. High-coupon fixed income in tax-deferred accounts (AFORE, AFP, private retirement plans); equity in taxable accounts where natural deferral and tax-loss harvesting work in your favor. The simulator models both layers: strategic allocation plus tax location.
Synthesis for the investor and the advisor
Simulating a portfolio is not predicting the future; it is mapping the plausible range of futures and making decisions robust to that range. An investor who simulates, compares, and rebalances systematically beats 85% of those who only chase point-in-time return - not because the systematic investor nails market tops more often, but because they lose less in drawdowns and accumulate disciplined compounding. An independent advisor who presents a client with three allocations along with Sharpe, P10 drawdown, and 20-year probability of hitting the goal rises from product seller to quantitative fiduciary. Both roles are enabled by an accessible, accurate, bilingual simulator.