How Stochastic Simulations Reveal Real Investment Outcomes.
The Foundations of Intelligent Investing
Why this matters in 2026 Uganda: With inflation stubbornly above 5% and USE All-Share showing 15%+ YTD gains amid global volatility, deterministic projections lure savers into overconfidence just as emerging market risks peak. This article debunks the illusion using USE ALSI stats (12% mean, 22% volatility which is nearly double S&P 500’s 15%). It also delivers Monte Carlo code, and reveals your true ruin risk from 100K UGX over 30 years.
Deterministic Returns: The Dangerous Illusion of Certainty
Smooth line fantasy: promises that an investment of 100K UGX grows to just under 3M UGX at 12% in 30 years.
Reality check: The smooth-line fantasy ignores sequence risk. Early losses demand impossible recoveries (e.g., -30% needs +43% to break even). Uganda treasury bills looked safe on paper but crumbled against 2011-2012 inflation spikes. The price of time article talks more about this.
Key takeaway: Emerging markets like USE amplify this globally; S&P 500’s calmer 15% vol hurts less than USE’s 22%.
Stochastic Returns: Markets as Random Processes
Markets follow lognormal distributions (returns ≥ -100%, fat crash tails).
Arithmetic vs. geometric trap: 12% average ≠ 12% compound; USE’s high vol creates path dependency where Year 2 crashes kill decades of growth.
Uganda context: 2005-2023 data shows 12% arithmetic mean but ~9.6% geometric after drag—worse than developed markets. Refer to the paper .
Key takeaway: Volatility isn’t noise; it’s math that compounds against you.
Volatility Drag: The Silent Wealth Destroyer
The approximation proves the erosion: 22% volatility subtracts 2.4% annually, yielding 9.6% geometric return.
Active traders amplify this by resetting the drag clock through trades. This explains why traders underperform buy-and-hold.
| Volatility | Geometric Mean | Final Value (UGX) |
|---|---|---|
| 0% | 12.0% | 2,995,992 |
| 15% | 10.9% | 2,213,140 |
| 22% | 9.6% | 1,555,747 |
| 30% | 7.5% | 875,496 |
Monte Carlo Simulation: Seeing 10,000 Futures
How it works: Generate monthly lognormal returns → compound via np.exp(np.cumsum()) → extract percentiles.
Parameters matter: 10K+ paths, proper monthly conversion .
Chart reveals: Median lags deterministic by 52%; 10th percentile shows ruin risk.

Monthly conversion: ; minimum 10K simulations ensure reliable tails.
Building the Simulation in Python
Copy to Google Colab (numpy, matplotlib, pandas required). Seed ensures reproducibility.
import numpy as npimport matplotlib.pyplot as pltimport pandas as pd# Parameters: Uganda USE All-Share realisticinitial_capital = 100_000 # 100K UGXannual_mu = 0.12 # 12% arithmetic meanannual_sigma = 0.22 # 22% volatilityyears = 30months = years * 12n_simulations = 10_000np.random.seed(42)# Lognormal monthly parametersmonthly_mu = np.log(1 + annual_mu) / 12 - 0.5 * (annual_sigma**2) / 12monthly_sigma = annual_sigma / np.sqrt(12)# Generate returns and compound pathsrand = np.random.normal(monthly_mu, monthly_sigma, (n_simulations, months))paths = initial_capital * np.exp(np.cumsum(rand, axis=1))# Key statsfinal_values = paths[:, -1]p10, p50, p90 = np.percentile(final_values, [10, 50, 90])det = initial_capital * (1 + annual_mu)**yearsprint(f"Deterministic: {det:,.0f} UGX")print(f"10th: {p10:,.0f} | Median: {p50:,.0f} | 90th: {p90:,.0f}")# Volatility drag tablevols = [0.00, 0.15, 0.22, 0.30]table_data = [{'Volatility': f'{v*100:.0f}%', 'Geometric Mean': f'{annual_mu - 0.5*v**2:.1%}', 'Final Value': f'{initial_capital * (1 + annual_mu - 0.5*v**2)**years:,.0f}'} for v in vols]df = pd.DataFrame(table_data)#df.to_csv('vol_drag.csv', index=False)print(df)# Fan charttime = np.arange(months) / 12fig, ax = plt.subplots(figsize=(12, 6))p_paths = np.percentile(paths, [10, 50, 90], axis=0)ax.plot(time, p_paths[0] / 1000, color='red', linewidth=2, label='10th percentile')ax.plot(time, p_paths[1] / 1000, color='green', linewidth=2, label='Median (50th)')ax.plot(time, p_paths[2] / 1000, color='orange', linewidth=2, label='90th percentile')ax.fill_between(time, p_paths[0]/1000, p_paths[2]/1000, alpha=0.2, color='blue')ax.fill_between(time, p_paths[0]/1000, p_paths[2]/1000, alpha=0.2, color='blue')ax.plot(time, det * (1 + annual_mu)**time / 1000, 'k--', linewidth=2)ax.set(xlabel='Years', ylabel='Wealth (UGX thousands)', title='Stochastic Fan vs Deterministic')ax.legend(['10th', 'Median', '90th', 'Deterministic'])ax.grid(True, alpha=0.3)plt.savefig('fan_chart.png', dpi=300, bbox_inches='tight')plt.show()
Results: Median 1.45M UGX (51% below deterministic); 10th percentile 307K UGX.
Reading the Results: What Your Simulation Reveals
Median Underperformance (52% Shortfall)
Chart’s green median line ends at 1.45M UGX vs. black dashed deterministic at 3M UGX a 51% gap.
Volatility drag () explains this: Volatile paths zigzag, losing more on downs than gaining on ups, empirically proven by the median’s persistent lag after year 5
10th Percentile: Ruin Risk
Red 10th percentile plummets to 307K UGX which is only 10% above inflation-adjusted principal after 30 years.
Chart shows it diverging sharply post-crash sequences (e.g., years 2-8), quantifying 10% ruin probability where early volatility kills compounding forever.
Safe Withdrawals from Tails
Distribution tails (orange 90th at 6.6M UGX) set safe rates: 3% of 90th (~200K UGX/year) survives 90% paths.
Chart proves conservative withdrawals must come from upper tails, not optimistic median e.g., 4% fails the bottom 20% of paths.
Chart takeaway: Deterministic overpromises by ignoring the fan’s asymmetry; USE’s high 22% vol widens the gap vs. calmer assets.
Uganda-Specific Applications
USE All-Share volatility exceeds S&P 500, worsening drag vs. Unit Trusts (lower σ).
Multi-asset portfolios cut overall volatility via correlations; subtract Uganda inflation (5-7%) for real returns.
Further reading: USE Official Site | Historical Volatility Study.
Common Mistakes and Fixes
- Wrong volatility: Use historical data, not promised yields.
- Annual/monthly mismatch: Convert properly.
- Too few simulations (<1K unreliable).
- Ignore fees/taxes: Subtract from μ.
Implementing Volatility Drag in Portfolio Management
- Adjust expected returns downward by when planning: For USE at 22% vol, plan on 9.6% not 12%.
- Target lower-volatility assets (SACCOs, bonds, t-bills) or diversify to shrink portfolio σ, e.g., 50/50 mix might drop vol to 15%, boosting geometric return to 10.9%.
- Rebalance annually to harvest volatility (sell winners, buy losers); monitor via rolling geometric means, not arithmetic averages, and stress-test portfolios at 1.5x historical σ for crashes.
This shifts management from chasing returns to minimizing drag, turning simulations into allocation rules.
Final thought: In any high-vol environment, simulations aren’t academic. They’re your probability audit.