التمويل الكمي · الكتاب 18 · المسارات المهنية

Interviews I: Maths, Probability and Speed

هذا الكتاب غير متوفر بعد باللغة العربية. النسخ المتوفرة: English, Français.

Interviews I: Maths, Probability and Speed · المسارات المهنية

23Time Series

The working tools of return and volatility modelling: stationarity, AR and MA, GARCH, range and high-frequency volatility estimators, unit roots and cointegration, and how to compare forecasts. Questions ask for a number and for the reason that the number misleads.

Question 23.1 ★ QR, QT, DS, Risk • any • junior

Which of these are weakly stationary? (a) White noise. (b) A random walk. (c) An AR(1) with coefficient 0.90.9, started in its stationary distribution. (d) A linear trend plus noise. (e) The first difference of a random walk. (f) xt=Acos⁡(t)+Bsin⁡(t)x_t = A\cos(t) + B\sin(t), where AA and BB are independent standard normals, drawn once.

Answer

Answer to Question 23.1.

Stationary: (a), (c), (e), (f). Not stationary: (b) and (d).

Weak stationarity needs a constant mean, a finite constant variance and an autocovariance that depends only on the lag.

(a) holds by definition. (c) holds, as ∣ϕ∣<1|\phi| < 1 and it starts in its stationary law. (e) is white noise, the increments of the walk. (b) has variance growing with tt. (d) has a changing mean, though removing the trend makes it stationary.

(f) is the surprise. Its mean is 0, its variance is cos⁡2t+sin⁡2t=1\cos^2t + \sin^2t = 1 at every tt, and its covariance is cos⁡(t−s)\cos(t - s), which depends only on the lag. So it is stationary, though every path is a perfect wave. It is not ergodic: one path never reveals that AA and BB could be different, so the time average of xt2x_t^2 gives (A2+B2)/2(A^2 + B^2)/2 and not the variance 1, although the time average of xtx_t does recover the mean 0.

Classic wrong answer. Calling (f) non-stationary because it has a visible pattern, or (d) stationary because it looks stable about its trend.

Follow-up. Why does non-ergodicity matter in practice? Time averages from a single history then need not estimate the ensemble values. Only one path of the market is ever observed.

Why it matters. Stationarity is often stated and rarely tested at the definition. The wave shows that a pattern and stationarity can coexist.

Question 23.2 ★ QR, QT, DS, Risk • any • junior

An AR(1) has xt=0.7xt−1+εtx_t = 0.7x_{t-1} + \varepsilon_t, with noise variance 1. What are the variance and the autocorrelation at lag 3? What is the half-life of a shock? How does the R2R^2 of the hh-step forecast depend on hh, and what is it at h=1h = 1 and h=2h = 2?

Answer

Answer to Question 23.2.

The variance is 1.961.96, the lag-3 autocorrelation 0.3430.343, the half-life 1.941.94 steps, and the R2R^2 is 0.72h0.7^{2h}: 0.490.49 at h=1h = 1 and 0.240.24 at h=2h = 2.

Taking the variance of both sides gives γ0=0.49γ0+1\gamma_0 = 0.49\gamma_0 + 1, so γ0=1/0.51\gamma_0 = 1/0.51. The autocorrelation at lag kk is ϕk\phi^k. A shock decays as ϕh\phi^h, so the half-life is ln⁡2/(−ln⁡0.7)\ln 2/(-\ln 0.7).

The best forecast of xt+hx_{t + h} is ϕhxt\phi^hx_t. It has variance ϕ2hγ0\phi^{2h}\gamma_0, so the share of variance explained is ϕ2h\phi^{2h}. A long simulation confirms the variance, the autocorrelation and the second R2R^2.

As ϕ→1\phi \to 1, the half-life and the variance blow up, and the process approaches a random walk.

Classic wrong answer. Using 1/(1−ϕ)1/(1 - \phi) for the variance, which gives 3.33.3. It is 1/(1−ϕ2)1/(1 - \phi^2).

Follow-up. What is the error variance of the 2-step forecast? 1+ϕ2=1.491 + \phi^2 = 1.49, which equals γ0(1−ϕ4)\gamma_0(1 - \phi^4). Long-horizon error approaches the unconditional variance.

Why it matters. Quick fluency with the workhorse model. The R2R^2 formula makes clear how fast forecastability fades.

Question 23.3 ★ QR, QT, DS, Risk • any • junior

An MA(1) has xt=εt+0.5εt−1x_t = \varepsilon_t + 0.5\varepsilon_{t-1}, with noise variance 1. Give the variance and the autocorrelations at lags 1 and 2. What is the largest possible lag-1 autocorrelation of an MA(1)? Which other value of the coefficient gives the same autocorrelations?

Answer

Answer to Question 23.3.

The variance is 1.251.25, the lag-1 autocorrelation 0.40.4, and the lag-2 autocorrelation 0. The largest possible value is 12\frac12, and the coefficient 2 gives the same autocorrelations.

The variance is (1+θ2)σ2(1 + \theta^2)\sigma^2. The lag-1 covariance is θσ2\theta\sigma^2, as only εt−1\varepsilon_{t - 1} is shared, so ρ1=θ/(1+θ2)=0.5/1.25=0.4\rho_1 = \theta/(1 + \theta^2) = 0.5/1.25 = 0.4. Beyond lag 1 there is no overlap, so autocorrelations vanish. A simulation agrees.

θ/(1+θ2)\theta/(1 + \theta^2) peaks at θ=1\theta = 1 with value 12\frac12. So any lag-1 autocorrelation over 12\frac12 with nothing beyond it cannot come from an MA(1).

Replacing θ\theta with 1/θ1/\theta keeps the ratio. For θ=2\theta = 2: 2/5=0.42/5 = 0.4. The convention picks ∣θ∣<1|\theta| < 1, the invertible form, in which the noise can be recovered from past data.

Classic wrong answer. Giving ρ1=0.5\rho_1 = 0.5, the coefficient itself. That holds for an AR(1) but not here.

Follow-up. Where does a negative MA(1) in returns come from? From noise in observed prices. If p=x+up = x + u, the differences have a ut−ut−1u_t - u_{t - 1} term, and this gives a negative lag-1 autocovariance.

Why it matters. This is the mirror image of the AR(1) and the basis for identifying models from correlations.

Question 23.4 ★ QR, QT, DS, Risk • any • junior

