In the previous post, I employed a very simple random walk model. The stock price model was $S(t+1)=S(t)(1+r)$, where r, the return had a mean and a standard deviation, and it followed a normal distribution.
One observed fact is that the change in prices is higher with stocks at higher prices. Therefore, another model is employed, the geometric brown motion. Equations of the model in their differential form:
$[1]: dS=S(1+r)$
$[2]: r=\mu dt + dW $
$[3]: dW=\sigma \sqrt{dt}\epsilon $
What is the meaning of the model?
Equation 1 means that the change of the price (dS) is proportional to the price. The relation is the stock's return.
Equation 2 means that the return is equal to a constant ($\mu$ = drift) times the change in time plus a perturbance. If the drift is different from zero, the stock follows a trend. The variability around the trend is proportional to the perturbance.
Equation 3 models the perturbance. $\epsilon$ follows a brownian motion (it is an independent normal random variable) of $\mu=0$ and $\sigma=1$. The term \sigma \sqrt{dt} is related to the increase of the standard deviation when we sum independent normal variables.
This model uses a constant drift (constant trend) and constant variance (constant volatility), things that are very controversial. In fact, drift and variance vary with the time, so the model needs to be recalibrated constantly. However, it is widely used. The Black-Scholes equation employs the geometric brown motion, assuming that the drift is equal to the free-risk rate and the volatility depends on each asset.
To be able to apply the model with Excel, we need to discretize it:
$[1]: \Delta S=S(t)(1+r)$
$[2]: r=\mu \Delta t + \sigma \sqrt{\Delta t}\epsilon$
$[3]: S(t+1)=\Delta S+S(t)$
Application: test the model against real data
To calibrate the model, I used the historical data of the SP500 (monthly close price). From January 3, 1989 until December 1, 2008 (19 years) the mean return ($\mu$) was 1.24% and the standard deviation ($\sigma$) 4.28%. Then, I forecasted the values with the model. From Jan 2, 2009 until May 1, 2014 I tested the forecasted values against the real data. The change in time was set to one month ($\Delta t=1/12$).
Here you can some results:
Simulation 1:
Simulation 2:
Excel file: Stock Price Simulation
Another interesting excel file: Random Walk - Geometric Brown Motion


No comments:
Post a Comment