What is Autocorrelation? | Autocorrelation in Trading | Quantra Course - YouTube

Channel: Quantra

[0]
Welcome to this video on autocorrelation.
[3]
After completing this video
[5]
you will be able to explain
[6]
the intuition and calculation behind autocorrelation
[10]
and interpretation of the autocorrelation plot.
[14]
Suppose you want to forecast the wheat futures prices.
[18]
You look at various factors
[19]
that affect the price of wheat
[21]
such as climate and oil prices.
[24]
But the most important determinant is
[26]
its lagged prices.
[28]
For example
[29]
if the price of wheat increases for the last 12 months
[32]
you would expect the wheat price to increase this month.
[36]
To understand this intuitively
[38]
say, you have the price of wheat futures
[40]
at the end of May
[41]
June and July.
[43]
May鈥檚 wheat price has some impact
[45]
on June's wheat price.
[47]
And June鈥檚 wheat price has some impact
[49]
on July鈥檚 wheat price.
[51]
So, the price of wheat in May
[53]
has some impact on the price of wheat
[55]
in July through June.
[57]
This impact is known as the indirect effect.
[60]
But it is also possible to have
[62]
some direct relationship between
[64]
the price of wheat in May and July.
[66]
Why does this happen?
[68]
This can be due to fundamental reasons
[70]
such as change in agricultural commodity pricing policy
[74]
at a fixed time interval
[75]
say every two months.
[78]
Let鈥檚 take an example.
[80]
The wheat futures prices
[81]
at the end of month from May to July
[83]
are shown on screen.
[85]
From May to June it increased by 10%.
[88]
Then, from June to July it increased by 10% + $1
[93]
which is 10% from June and $1 from May.
[97]
Similarly, from July to August it increased by 10%.
[101]
Then, from August to September it increased by 10% + $1
[107]
which is 10% from August and $1 from July.
[111]
So, from May to July and from July to September
[115]
there is a direct relationship of $1 increase in price.
[119]
This is a simplified example
[121]
and easy to identify the
[123]
pattern or relationship between prices.
[126]
In real-scenarios, these relationships are complicated.
[130]
How can you find the relationship of say
[132]
prices in current month with prices two months prior to it?
[136]
You can find the correlation between prices in a month
[140]
and the prices two months back.
[142]
To find correlation
[143]
we have taken the data for the past 10 years.
[147]
Stored the time series in Y
[148]
and two month lagged time series in X.
[151]
The correlation comes out to 0.93.
[155]
This is also called autocorrelation
[157]
or serial correlation as you are finding correlation
[160]
of a time series with it鈥檚 lagged values.
[166]
Similarly, you can find autocorrelation
[168]
with 1 month lagged values,
[170]
3 months lagged values and so on
[172]
by plotting the graph.
[174]
The autocorrelation with 2 months lagged value
[177]
is 0.93.
[180]
The plot is called the autocorrelation plot.
[183]
The y axis has autocorrelation value
[186]
which ranges between -1 and +1
[188]
and x-axis is the lagged terms.
[191]
From this plot, can you tell me autocorrelation
[194]
with 5 months lagged values?
[196]
Yes, it is approximately 0.85
[199]
which you can find by looking
[200]
at the height of this vertical line.
[202]
You might be wondering what this blue shaded region is?
[206]
You can think it as anything inside the shadow or band
[209]
is statistically insignificant.
[211]
In other words
[212]
the autocorrelation values outside the blue region
[216]
is not a fluke.
[217]
Till the 10th lags
[219]
it is outside the blue region.
[221]
So, upto past 10 months values
[224]
have direct and indirect impact on the current prices.
[227]
You can use this information
[229]
to predict next month's wheat price.
[232]
The prediction will be covered in the upcoming sections.
[236]
Even though the wheat prices are positively correlated.
[239]
The wheat prices monthly returns
[241]
not necessarily are autocorrelated.
[244]
As you can see in the autocorrelation plot
[246]
of monthly returns for the past 20 months
[249]
they are not statistically significant.
[252]
In other words, monthly returns of wheat futures
[255]
are random and they are independent of each other.
[258]
That鈥檚 all for this video.