An exponentially weighted variance uses a decay of 0.940.94 on daily squared returns. What weight does the latest day get? What is the half-life of the weights, and the effective number of days? A large move of 5 times the current daily volatility arrives. By what factor does the volatility estimate jump?

Answer

Answer to Question 23.4.

The latest day has weight 6%. The half-life is 11.211.2 days, the effective number of days about 32, and the volatility estimate jumps by a factor of 1.561.56.

The weights are 0.06×0.94k0.06 \times 0.94^k, summing to 1. The half-life solves 0.94k=120.94^k = \frac12, so k=11.2k = 11.2.

The effective sample size is 1/∑wk2=(1+0.94)/(1−0.94)=32.31/\sum w_k^2 = (1 + 0.94)/(1 - 0.94) = 32.3. The mean age of the data is 1/0.06=16.71/0.06 = 16.7 days.

The update is σ^new2=0.94σ^2+0.06r2\hat{\sigma}_{\text{new}}^2 = 0.94\hat{\sigma}^2 + 0.06r^2. With r=5σ^r = 5\hat{\sigma}, this is (0.94+1.5)σ^2=2.44σ^2(0.94 + 1.5)\hat{\sigma}^2 = 2.44\hat{\sigma}^2. The volatility rises by 2.44=1.56\sqrt{2.44} = 1.56. So one day has a large effect, and it persists: after 11 days, half of the added variance remains.

Classic wrong answer. Saying that the volatility rises by 5×6%5 \times 6\%, which mixes up volatility and variance.

Follow-up. How does this relate to GARCH? It is an integrated GARCH(1,1) with ω=0\omega = 0, α=0.06\alpha = 0.06, β=0.94\beta = 0.94. There is no long-run variance to return to, so the forecast is flat at every horizon.

Why it matters. This is the default risk estimate at many desks, and the jump after a large move is what a risk manager has to explain.

Question 23.5 ★★ QR, QT, DS • any • junior, experienced

Consider xt=1.2xt−1−0.5xt−2+εtx_t = 1.2x_{t-1} - 0.5x_{t-2} + \varepsilon_t. Is it stationary? Find the roots of the characteristic polynomial, the modulus and the period of any cycle, and the autocorrelations at lags 1 and 2. What would a shock’s effect look like over time?

Answer

Answer to Question 23.5.

It is stationary, with complex roots 0.6±0.374i0.6 \pm 0.374i of modulus 0.7070.707 and a period of 11.311.3 steps. The autocorrelations are 0.80.8 and 0.460.46.

Stationarity depends on the roots of z2−1.2z+0.5=0z^2 - 1.2z + 0.5 = 0, which are 0.6±0.36−0.50.6 \pm \sqrt{0.36 - 0.5}. Their modulus is 0.5=0.707<1\sqrt{0.5} = 0.707 < 1, so it is stationary.

The argument is arctan⁡(0.374/0.6)=0.558\arctan(0.374/0.6) = 0.558 radians, so the cycle has period 2π/0.558=11.32\pi/0.558 = 11.3.

The Yule–Walker equations give ρ1=ϕ1+ϕ2ρ1\rho_1 = \phi_1 + \phi_2\rho_1, so ρ1=1.2/1.5=0.8\rho_1 = 1.2/1.5 = 0.8. Then ρ2=1.2(0.8)−0.5=0.46\rho_2 = 1.2(0.8) - 0.5 = 0.46. A long simulation gives the same.

A shock has effects 1, 1.21.2, 0.940.94, 0.530.53, …. It first grows, then falls, turns negative at step 5, and oscillates, shrinking by 0.7070.707 per step, which is a damped wave. An AR(1) with a positive coefficient cannot do this. Note that the coefficient 1.21.2 exceeds 1 and is harmless, as what matters is the roots.

Classic wrong answer. Saying that ϕ1>1\phi_1 > 1 makes it explosive, or checking only ϕ1+ϕ2<1\phi_1 + \phi_2 < 1, which leaves out the other conditions.

Follow-up. Does a cycle in the model mean a tradable cycle? Not by itself. The damping is strong, and the wave’s phase wanders with new shocks, so the cycle’s timing is lost within a few periods.

Why it matters. Reading dynamics from the roots is the key skill. Hump-shaped responses appear in macro and in order-flow data.

Question 23.6 ★★ QR, QT, DS • any • junior

A series of 500 points has sample autocorrelations 0.600.60, 0.350.35, 0.220.22, 0.120.12 and sample partial autocorrelations 0.600.60, −0.02-0.02, 0.010.01, 0.030.03. What model do you propose, and what bands do you use to judge significance? What pattern would an MA(1) show, and what would an ARMA(1,1) show?

Answer

Answer to Question 23.6.

An AR(1) with ϕ≈0.6\phi \approx 0.6: the autocorrelations decay geometrically, and the partial autocorrelations cut off after lag 1. The bands are ±2/500=±0.089\pm 2/\sqrt{500} = \pm 0.089.

0.62=0.360.6^2 = 0.36, 0.63=0.220.6^3 = 0.22 and 0.64=0.130.6^4 = 0.13, which fit the first list. The partial autocorrelation at lag kk is the last coefficient in an AR(kk) fit, and it is the correlation left once the lags between are controlled for. After lag 1, all are within the bands, so one lag is enough.

An MA(1) has the reverse: autocorrelation cuts off after lag 1, and the partial ones decay, alternating in sign if the coefficient is positive. An ARMA(1,1) has both decaying, with neither cutting off.

Simulations confirm the signature: a lag-2 regression coefficient near 0 for the AR(1), and near −0.19-0.19 for an MA(1) with coefficient 0.50.5.

The bands are for white noise. Under the fitted AR(1), the sample autocorrelations at higher lags have a wider spread, so the bands understate the uncertainty there.

Classic wrong answer. Fitting a high order because the autocorrelations stay above the band for several lags. A slow decay alone says nothing about the order, and the partial values are what show it.

Follow-up. How many lags will look significant by chance among 20, with no true structure? About one at the 5% level. Testing many lags together is the role of the Ljung–Box statistic.

Why it matters. This is the classic identification table, and it can be asked of real output in a minute.

Question 23.7 ★★ QR, QT, DS • hedge fund, bank • junior, experienced

