FRM: Monte carlo simulation: Brownian motion
HTML-код
- Опубликовано: 24 июл 2008
- This is a classic building block for Monte Carlos simulation: Brownian motion to model a stock price. The periodic return (note the return is expressed in continuous compounding) is a function of two components: 1. constant drift, and 2. random shock; i.e., volatility multiplied by a randomized critical z value
For more great financial risk management videos, visit the Bionic Turtle website!
yes, thank you for noting that, I did mistakenly change the 252 to 25. I appreciate your help on that point. David
this really comes in handy for my masterthesis, thanks a bunch!
great video! Even though I studied this in uni, I was a bit shaky in answering this question in an interview but now feel more confident about it! thanks a lot :)
Excellent demonstration!
Bionic Turtle 4:22 - You actually messed up the Drift(daily) formula. You changed the 252 to 25 while playing around with the cell.
Very simple and good explanation, thanks !
Great one. Thanks David.
@maleckicoa1 This is GBM, the drift is deterministic component and volatility is the stochastic component; i.e., RAND() scales the volatility
Very good video explanation, all the formulas match with the ones I have on my notes. We can use the Drift value (Expected return) from CAPM model and Stock Volatility calculated using GARCH.
@dicieromike (of course i meant 1/2 variance below). I checked Hull: he calls mu "Expected return on stock per year" ... so i am liking "Exp return" or just "drift" ; i.e., no median or mean. thanks for the insight!
Here are my 2 cents: First, GBM, as shown in the video (and the formula used) assumes constant volatility. With GARCH, volatility changes with time and tends to revert to a long-run average volatility. See Market Risk Analysis V 2 by Alexander. Second, the expected return you calculate from CAPM isn't the same as the mean of the distribution of log returns on the asset: it is, in theory, the "required return" on the stock for an investor who plans on holding a large diversified portfolio.
@dicieromike great observation. I think i did mislabel but it should be: drift (return). You are totally correct that under the GBM, the use of the return (mu) as an INPUT gets to the distributional median with (mu - var^2/2) rather than mean with (mu). I guess we could, confusingly, also call this a geometric rather than arithmetic mean. In summary, I find "mean" ambiguous. Which is a way of agreeing with you that it is a bad label. But i think i like "return" (mu) rather than median. thoughts?
@WarrenEdwardBuffet sure, you'd just extend the XLS i used above to 100 rows. If you request in our forum (click on our YT channel header), I'll share you my copy (I don't think YT lets me link directly...)
@remo1200 as slipknotpsychoman noticed, I made a mistake in the drift. First, the annual drift of 10% is merely an input assumption (nothing necessary about that). Second, the daily drift should be = (10% - 40%^2/2)/252 = 0.0079%. Or, daily mu = 10%/252 = 0.04%. Daily vol = 40% * SQRT(1/252) = 2.52%. And daily drift = 0.04% - 2.52%^2/2 = 0.0079%.
(by inadvertently deleting the extra 2 in 252, i implicitly assumed an annual drift of 101%)
Did we ever reach a consensus as to whether we should be using the "drift daily" or the "drift mean"? David, love your videos. Maybe you could do one on the concept behind drift. All the best.
thanks!
@neb967
Student t, normal mixture, or hyperbolic secant ( the last one is not mentioned in Carol's books) but I find it practical. Model Risk for example (an addin to excel) frequently finds the hyperbolic secant as a good fit for many historical series... so it might be better than assuming normality.
@dicieromike yes understood and i agree the "mean" is imprecise.... but the input cell is Greek "mu" (not mu - 1/2 variance^2). I do not think I would label mu as "median return." I was just trying to identify the best label for mu given that, IMO, neither "mean return" nor "median return" is precise.
Nice video :)
@TommyMarxable Actually, the GBM process is considered a "random walk" which is actually the most appropriate model for the market without getting into agent based modelling. So, in finance, YES. The Black Scholes option pricing formula was also derived from a geometric Brownian Motion assumption and through the use of Ito's lemma fwi....
thanks for the reply, the matter is that I have to find the expected return for a different excercise. thanks for your time, anyway, man.
@dicieromike it just occurred to me, unless i have confused myself, that what is typically called a "geometric mean" is equivalent to the distributional "median" (i.e., ex ante lognormal) ... if you know better or agree, i'd love to hear how i could have that wrong?
Hi isn't the returns dependent on time t? So I think you need to multiply mean drift by time t?
I was wondering how you would modify this if you wanted to use fractional brownian motion or if you were to use some sort of distribution with fat tails like a Levy-stable distribution. The problems I've had with fat-tailed distributions like Levy-stable distributions are that there are 4 different parameters to estimate.
Do I have to use the bootstrapping method instead of using brownian motion if I assume the asset follows a student-t distribution?
@777wt honestly you should blame the copula not MCS, IMO. If folks ran more simulations, it might have helped
GREAT.....
Can you just take the average lognormal difference of the stocks to calculate the drift?
I also have Hull's Book found where you got the formula. However, I don't understand why we subtract 1/2 the variance from the mean "log" return: The arithmetic average of discrete, single period returns with a compounding frequency of one is greater than the geometric average by "approx" 1/2 the variance, true... BUT we're using continuously compounded returns! The expected return should just be mu no? I would like to send you a spreadsheet where I demonstrate this, please advise.
Cool :)
how did you calculate annual drift?
Hi David--
In your example - prices evolve log normally - median return (vol factored) is not equal to mean return.
Mike
I don't quite understand why does the 11th row (drift+z*vol) give you log return instead of return?
Hi David--
Aren'y you using a median (geometric) return?
Mike
how can i stop a Brownian motion !! with least square ! HELP PLZ
Hi David--
Aren't you using median (geometric) dirft? Your cell is labeled 'mean'.
Thanks,
Mike
Hi, how do you get the drift????
Do you have any examples with correlated variables using choleski ordering..
@pzedful it's normal just by definition of GBM. MCS can use any distributional assumption. Why? physics envy, of course. Exactly why? because i wanted to share and it's the first MCS I learned. Caveat emptor. I am not defending it. Models simplify, that's what they do. A toy train is not a train, but it may still have something to offer about the train-ness of trains.
@WalterZelhofer I got the file, I will take a look at my next opportunity, thanks!
Hello! Is there any video about the point @walterzelhofer talks?
How can I compute Var with changing price in Monte Carlo method. it is easy to calculate var in Historical
Where can I download the excel file?
@pzedful I can't argue with somebody who is careful with their comments; i.e., 1/[norm.s.dist( -5 , true)*2] = ~ 1.7 million, indeed!
... I agree with you, but i still like using the normal b/c it is a common building. This video isn't about the distribution per se, it's about the GBM in MCS, as a drift + random process. So, why complicate with a detour on the problems of normal? Where to draw the line; e.g., the i.i.d. assumption (i.e no mean reversion/autocorrelation) is also a problem?
Dear Sir .
There is a mistake in the calculation when you finding the drift(daily) and you divided (10%/252 ) then its value is 0.04% instead of 0.4% . (100% /252 will give you 0.4%) through this the whole calculation is wrong.
@slipknotpsychoman ... i noticed this too. wish BT would fix it in a new example.
Random Value=σ×NORMSINV(RAND())
where:
σ=Standard deviation, produced from Excel’s
STDEV.P function from periodic daily returns series
NORMSINV and RAND=Excel functions
Can you plz check, whether the Random Value calculation is correct?
how do you calculate the (annual) drift? I dont get it. please help me
In my opinion positive drift can only by risk free annual return, which is return on certificate of deposit or 52-week US Bill which is little above 0 in best case 0.50%.
+Niels Hoogeveen There are two types of continuous expected returns:
- log-normally distributed price movement: u = the logarithm of the expected growth rate, ln(E[1+r]);
- normally distributed log returns: eta = the expected value of the logarithmic growth = E[ln(1+r)].
We can see that u is the logarithm of the expected value and eta is the expected value of the logarithm.
The log-normal distribution is skewed to the right so that it has higher expected value than a symmetrical distribution e.g. normal distribution. The connection between the two expected returns is the following: u = eta+0.5*Var and eta = u-0.5*Var.
Here’s an example to highlight the difference between u and eta: Suppose that the price of a stock can grow from 100 to 120 or 110 with equal probability. Then u = ln(0.5*1.2+0.5*1.1) = 13.9762% and eta = 0.5*ln(1.2)+0.5*ln(1.1) = 13.8816%. The half of the variance of ln(1.2) and ln(1.1) is 0.0946%, which gives us the eta = u-0.5*Var relationship.
When we calculate the average log return from past data then we calculate eta. With it and the st. dev. we can simulate log returns. So that if we use daily data wich has a mean (eta) and a st. dev. (sigma) and we simulate daily unit time steps then the excel function for a random daily log return is given by: = mean+sigma*norm.s.inv(rand())
If we want to annualize the daily estimates then we multiple the mean with 252 and the sigma with sqrt(252).
On the other hand we can use the stock market analysts' opinion to calculate u. For example the consensus is that the S&P 500 index expected growth over the next year is 15%. So that u = ln(1.15) and we can substract 0.5*Var to get the continuous mean return.
Niels Hoogeveen i
in daily drift E2/252, you did E2/25, typo, it then should be 0.04%
check cell E4
Can someone here help me simulate commodity prices (like gold for example) for 50 years in a probabilistic way? thanks
+George Iolas George - I found your post from a year ago. Did you ever found an answer - how to simulate commodity prices?Tomaz
@WalterZelhofer Hi Walter, sure my email is davidh(at)bionicturtle(dot)com, but feel free to also post in our forum at bionicturtle(dot)com/forum. I frankly have the same intuition as you do on this, yet (eg) McDonald uses the above also. I'd love to see your XLS, thanks!
Actually, he erased it while doing is presentation.
@777wt no
this be for nerds and geeks me thinks.
Your drift daily is wrong. It's divided by 25 instead of 252. Very confusing, please correct.
Wtf im doing here . Im only a student cant picture out about the concept💔😥
Here I created a site to visualize what's going on - www.quantmill.io/montecarlosimulation