# How can I measure fluctuation?

For a certain product I have a data series with its price for each day over a long period of time (20 years). I want to investigate how the fluctuation of the price changes over the whole time. Therefore I need a measure for the fluctuation of the price at a certain time.

First I thought to take the standard derivation of all prices for each year and to look, how it changed. But I guess this method might not be the best one. Take the example of a year in which the price of the product increases by 1$each day. In the end I would have a nonzero standard derivation of all prices in this year although the price development does not fluctuate. Is there a better measurement for the fluctuation of a given data series? ## 2 Answers Let's say you have prices series$p_t$. Get the log difference of it$r_t=\Delta\ln y_t\equiv \ln y_t-\ln y_{t-1}$. The$r_t$would be your price fluctuations. Now, you can look at the square$r_t^2$which will give you an idea about the variance of fluctuations (if$E[r_t]\sim0$). Here's an example for oil prices. MATLAB code: d=fetch(fred,'MCOILWTICO','1/1/1986','11/1/2014'); %% p = d.Data(:,2); dates = d.Data(:,1); subplot(3,1,1) plot(dates,p) title('Crude Oil Prices: WTI') datetick r = price2ret(p,[],'Continuous') subplot(3,1,2) plot(dates(2:end),r) title('Price returns') datetick subplot(3,1,3) plot(dates(2:end),r.^2) title('Sq. Price returns') datetick  • Thanks for your answer. We have$y_t=p_t\$, right? Commented Jan 2, 2015 at 12:04
• Right, I'll fix the typo Commented Jan 2, 2015 at 12:23

The usual approach would be to look at the returns (i.e., log-price differences) rather than the raw prices. If the relative changes in the prices are constant (or vary around a certain constant average growth rate), then the returns will be (or vary around a) constant.

And then you can either use exploratory or ad hoc approaches like the one you describe above (checking the means and standard deviations per year) or try a somewhat more formal analysis (e.g., testing and dating structural breaks).