Returns follow an AR(1) with autocorrelation 0.10.1. What is the variance ratio Var⁡(rt+⋯+rt−q+1)/(qVar⁡rt)\operatorname{Var}(r_t + \dots + r_{t-q+1})/(q\operatorname{Var}r_t) for q=2q = 2 and q=5q = 5? What is the limit for large qq? How much does the usual square-root-of-time annualisation understate volatility?

Answer

Answer to Question 23.7.

1.11.1 and 1.1731.173, with a limit of (1+ρ)/(1−ρ)=1.222(1 + \rho)/(1 - \rho) = 1.222. True long-horizon volatility is about 10.6%10.6\% above the square-root-of-time figure.

The variance of a sum of qq terms gives

VR(q)=1+2∑k=1q−1(1−kq)ρk.\mathrm{VR}(q) = 1 + 2\sum_{k = 1}^{q - 1}\left(1 - \frac{k}{q}\right)\rho_k.

With ρk=0.1k\rho_k = 0.1^k: VR(2)=1+0.1\mathrm{VR}(2) = 1 + 0.1, and VR(5)=1+2(0.8×0.1+0.6×0.01+0.4×0.001+0.2×0.0001)=1.173\mathrm{VR}(5) = 1 + 2(0.8 \times 0.1 + 0.6 \times 0.01 + 0.4 \times 0.001 + 0.2 \times 0.0001) = 1.173. A long simulation agrees.

For large qq, the sum tends to 1+2ρ/(1−ρ)=1.2221 + 2\rho/(1 - \rho) = 1.222. Volatility scales by the root of the ratio, 1.222=1.106\sqrt{1.222} = 1.106. So a small daily autocorrelation adds 10.6% to annual volatility, and it would turn a measured annual Sharpe ratio of 1 into about 0.90.9.

With ρ<0\rho < 0, the ratio drops below 1, as for mean-reverting returns, which look worse on daily data than on long horizons.

Classic wrong answer. Using VR(q)=1+(q−1)ρ\mathrm{VR}(q) = 1 + (q - 1)\rho, which ignores both the weights and the decay of ρk\rho_k.

Follow-up. A fund’s monthly returns have autocorrelation 0.30.3. What does this suggest? Stale marks or smoothing, more likely than skill, and it means that the true volatility is higher by a factor of about 1.857=1.36\sqrt{1.857} = 1.36.

Why it matters. This is the simplest test of the random walk, and it has a direct effect on any annualised number.

Question 23.8 ★★ QR, QT, DS, Risk • hedge fund, bank • junior, experienced

A GARCH(1,1) has σt2=ω+αrt−12+βσt−12\sigma_t^2 = \omega + \alpha r_{t-1}^2 + \beta\sigma_{t-1}^2, with α=0.1\alpha = 0.1, β=0.85\beta = 0.85 and ω=2×10−6\omega = 2 \times 10^{-6}. Find the long-run variance and the annual volatility, with 252 days. How long does a volatility shock take to halve? If today’s variance is four times the long-run value, what is the forecast 10 days ahead?

Answer

Answer to Question 23.8.

The long-run variance is 4×10−54 \times 10^{-5}, or 10% annual volatility, the half-life is 13.513.5 days, and the forecast is 2.82.8 times the long-run variance, or 16.8%16.8\%.

Taking expectations of the recursion, V=ω+(α+β)VV = \omega + (\alpha + \beta)V, so V=ω/(1−α−β)=2×10−6/0.05V = \omega/(1 - \alpha - \beta) = 2 \times 10^{-6}/0.05. Annualising gives 252V=10%\sqrt{252V} = 10\%.

The conditional forecast obeys Eσt+h2−V=(α+β)h(σt2−V)\mathbb{E}\sigma_{t + h}^2 - V = (\alpha + \beta)^h(\sigma_t^2 - V). So shocks decay at 0.950.95 per day, with half-life ln⁡0.5/ln⁡0.95=13.5\ln 0.5/\ln 0.95 = 13.5.

Today’s excess is 3V3V. After 10 days, it is 0.9510×3V=1.8V0.95^{10} \times 3V = 1.8V, so the forecast is 2.8V2.8V, an annual volatility of 16.8%16.8\%. A Monte Carlo over the recursion gives 2.82.8.

If α+β=1\alpha + \beta = 1, VV does not exist, and the forecast stays flat.

Classic wrong answer. Applying the decay to volatility, not variance. The recursion is linear in variance only.

Follow-up. What does this imply for the term structure of forecast volatility? It rises or falls smoothly toward 10% as the horizon grows. The average variance over hh days is what matters for a term volatility.

Why it matters. GARCH(1,1) is the baseline for volatility forecasting. A candidate should read persistence and the long-run level straight off the coefficients.

Question 23.9 ★★ QR, QT, DS, Risk • hedge fund, market maker • junior, experienced

A day’s high and low have ratio H/L=1.02H/L = 1.02. What does the Parkinson estimator (ln⁡(H/L))2/(4ln⁡2)(\ln(H/L))^2/(4\ln 2) give as a daily volatility? How much more efficient is it than one squared close-to-close return? Give the two main ways in which it goes wrong on real data.

Answer

Answer to Question 23.9.

The daily volatility is 1.19%1.19\%. It is about five times as efficient as one squared return. Discrete sampling biases it low, and bid-ask bounce biases it high.

ln⁡1.02=0.0198\ln 1.02 = 0.0198, so the estimate is 0.01982/(4ln⁡2)=1.41×10−40.0198^2/(4\ln 2) = 1.41 \times 10^{-4}, whose root is 1.19%1.19\%.

The constant comes from ER2=4ln⁡2 σ2\mathbb{E}R^2 = 4\ln 2\,\sigma^2 for the range RR of a driftless Brownian motion. A squared return has relative variance 2. The Parkinson estimator has relative variance about 0.410.41, which gives a ratio of 4.94.9. In a simulation with fine steps, the ratio is between 4.34.3 and 5.55.5.

On real data, it goes wrong in two main ways. First, the true high and low fall between prints, so the observed range is too small. With 78 prices a day, a simulation shows the variance estimate about 14% too low, about 7% in volatility. Second, prints at the bid and at the ask extend the range, and that pushes it up, more so in illiquid names. Overnight moves are also missed entirely, so the estimator describes trading hours only, and drift inflates it slightly.

Classic wrong answer. Treating the fivefold gain as free. It relies on the model, and the two biases work against each other in ways that depend on the stock.

