This question https://www.quora.com/What-is-an-intuitive-explanation-of-Monte-Carlo-simulations gives intuitive explanation for monte carlo :

Another example I ran into recently was modeling the effects of monthly cashflows on an investment portfolio. I knew the average return and variance of the portfolio, so I could build a MCS to help me understand how the timing of cashflows effected the goal of staying above a critical account value.

In https://www.youtube.com/watch?v=3gcLRU24-w0&feature=youtu.be monte carlo is defined as :

enter image description here

This is in the context of an asset price but I assume this can generalized for prices of any value ?

For my simple dataset I define 3 return values : 2 , 6 , 7

Periodic Daily Return = natural logarithm(todays return / yesterdays return)

This is defined at point 10:23 in https://www.youtube.com/watch?v=3gcLRU24-w0&feature=youtu.be

So for each value in dataset the 'periodic daily return' is calculated as (Assuming initial closing price is 1 ln(2/1) ) :

ln(2/1)=.3 , ln(6/2)=1.4 , ln(7/6)=.2

Standard deviation : https://en.wikipedia.org/wiki/Standard_deviation

Variance : https://en.wikipedia.org/wiki/Standard_deviation in section 'Basic Examples'

z score : https://en.wikipedia.org/wiki/Standard_score

Drift : http://www.investopedia.com/terms/s/styledrift.asp

Variance is defined as deviations of each data point from the mean, and square the result , variance is the mean of results.

Based on above this is how I implement monte carlo for simple example

average(Periodic Daily Return) = (.3 + 1.4 + .2) / 3 = .6

variance(Periodic Daily Return) = ((2-.6)^2 + (6-.6)^2 + (7-.6)^2) / 3 = (2+29+41)/3=24

standard-deviation(Periodic Daily Return) = squareRoot(24) = 5

drift(Periodic Daily Return) = mean - (variance / 2) = .6 - (24 / 2) = -.11.4

To run a monte carlo simulation of possible returns is this correct. Possible return = Previous days price * exp(drift + standard-deviation * random(zscore))


zscore = ((Periodic Daily Return) - average(Periodic Daily Return) / standard-deviation(Periodic Daily Return) and random(zscore) is a random standard deviation away from mean.

Update :

Geometric brownian motion is defined at http://www.investopedia.com/articles/07/montecarlo.asp as :

The formula for GBM is found below, where "S" is the stock price, "m" (the Greek mu) is the expected return, "s" (Greek sigma) is the standard deviation of returns, "t" is time, and "e" (Greek epsilon) is the random variable:

enter image description here

This post provides an alternative definition to geometric brownian motion : https://quant.stackexchange.com/questions/4589/how-to-simulate-stock-prices-with-a-geometric-brownian-motion

  • $\begingroup$ you might mean the difference of the logs and not the logs of the differences $\endgroup$
    – Taylor
    Commented May 4, 2017 at 18:48
  • $\begingroup$ @Taylor where are you referring ? 'Periodic Daily Return = natural logarithm(todays return / yesterdays return)' is correct as is defined at point 10:23 in youtube.com/watch?v=3gcLRU24-w0&feature=youtu.be $\endgroup$
    – blue-sky
    Commented May 4, 2017 at 21:07
  • $\begingroup$ Ok you made the edits. Good $\endgroup$
    – Taylor
    Commented May 5, 2017 at 1:47
  • $\begingroup$ Monte Carlo simulation implies you are drawing repeatedly from a (pseudo) random probability distribution (e.g., error terms within the context of an otherwise deterministic model or models), and exploring the distribution of the resulting values. Your code does not appear to include draws from any probability distributions, so I do not see how it qualifies as a Monte Carlo simulation. $\endgroup$
    – Alexis
    Commented Aug 5, 2020 at 16:00

1 Answer 1


I believe the equation you need to do is:

enter image description here

You can find the formula on the "Geometric Brownian Motion" on Wikipedia. My formula matches the one on your video.

enter image description here

The only stochastic term is the $W_t$ you will need to simulate with Gaussian.

I will skip your calculation for average, variance etc because they are just parameters to Monte Carlo. The video has detailed instructions on how to estimate the parameters. Let's assume your parameters are good. Let's take a look at how you do the simulation:

Possible return = Periodic Daily Return * exp(drift + standard-deviation * random(zscore))

This doesn't make any sense to me.

  • Possible return is $S_t$ / $S_0$, right? So what's "periodic daily return"?
  • You will need to simulate many paths. You only did one.
  • You mention random(zscore) is something away from the mean. But this should just be a random sample from the standard normal.

No you don't need two return terms. You already have a return in your calculation so you don't need another one. Please look at the equation again. It says the log of daily return is a drift plus a stochastic term driven by brownian motion.

  • $\begingroup$ 'This doesn't make any sense to me.' your right : 'Possible return = Periodic Daily Return * exp(drift + standard-deviation * random(zscore))' should be Possible return = Previous days price * exp(drift + standard-deviation * random(zscore)) $\endgroup$
    – blue-sky
    Commented May 5, 2017 at 16:15
  • $\begingroup$ No you don't need periodic daily return at all. $\endgroup$
    – SmallChess
    Commented May 5, 2017 at 16:16
  • $\begingroup$ 'Periodic Daily Return' should just be 'return' ? $\endgroup$
    – blue-sky
    Commented May 5, 2017 at 16:46
  • $\begingroup$ @blue-sky I edit... $\endgroup$
    – SmallChess
    Commented May 6, 2017 at 0:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.