1
$\begingroup$

I'm trying to predict the value of a variable after a specified number of days. I'm assuming it will change each day by a normally distributed random amount.

For example, today the value is 10. Over the past month the std dev of daily changes is 2. What are the odds that, within 20 days, the lowest value will be within a specified range.

Would a monte carlo simulation be an appropriate technique?

I'd run repeated iterations of

start = 10
for d in range(days):
    start += random.gauss(0, stddev)

After each iteration I'd bin the values.

Does this make sense? Is there a much better way? I've looked at exotic option pricing models, but they seem like overkill and are beyond my ability to implement.

$\endgroup$
3
$\begingroup$

Simulation will give you a good approximation of the distribution given enough trials. However, what you've described is called a random walk. For a Gaussian random walk the distribution of distance traveled after $n$ steps is $\sigma \sqrt{n}$. So, for your example, starting at $10$ with a $N(0,2)$ walk, the location after $20$ steps is $N(10,2\sqrt{20})$. The probability of ending with a positive value, for example, is $1-\Phi(\frac{0-10}{2\sqrt{20}})$.

You can verify with simulation. The following is in R.

trials<-replicate(100000,10+sum(rnorm(20,0,2)))
mean(trials>0)
#0.86842
1-pnorm(0,10,2*sqrt(20))
#0.8682238

hist(trials,breaks=50,prob=TRUE)
x<-seq(-20,40,length=100)
lines(x,dnorm(x,10,2*sqrt(20)))

Histogram of trials with normal distribution

Note that this may or may not be a good model as it allows values to go negative and allows recovery from 0 value rather than ruin. Option pricing models like Black-Scholes use an assumption of lognormally distributed returns instead.

$\endgroup$
  • 1
    $\begingroup$ The two changes I should make are to use lognormal and set a zero bound? As I understand, lognormal is a better fit for actual markets. $\endgroup$ – foosion Apr 3 '15 at 17:34
  • 1
    $\begingroup$ A model of lognormal returns is probably more realistic for asset prices, but it's still a controversial model. A lognormal model will automatically prevent negative asset values. $\endgroup$ – A. Webb Apr 3 '15 at 18:16
  • $\begingroup$ Why would it be controversial? From what I can tell, market prices (at least stocks and bonds) are much closer to a lognormal distribution than a normal dist, so using lognormal would seem better, at least for a simplistic model. $\endgroup$ – foosion Apr 3 '15 at 18:19
  • 1
    $\begingroup$ The preference for lognormal over normal for stock prices probably isn't that controversial (bond yields, yes though). Controversial is whether their is a better alternative, e.g. with fatter tails. So, I wouldn't say you should use lognormal, but I would recommend it over normal for stock prices. $\endgroup$ – A. Webb Apr 3 '15 at 18:23
  • $\begingroup$ Gotcha. Reality most likely has fatter tails, but for a general simplistic model for, e.g., oil prices, forex, etc. this is probably the best I'll do short of Vanna-Volga or something else I don't understand :-) $\endgroup$ – foosion Apr 3 '15 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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