How Stochastic Simulations Reveal Real Investment Outcomes.

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 fantasyFV=PV(1+r)t 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 Gμσ22 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.

VolatilityGeometric MeanFinal 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 ln(1+r)12σ224.
Chart reveals: Median lags deterministic by 52%; 10th percentile shows ruin risk.

Monthly conversion: (1+r)1/121; 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 np
import matplotlib.pyplot as plt
import pandas as pd
# Parameters: Uganda USE All-Share realistic
initial_capital = 100_000 # 100K UGX
annual_mu = 0.12 # 12% arithmetic mean
annual_sigma = 0.22 # 22% volatility
years = 30
months = years * 12
n_simulations = 10_000
np.random.seed(42)
# Lognormal monthly parameters
monthly_mu = np.log(1 + annual_mu) / 12 - 0.5 * (annual_sigma**2) / 12
monthly_sigma = annual_sigma / np.sqrt(12)
# Generate returns and compound paths
rand = np.random.normal(monthly_mu, monthly_sigma, (n_simulations, months))
paths = initial_capital * np.exp(np.cumsum(rand, axis=1))
# Key stats
final_values = paths[:, -1]
p10, p50, p90 = np.percentile(final_values, [10, 50, 90])
det = initial_capital * (1 + annual_mu)**years
print(f"Deterministic: {det:,.0f} UGX")
print(f"10th: {p10:,.0f} | Median: {p50:,.0f} | 90th: {p90:,.0f}")
# Volatility drag table
vols = [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 chart
time = np.arange(months) / 12
fig, 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 (μσ2/2=12%2.4%=9.6%) 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

  1. Adjust expected returns downward by σ22 when planning: For USE at 22% vol, plan on 9.6% not 12%.
  2. 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%.
  3. 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.

Similar Posts

Leave a Reply

Discover more from The Analytical Investor

Subscribe now to keep reading and get access to the full archive.

Continue reading