Simulating stock market returns using Monte Carlo › 2. Defining The Simulation Parameters
Michael BrenndoerferJuly 19, 20251 min read
Simulating stock market returns using Monte Carlo › 2. Defining The Simulation ParametersOne section · Sections in this article3 / 8 ↓
Sections in this article8
Reading tools Definitions & inline links
Toggle tooltip visibility. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Understanding the Financial Model
Before diving into the code, let's understand what we're modeling:
- Expected Return (): The average annual return expected from the investment (8%)
- Volatility (): How much the returns vary from year to year (15% standard deviation)
- Time Horizon: How long the investment will be held (10 years)
- Simulation Paths: How many different scenarios will be tested (10,000 iterations)
Why These Numbers?
- 8% expected return: Roughly matches historical stock market averages
- 15% volatility: Typical for a diversified stock portfolio
- 10,000 simulations: Provides statistical confidence in the results
The parameters are defined below:
In[2]:
Code# Defining parameters for the investment simulation
INITIAL_INVESTMENT = 100.00
YEARS = 10
MU = 0.08 # Expected annual return (8%)
SIGMA = 0.15 # Annual return volatility (15%)
N_ITER = 10_000 # Number of Monte Carlo simulation paths
print("Investment Simulation Parameters:")
print(f" Initial Investment: ${INITIAL_INVESTMENT:,.2f}")
print(f" Time Horizon: {YEARS} years")
print(f" Expected Annual Return: {MU:.1%}")
print(f" Annual Volatility: {SIGMA:.1%}")
print(f" Number of Simulations: {N_ITER:,}")Out[2]:
ConsoleInvestment Simulation Parameters: Initial Investment: $100.00 Time Horizon: 10 years Expected Annual Return: 8.0% Annual Volatility: 15.0% Number of Simulations: 10,000