AR, MA, and ARMA, When to Use Which?
Previously, I used the AR, MA, and ARMA models to forecast the next x hour BTCETH and UMAMIETH prices. From my observations, most of the time when working with hourly prices, AR(1) is a good baseline to start with. But the question still remains, given a time series, how do we decide which model (AR, MA, or ARMA) to use? The answer lies in the ACF and PACF plots.
ACF (autocorrelation) measures the strength of linear relationship between the original series and each lagged series (i.e., observations at previous times).
PACF (partial autocorrelation) measures the strength of linear relationship between the original series and the k-th lagged series, accounting for the correlations between the original series and the (k-1)th, (k-2)th, ..., 2, 1 lags.
In the figure above, we see ACF value is 1 for all 20 lags. This says the hourly prices of GMX are serially correlated. On the other hand, the PACF value is 1 at lag 1 and effectively zero (squashed inside the the blue band) at all other lags. This implies that the lag1 series is highly correlated with the original series, and after accounting for this correlation, prices two or three hours ago or in the distant past do not show linear relationship with current price.
In general, if PACF drops quickly and ACF declines slowly, we should go with an AutoRegressive (AR) model. In the example above, PACF drops to zero after lag1 and ACF doesn't decline at all for all lags, so the AR(1) model is appropriate. On the other hand, if ACF drops quickly and PACF declines gradually, a Moving Average (MA) model will be a good choice. If both decline gradually, use an AutoRegressive Moving Average (ARMA) model.
Let’s see another example. Say we want to model GMX’s daily price volatility. The following figure shows its PACF and ACF plots. We see both PACF and ACF drop rapidly after lag1, so we can go with either an AR(1) or MA(1).
The following screens present the coefficient estimates of the fitted AR(1) and MA(1). We see they are statistically significant, implying either model works.
Code & Data
Referrals
This section contains affiliate links to crypto products. If you click on the link and use the product, I may receive a small commission at no cost to you. I only link to products I use myself.
Get 5% discount when trading on GMX.
Juno Finance offers free onramp to Arbitrum, Optimism and Solana, a high interest bearing checking account (currently at 5%), and a great loyalty program that gives ledger, gift cards, and 5% cash back for spending. You will get $10 and 500 JCOIN if you use my referral link to open an account and fund it with $50 worth crypto or more. Available to US persons and requires KYC.
If you enjoyed this article and would like to buy me a coffee, you can send ETH, WBTC, AVAX, BNB, USDC, USDT to 0x783c5546C863f65481BD05Fd0e3FD5f26724604E, or you can tip me sat. Thank you and have a great day!