Wednesday, October 7, 2015

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?



Answer



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.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...