Annualizing Volatility in Monte Carlo Price Simulations
Summary
This exchange discusses a one-year daily stock-price simulation intended to represent historical scenarios with different annual returns and volatility. The simulation uses geometric Brownian motion with a daily time step, but the questioner supplies a mean daily standard deviation directly as the volatility parameter. The response explains that the model’s volatility input should be annualized, so a daily volatility estimate is scaled by the square root of the number of trading days in a year; the daily step remains one trading day expressed as a fraction of a year.
A second response points out that a limited number of simulated paths may not reproduce the input mean return and volatility closely, and suggests increasing the path count or using antithetic sampling. These are practical observations about parameter units and Monte Carlo sampling error, not a complete diagnosis of the code or a guarantee that the simulation will match a historical year. A geometric Brownian motion also does not reproduce a particular realized path simply by matching its annual return and volatility.
Key ideas
- A daily volatility estimate must be converted to annual volatility before use with an annual time horizon.
- Daily simulation steps should be expressed as a fraction of a year when the model parameters are annualized.
- Finite Monte Carlo samples can deviate from the theoretical return and volatility used as inputs.
- More paths or antithetic sampling can reduce sampling noise, though neither forces a simulated year to match history.
- Matching annual return and volatility alone does not recreate the sequence of returns from a particular year.
Tags
Full text
# My Montecarlo Simulation is not working?
# My Montecarlo Simulation is not working?
My aim is to predict 1 year ahead and daily, the price of a stock under certain scenario. These scenarios are the ones that this year the stock will have a similar year, in terms of standard deviation and return, to the 2008 and to the 2017.
So what I did is to compute the mean of the DAILY returns and the mean of the daily standard deviation.
However, even though in the 2008 the return were of -40% in a year (mean of daily returns: -0.003074428479940944, mean of daily std: 0.028883647401261883) and for 2017 the return were of +30% (mean of daily returns: 0.0010560777183462407, mean of daily std: 0.011807274319995538), by plugging into the model the parameters, the MC simulation is giving me really similar results, with the VaR that is suggesting me very small possible losses (400$ from the starting price of 8200) which is roughly the 5%, but in a year in which the stock made -40%!
Can someone explain me where I made a mistake? Is it wrong how did I define "sigma" or the dt, which maybe should be 1 and not 1/252 ?
```
def mc_asset(S0, r, sigma, T, Nsteps, Nrep):
SPATH = np.zeros((Nrep, 1 + Nsteps))
SPATH[:, 0] = S0
dt = T / Nsteps
nudt = (r - 0.5 * sigma **2) *dt
sidt = sigma * np.sqrt(dt)
for i in range(0,Nrep):
for j in range(0,Nsteps):
SPATH[i,j+1] = SPATH[i,j] * np.exp(nudt + sidt * np.random.normal())
return SPATH
S0 = datiRame['Copper Cash'].iloc[-1]
sigma = #MEAN OF THE DAILY STANDARD DEVIATION
Nsteps = 252
T = 1
r = #MEAN OF THE DAILY RETURNS
Nrep = 2000
SPATH = mc_asset(S0, r, sigma, T, Nsteps, Nrep)
plt.figure(figsize = (10,8))
for i in range(len(SPATH)):
plt.plot(SPATH[i])
plt.xlabel('Numbers of steps')
plt.ylabel('Stock price')
plt.title('Monte Carlo Simulation for Stock Price')
plt.show()
print(S0,sigma_selected_year, mu_selected_year)
# Define VaR and CVaR functions
def mcVaR(returns, alpha = 5):
return np.percentile(returns, alpha)
def mcCVaR(returns, alpha = 5): #Return CVaR or ES
belowVaR = returns <= mcVaR(returns, alpha=alpha)
return returns[belowVaR].mean()
# Compute VaR and CVaR
VaR = S0 - mcVaR(final_prices[:-1],alpha =5)
CVaR = S0 - mcCVaR(final_prices[:-1],alpha =5)
VaR, CVaR
```
## Answer by KaiSqDist (score 2)
https://quant.stackexchange.com/a/78238
Your sigma seems to be incorrect, the sigma used should be annualized. Therefore, if you use your mean of standard deviation, you need to multiply it with $\sqrt{252}$.
I do not think there is anything wrong with your T, if you are simulating for a year ahead. Each day $dt$ should be $1/252$.
Can you update me with the results using these amended parameters?
## Answer by AlRacoon (score 2)
https://quant.stackexchange.com/a/78241
Even with 2000 simulations, you may not get the expected return and volatility as your estimated parameters.
Try running your monte carlo with more simulation paths and this should close the difference between your estimated parameters and your simulated parameters.
Also, you may try some variance reduction techniques such as antithetic sampling to get your expected results with fewer simulations.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.