Loading...

[PLUS] How to Calculate Partial Autocorrelation (PACF) using Python


What is Partial Autocorrelation
Extending from our previous discussion of autocorrelation, partial autocorrelation (PACF) measures the correlation between two time series observations after partialling out the intervening correlations. So any correlation found in PACF between lags is isolated between the current window series and lag. For example, PACF with a lag of 4 measures the correlation specific to current value and 4 periods prior; after accounting for and removing periods 2 & 3. More in depth understanding for partial autocorrelation and autocorrelation in general can be found here.

Interpreting Results
Most academic literature would suggest using the PACF to inform the "order of the model" to be used if it is an autoregressive (AR) model (or by extension, ARIMA model for timeseries). Interpreting the below graph shows that after the 4th lag, all of the others are not statistically significant as they are outside of the 95% confidence intervals. Therefore, the PACF would suggest that we use an AR model with an order of 4.



This is a premium post. Create Plus+ Account to view the live, working codebase for this article.




Notice: Information contained herein is not and should not be construed as an offer, solicitation, or recommendation to buy or sell securities. The information has been obtained from sources we believe to be reliable; however no guarantee is made or implied with respect to its accuracy, timeliness, or completeness. Author does not own the any crypto currency discussed. The information and content are subject to change without notice. CryptoDataDownload and its affiliates do not provide investment, tax, legal or accounting advice.

This material has been prepared for informational purposes only and is the opinion of the author, and is not intended to provide, and should not be relied on for, investment, tax, legal, accounting advice. You should consult your own investment, tax, legal and accounting advisors before engaging in any transaction. All content published by CryptoDataDownload is not an endorsement whatsoever. CryptoDataDownload was not compensated to submit this article. Please also visit our Privacy policy; disclaimer; and terms and conditions page for further information.

Latest Posts
Follow Us
Notify me of new content