# Predicting value over time

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.

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)))


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.

• 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. – foosion Apr 3 '15 at 17:34
• 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. – A. Webb Apr 3 '15 at 18:16
• 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. – foosion Apr 3 '15 at 18:19
• 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. – A. Webb Apr 3 '15 at 18:23
• 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 :-) – foosion Apr 3 '15 at 18:27