Follow-up. How would you combine the range and the returns? Use estimators of the Garman–Klass type that use open, high, low and close, and add a close-to-open term for the night.

Why it matters. Range estimators are cheap and useful, and the interviewer wants the efficiency figure together with the reasons not to trust it.

Question 23.10 ★★ QR, QT • market maker, hedge fund • junior, experienced

The observed log price is the efficient price plus independent noise of standard deviation 0.05%0.05\%, and the efficient price has a daily volatility of 1%. What does the realised variance from nn equal intraday returns have as its mean? What is the relative bias with 78 returns a day, and with 390? How does the noise show up in the autocovariance of returns?

Answer

Answer to Question 23.10.

The mean is σ2+2nη2\sigma^2 + 2n\eta^2. The relative bias is +39%+39\% at 78 returns and +195%+195\% at 390. The noise gives returns a lag-1 autocovariance of −η2-\eta^2.

An observed return is Δx+Δu\Delta x + \Delta u, with Δu=ut−ut−1\Delta u = u_t - u_{t - 1} of variance 2η22\eta^2. Summing nn squared returns gives σ2\sigma^2 from the efficient price and 2nη22n\eta^2 from the noise. The noise term grows with nn, while the signal does not.

With σ2=10−4\sigma^2 = 10^{-4} and η2=2.5×10−7\eta^2 = 2.5 \times 10^{-7}: 2×78×2.5×10−7=3.9×10−52 \times 78 \times 2.5 \times 10^{-7} = 3.9 \times 10^{-5}, or 39%39\% of σ2\sigma^2. At 390, it is five times as large. A simulation with these numbers matches the formula within 1%.

Consecutive returns share utu_t with opposite signs, so the autocovariance is −η2-\eta^2 whatever the frequency. A plot of realised variance against the sampling frequency, the signature plot, rises as the steps shrink.

Roll’s estimate reads the same effect as a spread: with bounce of half-spread s/2s/2, η=s/2\eta = s/2, and s=2−Cov⁡s = 2\sqrt{-\operatorname{Cov}}. Here this is a spread of 0.1%0.1\%.

Classic wrong answer. Assuming that more data always means a better estimate. In this setting, the highest frequency gives the worst estimate of all if nothing is done about the noise.

Follow-up. How can autocovariance be used to correct realised variance? Add twice the first-order autocovariance sum to the realised variance, which removes the 2nη22n\eta^2 bias in this model. This is the idea behind realised kernels.

Why it matters. This is the first thing that goes wrong with high-frequency data. The sign of the autocovariance is a useful diagnostic.

Question 23.11 ★★ QR, QT, DS • hedge fund, bank • junior, experienced

You estimate xt=ρxt−1+εtx_t = \rho x_{t-1} + \varepsilon_t when in truth ρ=1\rho = 1. Why does the usual tt-statistic on ρ^−1\hat{\rho} - 1 not use the normal table? What are the 5% critical values with no constant and with a constant? With a constant and 250 observations, about what value of ρ^\hat{\rho} do you expect? Show these by simulation.

Answer

Answer to Question 23.11.

Under a unit root, the regressor is non-stationary, so the statistic has a non-normal limit. The critical values are −1.95-1.95 and −2.87-2.87. Expect ρ^≈0.979\hat{\rho} \approx 0.979.

The usual asymptotics rely on 1T∑xt−12\frac{1}{T}\sum x_{t - 1}^2 settling to a constant. Under a random walk, it grows like TT and stays random. So the limit is a ratio of functionals of Brownian motion, and it is skewed to the left. A simulation of 40 00040\,000 paths with T=250T = 250 gives the 5% quantiles as −1.95-1.95 with no constant and −2.87-2.87 with a constant.

The estimate itself is biased downward. With a constant, Eρ^≈1−5.3/T\mathbb{E}\hat{\rho} \approx 1 - 5.3/T, or 0.9790.979 at T=250T = 250, which a simulation confirms. So a random walk looks mean-reverting, with an apparent half-life of about 33 days. A test using the normal table at −1.645-1.645 would reject the true unit root about 45% of the time with a constant.

Removing the constant does not solve this: the 5% value is still far from normal, and it requires a mean of zero, which is rarely a safe assumption.

Classic wrong answer. Comparing the statistic with −1.645-1.645. It is the commonest way to discover pairs that do not exist.

Follow-up. Why is the bias so much worse with a constant? The demeaned series borrows from the future, so the regressor is correlated with later noise. This is a shift of about 5.3/T5.3/T rather than about 1.8/T1.8/T.

Why it matters. Every mean-reversion trade rests on this test. Knowing the bias and the critical values prevents the commonest error in pairs research.

Question 23.12 ★★ QR, QT, DS • hedge fund • junior, experienced

Two forecasts are compared over 400 periods. The difference in their squared errors has mean 0.020.02 and standard deviation 0.20.2. Find the Diebold–Mariano statistic if these differences are serially independent, and if they are AR(1) with coefficient 0.20.2. What changes if one model was chosen as the best of many?

Answer

Answer to Question 23.12.

The statistic is 2.02.0 under independence, and 1.631.63 with the AR(1). Selection of the best of many models makes even 2.02.0 weak.

Diebold–Mariano is a tt-statistic on the mean difference in loss. With independence, it is 0.02/(0.2/400)=2.00.02/(0.2/\sqrt{400}) = 2.0, a two-sided pp-value of 0.0460.046.

With autocorrelation, the variance of the mean is multiplied by the long-run factor (1+ρ)/(1−ρ)=1.5(1 + \rho)/(1 - \rho) = 1.5. So the statistic is 2.0/1.5=1.632.0/\sqrt{1.5} = 1.63, a pp-value of 0.100.10. Simulated AR(1) series with these parameters give the same standard error for the mean. Forecast errors at horizons above one step overlap, and they normally have this kind of dependence. So a heteroskedasticity and autocorrelation consistent estimate, with lags to match, is needed.

If one model is the best of 20 candidates, then the expected best null statistic is already about 1.871.87. A value of 2.02.0 is then hardly evidence, and a reality check of the data-snooping type, or a separate holdout, is needed. The test also compares forecasts as given, so if the models are nested, or the estimation noise matters, the limit is not standard.

Classic wrong answer. Using the plain standard error for overlapping forecasts. A pp-value that crosses 5% often no longer does after that correction.

Follow-up. What is the difference between in-sample and out-of-sample fit here? This test scores out-of-sample forecasts. In-sample fit always favours the larger model, and it would say nothing here.

Why it matters. Claims of improvement need a standard error, and comparing forecasts is how models are picked. The two adjustments cover most real cases.

Question 23.13 ★★ QR, QT • hedge fund • junior, experienced

xtx_t is a random walk, and yt=2xt+uty_t = 2x_t + u_t, where utu_t is an AR(1) with coefficient 0.90.9. What are the orders of integration of xx, yy and uu? What are the half-life of the spread, and the rate at which the regression slope converges? Describe the two steps of Engle–Granger, and say why the second step cannot use the usual table. How does this differ from regressing two independent random walks?

Answer

Answer to Question 23.13.

xx and yy are I(1), and uu is I(0). The half-life is 6.66.6 steps, and the slope converges at rate 1/T1/T, not 1/T1/\sqrt{T}. Engle–Granger regresses, and then tests the residuals with a special table.

yy and xx wander, while y−2xy - 2x does not. That is cointegration with vector (1,−2)(1, -2). The half-life of uu is ln⁡2/(−ln⁡0.9)=6.6\ln 2/(-\ln 0.9) = 6.6.

The slope is superconsistent. Since ∑x2\sum x^2 grows like T2T^2, the error ∑xu/∑x2\sum xu/\sum x^2 shrinks like 1/T1/T. In a run, quadrupling TT reduces the slope’s error by a factor of about 4, against 2 in a stationary regression.

Step one: regress yy on xx and take the residuals. Step two: test the residuals for a unit root. The usual table fails because β^\hat{\beta} is chosen to make the residuals as small as possible, so they look stationary even when they are not. On two independent walks with T=500T = 500, the 5% critical value comes out near −3.37-3.37, far from −1.95-1.95 or −1.65-1.65.

With two independent walks, the regression is spurious: the slope stays random, and the tt-statistic rejects zero over 70% of the time at the 5% level. Cointegration is the case in which such a regression has a real meaning, and the residual test tells them apart.

Classic wrong answer. Testing whether the correlation of the levels is high, or testing with the plain Dickey–Fuller table. Correlation of returns or of levels says nothing about whether a spread comes back.

Follow-up. What can you do with several assets? Use the Johansen method, a system approach that estimates how many stationary combinations exist, up to the number of assets less one.

Why it matters. It is the theoretical base of pairs trading. A candidate must know how it differs from correlation and from spurious regression.

Question 23.14 ★★★ QR, QT, DS • hedge fund, bank • experienced

For the GARCH(1,1) with normal innovations, α=0.1\alpha = 0.1 and β=0.85\beta = 0.85, the kurtosis is 3(1−(α+β)2)/(1−(α+β)2−2α2)3(1 - (\alpha + \beta)^2)/(1 - (\alpha + \beta)^2 - 2\alpha^2). Derive this by taking the fourth moment. Evaluate it. What is the condition for it to be finite? The returns themselves are uncorrelated. What are the lag-1 autocorrelation of the squared returns, given by α(1−αβ−β2)/(1−2αβ−β2)\alpha(1 - \alpha\beta - \beta^2)/(1 - 2\alpha\beta - \beta^2), and its decay rate?

Answer

Answer to Question 23.14.

The kurtosis is 3.773.77, finite when (α+β)2+2α2<1(\alpha + \beta)^2 + 2\alpha^2 < 1. The lag-1 autocorrelation of the squares is 0.1790.179, decaying at 0.950.95 per lag.

Let V=Eσ2V = \mathbb{E}\sigma^2, s=α+βs = \alpha + \beta and m=Eσ4m = \mathbb{E}\sigma^4. Square the recursion and use Er4=3Eσ4\mathbb{E}r^4 = 3\mathbb{E}\sigma^4 and E[r2σ2]=m\mathbb{E}[r^2\sigma^2] = m, which follow since r=σzr = \sigma z with zz independent of σ\sigma:

m=ω2+2ωsV+(3α2+2αβ+β2)m.m = \omega^2 + 2\omega sV + (3\alpha^2 + 2\alpha\beta + \beta^2)m.

Note that 3α2+2αβ+β2=s2+2α23\alpha^2 + 2\alpha\beta + \beta^2 = s^2 + 2\alpha^2. With ω=V(1−s)\omega = V(1 - s), the constant term is V2(1−s)(1+s)V^2(1 - s)(1 + s). So

m=V2(1−s2)1−s2−2α2,κ=3mV2=3(1−s2)1−s2−2α2.m = \frac{V^2(1 - s^2)}{1 - s^2 - 2\alpha^2}, \qquad \kappa = \frac{3m}{V^2} = \frac{3(1 - s^2)}{1 - s^2 - 2\alpha^2}.

With s=0.95s = 0.95 and α=0.1\alpha = 0.1: 3×0.0975/0.0775=3.773 \times 0.0975/0.0775 = 3.77. The condition for finiteness is a positive denominator. Here 0.9025+0.02<10.9025 + 0.02 < 1, so it holds. At α=0\alpha = 0, κ=3\kappa = 3, as it must be for a normal.

The squares follow an ARMA(1,1) with autoregressive coefficient ss, and the given formula has value 0.1×0.1925/0.1075=0.1790.1 \times 0.1925/0.1075 = 0.179. Each further lag multiplies this by 0.950.95. A simulation of two million steps gives these values, and a return autocorrelation near 0.

So the returns have no linear memory, while their sizes do. The value 0.1790.179 looks modest, yet the slow decay gives substantial total persistence.

Classic wrong answer. Assuming that fat tails need fat-tailed innovations. Here normal innovations give excess kurtosis through the mixing of variances, although real data usually need more.

Follow-up. What is the kurtosis if α\alpha is doubled with α+β\alpha + \beta unchanged? 3×0.0975/(0.0975−0.08)=16.73 \times 0.0975/(0.0975 - 0.08) = 16.7. It is close to the edge: at α≈0.221\alpha \approx 0.221 it becomes infinite. So the fourth moment is very sensitive to α\alpha, and sample kurtosis is an unstable target.

Why it matters. This derivation checks that the candidate can work with moments of a recursion. It explains two stylised facts at once.

Question 23.15 ★★★ QR, QT, DS • hedge fund, bank • experienced

A perfect forecast of the conditional variance σt2\sigma_t^2 is scored against the squared return rt2r_t^2. Show that the R2R^2 of this regression is at most (κ/3−1)/(κ−1)(\kappa/3 - 1)/(\kappa - 1), where κ\kappa is the return’s kurtosis and the innovations are normal. Evaluate this for the GARCH(1,1) with kurtosis 3.773.77. What does it say about judging volatility models? How do you fix the comparison?

Answer

Answer to Question 23.15.

The R2R^2 is (κ/3−1)/(κ−1)=0.093(\kappa/3 - 1)/(\kappa - 1) = 0.093, even for a perfect forecast. So the low R2R^2 against squared returns says little, and a better proxy for the variance is the fix.

Write r2=σ2z2r^2 = \sigma^2z^2, with Ez2=1\mathbb{E}z^2 = 1 and zz independent of σ2\sigma^2. Then the regression of r2r^2 on σ2\sigma^2 has slope 1, and R2=Var⁡σ2/Var⁡r2R^2 = \operatorname{Var}\sigma^2/\operatorname{Var}r^2.

Using Er4=3Eσ4\mathbb{E}r^4 = 3\mathbb{E}\sigma^4 and Er4=κV2\mathbb{E}r^4 = \kappa V^2: Var⁡σ2=(κ/3−1)V2\operatorname{Var}\sigma^2 = (\kappa/3 - 1)V^2 and Var⁡r2=(κ−1)V2\operatorname{Var}r^2 = (\kappa - 1)V^2. At κ=3.77\kappa = 3.77: 0.257/2.77=0.0930.257/2.77 = 0.093. A simulation of the GARCH itself gives this figure when the forecast is the true σ2\sigma^2.

So R2R^2 values of 5% to 10% are what perfect models would produce, and the critics who cite them are measuring the proxy’s noise, which is enormous for a one-observation estimate. An imperfect model does worse, which is why the formula is an upper bound for this model.

The fix is a less noisy proxy: realised variance from intraday returns. With 78 normal sub-returns, the noise χ782/78\chi^2_{78}/78 has variance 2/782/78, and the formula becomes

R2=κ/3−1κ/3−1+(κ/3)(2/78)=0.89.R^2 = \frac{\kappa/3 - 1}{\kappa/3 - 1 + (\kappa/3)(2/78)} = 0.89.

A simulation agrees with this within 0.050.05. Also, compare models with a loss that is robust to proxy noise, either squared error or the quasi-likelihood loss, and avoid absolute errors of volatility, which can favour the wrong model.

Classic wrong answer. Concluding that GARCH does not forecast, from an R2R^2 of a few percent against squared returns. The test had almost no power in the first place.

Follow-up. What does κ=3\kappa = 3 give, and why? R2=0R^2 = 0: variance is constant, so there is nothing to forecast. The formula gives the sensible limit.

Why it matters. This is a well-known confusion in volatility research, with a two-line resolution. It shows whether the candidate separates a model’s quality from its measurement.

Question 23.16 ★★★ QR, QT • hedge fund • experienced

A return is rt=μt+εtr_t = \mu_t + \varepsilon_t, where the expected return μt\mu_t is a slow AR(1) with coefficient ϕ=0.9\phi = 0.9 and where the noise is white and independent of it. The signal is R2=1%R^2 = 1\% of total variance. What is the lag-1 autocorrelation of returns, and at lag kk? What ARMA model does rr follow? Why can return autocorrelations look like nothing while the predictability is real?

Answer

Answer to Question 23.16.

ρk=R2ϕk\rho_k = R^2\phi^k, so ρ1=0.009\rho_1 = 0.009 and ρ10=0.0035\rho_{10} = 0.0035. The return follows an ARMA(1,1) with ϕ=0.9\phi = 0.9 and a moving-average coefficient of about 0.890.89. The autocorrelations are too small to see, and yet they add up.

Since the noise is white and independent, Cov⁡(rt,rt−k)=Cov⁡(μt,μt−k)=ϕkVar⁡μ\operatorname{Cov}(r_t, r_{t - k}) = \operatorname{Cov}(\mu_t, \mu_{t - k}) = \phi^k\operatorname{Var}\mu. Dividing by the variance of rr gives R2ϕkR^2\phi^k.

Geometric decay from lag 1 on is the signature of an ARMA(1,1), and an AR(1) plus white noise is exactly that. In the form rt−ϕrt−1=et−θet−1r_t - \phi r_{t - 1} = e_t - \theta e_{t - 1}, matching the lag-1 autocorrelation gives θ≈0.891\theta \approx 0.891, which nearly cancels the root at 0.90.9. So it looks like white noise.

To detect ρ1=0.009\rho_1 = 0.009 at t=2t = 2 takes (2/0.009)2≈49 000(2/0.009)^2 \approx 49\,000 observations, or about 196 years of daily data. A simulation of four million steps does show it.

The effect is nonetheless real. The sum of the autocorrelations gives a long-run variance ratio of 1+2R2ϕ/(1−ϕ)=1.181 + 2R^2\phi/(1 - \phi) = 1.18. So long-horizon returns are more predictable than short-horizon ones: the correlations are small but they all have the same sign.

The key is how the predictability is reached. If μt\mu_t can be observed through a separate signal, the R2R^2 is 1%. The best forecast from past returns alone reaches only about 0.04%0.04\%, as both the ARMA innovation variance and a steady-state Kalman filter show. So return history is a poor way to find such a signal.

Classic wrong answer. Concluding from insignificant autocorrelations that returns are unpredictable. Low autocorrelation fits both no signal and a persistent signal under much noise.

Follow-up. How do you exploit this with no outside signal? Mostly you cannot, at this R2R^2. Long-horizon regressions gain a little, but they mostly reuse the same data and call for overlap corrections.

Why it matters. This resolves an apparent paradox in empirical finance, and it shows why external signals matter more than return history.

Question 23.17 ★★★ QR, QT, DS, Risk • hedge fund, bank • experienced

Returns are normal given a state, with annualised volatility of 10% in a calm state and 30% in a stressed state. The state is a Markov chain that stays calm with probability 0.950.95 and stressed with probability 0.90.9. Find the stationary shares, the unconditional volatility and the kurtosis. How does the autocorrelation of squared returns decay?

Answer

Answer to Question 23.17.

The stationary shares are 23\frac23 and 13\frac13, the volatility is 19.1%19.1\%, the kurtosis is 6.176.17, and the autocorrelation of the squares decays as 0.85k0.85^k.

For the shares, balance the flows: 23×0.05=13×0.1\frac23 \times 0.05 = \frac13 \times 0.1.

The variance is a mixture: 23(0.01)+13(0.09)=0.0367\frac23(0.01) + \frac13(0.09) = 0.0367, so the volatility is 19.1%19.1\%. A calm-state share of two thirds still leaves most variance in the stressed state.

For kurtosis, the normal has Er4=3σ4\mathbb{E}r^4 = 3\sigma^4 in each state:

κ=3(23×0.0001+13×0.0081)0.03672=6.17.\kappa = \frac{3(\frac23 \times 0.0001 + \frac13 \times 0.0081)}{0.0367^2} = 6.17.

This much kurtosis comes from mixing alone, with no fat tails in either state.

The chain’s memory is its second eigenvalue, λ=0.95+0.9−1=0.85\lambda = 0.95 + 0.9 - 1 = 0.85. Conditional on the state, rt2r_t^2 and rt+k2r_{t + k}^2 are independent, so their covariance is the covariance of the state variances, which decays as λk\lambda^k. The half-life is 4.34.3 days. The level is set by the share of Var⁡r2\operatorname{Var}r^2 due to the state: ρk=0.204λk\rho_k = 0.204\lambda^k.

A four-million-step simulation returns 19.1%19.1\%, a kurtosis near 6.26.2, and the 0.850.85 decay. As the states approach each other, the kurtosis goes to 3, and the autocorrelation to 0.

Classic wrong answer. Averaging volatilities, 23(10)+13(30)=16.7%\frac23(10) + \frac13(30) = 16.7\%. Variances mix, and volatilities do not.

Follow-up. How does this model differ from GARCH with the same persistence? The memory is that of an unobserved state, not of past returns as such. A large move raises the forecast only through what it says about the state, which can be a sharp jump, capped at the stressed variance, and not an increase proportional to r2r^2. From a prior of 0.050.05, a return of 4 calm-state deviations lifts the stressed probability to 0.9560.956, and the next day’s variance forecast by a factor of 4.54.5. Filtering the state is an inference problem.

Why it matters. Regime models are often mentioned without numbers. These numbers come from a two-state chain and a line of algebra.

Question 23.18 ★★★ QR, QT, DS • hedge fund • junior, experienced

You fit an AR(1) by least squares with a constant to 100 points of a mean-reverting spread, where the true coefficient is 0.950.95. Use the bias formula Eϕ^−ϕ≈−(1+3ϕ)/T\mathbb{E}\hat{\phi} - \phi \approx -(1 + 3\phi)/T to find the expected estimate. What does that do to the half-life you report? Why does the bias arise, and how can you correct it?

Answer

Answer to Question 23.18.

Eϕ^≈0.9115\mathbb{E}\hat{\phi} \approx 0.9115, so the reported half-life is about 7.57.5 steps, against a true 13.513.5. More than half the bias comes from estimating the mean, and a jackknife removes most of it.

The bias is −(1+3×0.95)/100=−0.0385-(1 + 3 \times 0.95)/100 = -0.0385, so the expected estimate is 0.91150.9115. Half-lives are ln⁡0.5/ln⁡ϕ\ln 0.5/\ln\phi: 13.513.5 at 0.950.95, and 7.57.5 at 0.91150.9115. A simulation of 200 000200\,000 samples gives a mean estimate of 0.9060.906 and a median half-life of about 7.97.9, so at this length the true bias is a little larger than the formula’s.

There are two sources. Even with a known mean, ϕ^\hat{\phi} is biased by about −2ϕ/T-2\phi/T, because the shock εt\varepsilon_t enters later regressors. Demeaning adds about −(1+ϕ)/T-(1 + \phi)/T: the mean of the sample includes the later noise terms, so the demeaned xt−1x_{t - 1} moves against εt\varepsilon_t, and the estimate falls. Here the formulas give −0.019-0.019 and −0.0195-0.0195, and the simulation −0.017-0.017 and −0.027-0.027. Near 1 the correction is the largest, and with a small TT it can make any random walk look like a reverting one.

So a backtest that selects spreads with short half-lives favours exactly those with the most bias, and expected profits are overstated.

To correct it, a half-sample jackknife uses 2ϕ^−12(ϕ^1+ϕ^2)2\hat{\phi} - \frac12(\hat{\phi}_1 + \hat{\phi}_2), where the last two are from the two halves. Since the bias is of order 1/T1/T, this cancels most of it. In the simulation, the mean returns to 0.9530.953. Direct use of the formula, solving ϕ^=ϕ−(1+3ϕ)/T\hat{\phi} = \phi - (1 + 3\phi)/T for ϕ\phi, gives 0.9450.945. Simulation-based or median-unbiased estimates are also used. All of these have a larger variance, which is the cost.

Classic wrong answer. Reporting the half-life from the raw estimate. A half-life is a highly nonlinear function near ϕ=1\phi = 1, so small biases have large effects.

Follow-up. Solve the formula for this sample. ϕ=(ϕ^T+1)/(T−3)=(0.9115×100+1)/97=0.95\phi = (\hat{\phi}T + 1)/(T - 3) = (0.9115 \times 100 + 1)/97 = 0.95, which recovers the truth by construction when the estimate is at the formula’s mean.

Why it matters. Half-life estimates decide how much capital a pairs book carries. The bias works in the direction that flatters every candidate.

Question 23.19 ★★★★ QR, QT • hedge fund • experienced

Under a unit root with no constant, derive the limit laws of T(ρ^−1)T(\hat{\rho} - 1) and of the tt-statistic, as functionals of a Brownian motion on [0,1][0, 1]. Find the distribution of the numerator, and the probability that it is negative. Check the 5% critical value of the tt-statistic and the mean of T(ρ^−1)T(\hat{\rho} - 1) by simulation.

Answer

Answer to Question 23.19.

T(ρ^−1)→12(W12−1)/∫01W2T(\hat{\rho} - 1) \to \frac12(W_1^2 - 1)/\int_0^1W^2, and the tt-statistic tends to 12(W12−1)/∫01W2\frac12(W_1^2 - 1)/\sqrt{\int_0^1W^2}. The numerator is negative with chance 0.6830.683. The 5% value is −1.95-1.95, and the mean is about −1.78-1.78.

Start with ρ^−1=∑xt−1εt/∑xt−12\hat{\rho} - 1 = \sum x_{t - 1}\varepsilon_t/\sum x_{t - 1}^2, where xt=∑i≤tεix_t = \sum_{i \le t}\varepsilon_i.

Squaring, xt2=xt−12+2xt−1εt+εt2x_t^2 = x_{t - 1}^2 + 2x_{t - 1}\varepsilon_t + \varepsilon_t^2. Summing,

∑txt−1εt=12(xT2−∑tεt2).\sum_tx_{t - 1}\varepsilon_t = \frac12\left(x_T^2 - \sum_t\varepsilon_t^2\right).

By Donsker’s theorem, x⌊Ts⌋/(σT)→Wsx_{\lfloor Ts\rfloor}/(\sigma\sqrt{T}) \to W_s. And ∑εt2/T→σ2\sum\varepsilon_t^2/T \to \sigma^2. So the numerator divided by σ2T\sigma^2T tends to 12(W12−1)\frac12(W_1^2 - 1). The denominator divided by σ2T2\sigma^2T^2 tends to ∫01W2\int_0^1W^2.

Taking the ratio, the factors of TT give T(ρ^−1)T(\hat{\rho} - 1), and the σ\sigma cancels. For the tt-statistic, the standard error is s/∑xt−12s/\sqrt{\sum x_{t - 1}^2}, with s→σs \to \sigma, so it tends to the numerator over ∫W2\sqrt{\int W^2}.

The numerator is 12(χ12−1)\frac12(\chi_1^2 - 1), a shifted chi-square, and it is negative when ∣W1∣<1|W_1| < 1, which has probability 0.6830.683. So ρ^<1\hat{\rho} < 1 about two times in three, even with a true unit root. That is the source of the left skew.

A simulation on T=500T = 500 and a direct evaluation of the functional on a fine grid agree: the mean of T(ρ^−1)T(\hat{\rho} - 1) is about −1.78-1.78, and the tt quantile is −1.95-1.95. The normal value −1.645-1.645 would reject 9.5%9.5\% of the time, not 5%. The denominator has mean 12\frac12, and it is random in the limit, which is the whole reason that normality fails.

Classic wrong answer. Applying a central limit theorem to the numerator alone. The sum is not normal: it is a chi-square shifted. Each shock is independent of its regressor, but the sizes of the terms are set by xt−1x_{t - 1}, which grows and stays random, so the sum’s conditional variance stays random even after scaling.

Follow-up. What does a constant change in the limit? Write the limit as ∫01W dW/∫01W2\int_0^1W\,dW/\int_0^1W^2. Then WW is replaced by the demeaned Wμ=W−∫01WW^\mu = W - \int_0^1W in both integrals, so the numerator becomes 12(W12−1)−W1∫01W\frac12(W_1^2 - 1) - W_1\int_0^1W. The law shifts left, and the 5% value moves to about −2.86-2.86.

Why it matters. This is a compact use of Brownian functionals in econometrics, and it is the proof behind the most used test in the field.

Question 23.20 ★★★★ QR, QT • market maker, hedge fund • experienced

The efficient price has daily variance σ2\sigma^2, and the noise has variance η2\eta^2, as in a standard model of market microstructure noise. Write the mean squared error of realised variance as a function of nn, keeping the main terms, and find the best nn, for σ=1%\sigma = 1\% and η=0.05%\eta = 0.05\%. Then show how averaging over subsamples and subtracting a bias term gives an estimator that uses all the data and has no first-order bias, and test it by simulation.

Answer

Answer to Question 23.20.

The error is about 2σ4/n+4n2η42\sigma^4/n + 4n^2\eta^4, with the best n=(σ4/(4η4))1/3≈34n = (\sigma^4/(4\eta^4))^{1/3} \approx 34. Two-scale averaging uses all the ticks and has no first-order bias.

With nn returns, the bias is 2nη22n\eta^2, so its square is 4n2η44n^2\eta^4. The variance comes mainly from the efficient price, and for a constant volatility it is 2σ4/n2\sigma^4/n. There are also smaller noise terms, of order nη4n\eta^4 and σ2η2\sigma^2\eta^2. Setting the derivative to zero gives n3=σ4/(4η4)=40 000n^3 = \sigma^4/(4\eta^4) = 40\,000, so n=34n = 34: about one return per 11 minutes of a 6.5-hour day. A search over the full curve, including the smaller terms, also lands near there.

The sparse estimator discards most of the data. Two-scale realised variance keeps it. Divide NN ticks into kk offset subgrids, each of about nˉ=(N−k+1)/k\bar{n} = (N - k + 1)/k returns. Let RV‾\overline{\mathrm{RV}} be the average of their realised variances, whose mean is σ2+2nˉη2\sigma^2 + 2\bar{n}\eta^2, and let RVall\mathrm{RV}^{\text{all}} use all the ticks, with mean about 2Nη22N\eta^2. Then

TSRV=RV‾−nˉNRVall\mathrm{TSRV} = \overline{\mathrm{RV}} - \frac{\bar{n}}{N}\mathrm{RV}^{\text{all}}

has mean σ2\sigma^2, since the all-ticks estimate is essentially an estimate of the noise.

The simulation has 23 40023\,400 ticks with these parameters, and k=300k = 300. The all-ticks estimate has mean about 118 times the truth. TSRV has a mean within 3% of it. Its root mean squared error is between 10% and 30% of σ2\sigma^2, and it is below that of the sparse estimator at n=34n = 34, as a good estimator using more data should be.

These assume independent noise. Real noise is autocorrelated and depends on order flow, which is one reason for using more elaborate kernels. And trade time often does better than clock time.

Classic wrong answer. Choosing a 5-minute grid by habit with no reference to the noise. That is often reasonable but it is the result of this calculation for a certain noise level, not a law.

Follow-up. What does the best nn become if the noise doubles? The formula shows n∝η−4/3n \propto \eta^{-4/3}, so nn falls by a factor of 24/3=2.52^{4/3} = 2.5, to about 14 returns a day.

Why it matters. A clean trade-off followed by the idea of using the noisy estimator to correct itself. It connects model-based thinking directly to what is done with tick data.