top of page

​

Stochastic Differential Equations

​

The purpose:

​

We begin our discussion with a simple observations about Stock Market daily returns:

  • The returns appear to be normally distributed.

But is this actually true? Of course not! However, we can pretend that it is Normal as a first approximation. If you'd like to explore some stock market data, feel free to look at the python code: "Stock_simulations.py" at my github page: Ricard0000. Below, I provide you with a plot of the returns of Apple "AAPL", the claim is that this is approximately normally distributed. 

​

​

Dist_aapl.png

The astute reader will likely notice the following about the above distribution:

  • The distribution of returns appears to have higher peaks when compared to the Normal distribution.

  • The tails are "fatter" than that of the exponentially decaying Normal distribution.

​​

Assuming the asset price has normally distributed randomness we can formulate the simple model:

model1.png
bm_sim_appl.png

This model can be implemented using a few lines of code on Python:

S=np.zeros([N],dtype=float)
S[0]=start
for I in range(0,N-1):
    S[I+1]=S[I]*(1+mu*dt+np.sqrt(dt)*std*np.random.normal())

This is how we generate the plots below:

​
 

We can even use  this to for forecasting. Below is an example of the Wiener process using AAPL closing values.
 

bm_pred.png
bottom of page