# Estimating the historical drift and volatility

I want to forecast prices $S(t)$ of some asset based on historical daily values. I want to use the geometric Brownian motion given by an SDE: $$dS=\mu S t + \sigma S dB,$$ where $B$ is a Brownian motion, for modeling. The historical prices are $$\{S_i\}_{i=1}^N,$$ from which I calculate the log-returns ($N-1$ in total) $$Z_i=\ln\frac{S_i}{S_{i-1}},$$ and the 1-day historical volatility as the standard deviation of the returns: $$\hat{\sigma} = \sqrt{Var\{Z_i\}}.$$

Q1: Let's say I want to forecast the prices $S(t)$ for 180 days. Should I take $\sigma$ in the SDE as the 1-day volatility $\hat{\sigma}$ or as $\sqrt{180}\hat{\sigma}$? I'd say that $\sigma=\hat{\sigma}$ as I'm modeling day by day, but is it correct?

Q2: How do I compute the drift $\hat{\mu}$ from the historical prices? Is it simply $$\hat{\mu}=\frac{1}{N-1}\sum\limits_{i=1}^{N-1}Z_i,$$ and is it (the above formula) a 1-day drift?

• You may want to take into account weekends and holidays if you are forecasting for half of a year. A trading year is about 252 days – user25064 Jul 20 '17 at 14:21

By looking at log returns, you are examing the stochastic process

$$Q_t = \log S_t$$

given by

\begin{align} dQ_t & = \left( \mu - \tfrac{1}{2}\sigma^2\right) dt + \sigma\, dB_t \\ & \equiv \alpha \,dt + \sigma\, dB_t \end{align}

where $$\alpha=\mu-\tfrac{1}{2}\sigma^2$$.

So far, everything is in continuous time. To interpret the SDE, you need to know how much time passes when $$t$$ increases by one unit. If the distance between $$t=0$$ and $$t=1$$ is one day, then $$Q_{t+1}-Q_t$$ is the daily log return, and $$\mu$$ is the daily drift. However, if the distance between $$t=0$$ and $$t=1$$ is one year, then $$\mu$$ is the annual drift.

Let's assume that one unit of $$t$$ is one day. Then defining $$Z_i = Q_{i+1} - Q_i$$ (which is equivalent to your definition of log returns) the formula

$$\hat{\alpha} = \frac{1}{N-1} \sum_{i=1}^{N-1} Z_i$$

gives the one-day drift for this process, and

$$\hat{\sigma}^2 = \frac{1}{N-2} \sum_{i=1}^{N-1} (Z_i - \hat{\alpha})^2$$

gives the one-day variance (hence $$\hat{\sigma}$$ is the one-day standard deviation). To recover the estimator for the drift term $$\mu$$ you define

$$\hat{\mu} = \hat{\alpha} + \tfrac{1}{2}\hat{\sigma}^2$$

If you want the 180-day drift and standard deviation, you need

\begin{align} \hat{\mu}_{180} & = 180\hat{\mu} \\ \hat{\sigma}_{180} & = \sqrt{180}\,\hat{\sigma} \end{align}

Purely as a point of notation, I would take your price observations to be $$\{S_i\}_{i=0}^N$$ so that you have $$N+1$$ price observations, and $$N$$ daily returns. It will simplify your formulas later.

• What about the Ito component? shouldn't $\frac{\sum_{i=1}^{N-1}Z_i}{N-1}$ be an estimate of $\mu - \sigma^2 / 2$ – user25064 Jul 20 '17 at 14:17
• Yes, you are completely correct - I'll update the answer. – Chris Taylor Jul 20 '17 at 14:25
• So, I should input $\hat{\mu}_{180}$ and $\hat{\sigma}_{180}$ as estimates of $\mu$ and $\sigma$ in the SDE (eventually, I'll use the solution $S(t)$ to that equation); i.e., having an initial condition $S(0)$ I then just compute $S(180)$? – corey979 Jul 20 '17 at 14:29
• @corey979 That depends on how you are interpreting $t$ in your SDE. See my updates to the answer. – Chris Taylor Jul 20 '17 at 14:36
• Yes, $t$ is measured in days. I found in Mantegna & Stanley An Introduction to Econophysics, on p. 118, after Eq. 14.5, that $\mu$ and $\sigma^2$ are "per unit time", so the daily drift and volatility as the time unit is 1 day. And it makes more sense to make 2500\$from the initial 1000\$ than an amount so huge that it causes an overflow on my computer. – corey979 Jul 20 '17 at 20:18