σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Time Series skill›Module 1 · Stationarity and memory›Topic 1.2·~50 minIntermediate

Autocorrelation ACF and PACF

Skill positionModule 1 of 5 · Topic 2 of 3
1.2 Autocorrelation ACF and PACF
—Lab score— / 100Total XP—Streak—

Memory in a series

The autocorrelation at lag hhh is the correlation between the series and itself shifted by hhh steps: ρ(h)=γ(h)/γ(0)\rho(h)=\gamma(h)/\gamma(0)ρ(h)=γ(h)/γ(0). The sample version sums the products of deviations from the mean and divides by the total squared deviation. For pure noise with TTT observations the sample autocorrelations are roughly normal with standard deviation 1/T1/\sqrt{T}1/T​, so a bar outside ±1.96/T\pm1.96/\sqrt{T}±1.96/T​ is unusual at the 5% level. Daily stock returns show almost no autocorrelation, which is why simple return-prediction rules fail. Their squares do: big moves are followed by big moves, the signature of volatility clustering.

ρ^(h)=∑t=1T−h(xt−xˉ)(xt+h−xˉ)∑t=1T(xt−xˉ)2,±1.96T,ρ(h)=φh\hat\rho(h)=\frac{\sum_{t=1}^{T-h}(x_t-\bar x)(x_{t+h}-\bar x)}{\sum_{t=1}^{T}(x_t-\bar x)^{2}},\qquad \pm\frac{1.96}{\sqrt{T}},\qquad \rho(h)=\varphi^{h}ρ^​(h)=∑t=1T​(xt​−xˉ)2∑t=1T−h​(xt​−xˉ)(xt+h​−xˉ)​,±T​1.96​,ρ(h)=φh(1)

The partial autocorrelation at lag hhh is the correlation between xtx_txt​ and xt+hx_{t+h}xt+h​ after the effect of the lags in between has been removed. The two plots identify a model. An autoregression of order ppp has an ACF that fades gradually and a PACF that cuts off after lag ppp. A moving average of order qqq is the mirror image: an ACF that cuts off after lag qqq and a PACF that fades. After fitting a model, the Ljung-Box statistic Q=T(T+2)∑k=1mρ^(k)2/(T−k)Q=T(T+2)\sum_{k=1}^{m}\hat\rho(k)^{2}/(T-k)Q=T(T+2)∑k=1m​ρ^​(k)2/(T−k) tests the first mmm residual autocorrelations together. If they are not significant, the model has captured the memory.

An AR(1) with coefficient 0.6For xt=0.6 xt−1+εtx_t=0.6\,x_{t-1}+\varepsilon_txt​=0.6xt−1​+εt​ the autocorrelations are ρ(1)=0.6\rho(1)=0.6ρ(1)=0.6, ρ(2)=0.36\rho(2)=0.36ρ(2)=0.36, ρ(3)=0.216\rho(3)=0.216ρ(3)=0.216: they fade geometrically but never quite stop. The partial autocorrelation is 0.60.60.6 at lag one and 000 afterwards, because once lag one is accounted for, older lags add nothing. With T=400T=400T=400 observations the band is ±1.96/400=±0.098\pm1.96/\sqrt{400}=\pm0.098±1.96/400​=±0.098, so the first four lags would stand out and the later ones would sit inside the band.
  • AR(p): the ACF fades and the PACF cuts off after lag ppp.
  • MA(q): the ACF cuts off after lag qqq and the PACF fades.
  • White noise: every autocorrelation stays inside ±1.96/T\pm1.96/\sqrt{T}±1.96/T​ about 95% of the time.

Lab · what's graded

  • The 95% band15 pts
  • A sample autocorrelation15 pts
  • An AR(1) autocorrelation15 pts
  • Reading the plots15 pts
  • Match the vocabulary15 pts
  • Identifying a model10 pts
  • Returns versus squared returns15 pts
0/ 7 answered
Tasks
1Numeric answer15 ptsNot answered

A return series has T=400T=400T=400 observations. What is the half-width 1.96/T1.96/\sqrt{T}1.96/T​ of the 95% band for its sample autocorrelations? Give it to three decimals.

half=half =half=accepted: ± 0.001
2Numeric answer15 ptsNot answered

The series is 1, 2, 4, 5, 31,\,2,\,4,\,5,\,31,2,4,5,3 with mean 333. Using the sample formula, what is the lag-one autocorrelation ρ^(1)\hat\rho(1)ρ^​(1)?

rho1=rho1 =rho1=accepted: ± 0.01
3Numeric answer15 ptsNot answered

For xt=0.5 xt−1+εtx_t=0.5\,x_{t-1}+\varepsilon_txt​=0.5xt−1​+εt​, what is the autocorrelation at lag three, ρ(3)=φ3\rho(3)=\varphi^{3}ρ(3)=φ3?

rho3=rho3 =rho3=accepted: ± 0.002
4Choice15 ptsNot answered

A series has an ACF that is large at lags 1 and 2 and inside the band afterwards, while its PACF fades slowly. Which model does this suggest?

5Match15 ptsNot answered

Match each term with its meaning.

Pick the partner of each item on the left.

ACF
PACF
Ljung-Box test
White noise
6Order the steps10 ptsNot answered

Put the steps in order.

Drag to reorder, or focus an item, press Space to lift it, the arrow keys to move it and Space to drop it.

  1. 1Run a Ljung-Box test on the residuals
  2. 2Plot the ACF and the PACF
  3. 3Make the series stationary
  4. 4Fit the model the cut-off pattern suggests
7Explain in words15 ptsNot answered

In one or two sentences, explain why daily returns can show almost no autocorrelation while squared returns are strongly autocorrelated.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub