Say I have stock prices
100 120 140 160 180 200 210 .... X
every day for a year.
How do I calculate drift and volatility?
I am trying to find some formulas online, but I am confused by terms like 'Δt".
Personal Finance & Money Stack Exchange is a question and answer site for people who want to be financially literate. It only takes a minute to sign up.Sign up to join this community
Here is a minimal example based on 16 months of returns. The calculation can be found in the textbook Computational Financial Mathematics using Mathematica, page 54.
For daily returns adjust the
times variable accordingly.
The curve plotted above is the mean value curve
y0 e^(a t)
Here are the mathematical details, particularly the formulation of
Unfortunately, the answer to that is well beyond what could be answered here for two reasons. First, this forum doesn't allow mathematical notation and, second, by the way you are asking this question you do not have the background mathematics for the answer to help you.
Loosely, the best method would be to construct a Bayesian estimate for the time series although this is an uncommon solution in practice. You might check out this article on it at Basic Bayesian Methods Mark E. Glickman and David A. van Dyk or Bayesian Statistics explained to Beginners in Simple English by NSS.
There just isn't a simple answer to this question and certainly not one without extensive math. There isn't a formula, there is a set of principles.
The calculation of these quantities may depend on the assumed model for returns. In the usual, simple case one assumes daily returns are IID and lognormally distributed. Therefore we take three steps:
r1 = ln(120/100)
r2 = ln(140/120)
Now compute the volatility. To do this, get the standard deviation of the log returns computed above and multiply by (in your case) the square root of 252 (the number of trading days in a year). Excel has a standard deviation function if you are using it. This is denoted by lower case sigma.
Compute the drift. In this case, the daily drift is the mean of the log returns. The annual drift is the average of the log returns times 252.
Note that it should technically be called a drift rate of the price process but that's a story for another day.
These things can get quite complicated for other models for returns, but I'm assuming if you were studying super advanced return models, you would already know what delta T means.