Monetary policy in a factor model

Practicum · Session 10

An annotated MATLAB walkthrough of the course replication and its numerical checks.

Fit the classroom model

Obtain factor_data.mat using the session README and set MATLAB’s Current Folder to the course repository root. The MAT file contains transformed observations, not a dated raw-data workbook. Read the stored calendar provenance before interpreting any historical shock date.

% Estimate the two-step structural DFM and the separate known-parameter filter example.
result = run_session(10);
% Verify the actual classroom panel dimensions rather than a stale source-code comment.
assert(isequal(size(result.data.Y),[242,210]));
% The calendar is asserted from the course script because the MAT file stores no dates.
disp(result.data.calendarSource);
% IC2 selects seven static factors on the fingerprinted input.
assert(size(result.pca.scores,2) == 7);
% Inspect every candidate criterion value rather than reporting only the minimum.
disp(result.factorCriterion);

Seven static factors and four dynamic shocks answer different questions. The former describe the panel’s contemporaneous common variation; the latter retain the leading innovation directions of the factor VAR.

Inspect the discarded covariance

% Reconstruct the rank-four approximation to the seven-dimensional factor covariance.
retainedCovariance = result.dynamicImpact * result.dynamicImpact';
% Subtract it from the full estimated factor innovation covariance.
discardedCovariance = result.var.Sigma-retainedCovariance;
% Symmetric eigenvalues should be nonnegative apart from numerical roundoff.
discardedEigenvalues = eig((discardedCovariance+discardedCovariance')/2);
% Rank reduction must not be presented as exact equality to the original covariance.
assert(trace(discardedCovariance) > 0);
% Verify the truncation left a positive-semidefinite remainder.
assert(min(discardedEigenvalues) > -1e-10);
% Report the retained trace share, approximately 0.8829 on the course input.
disp(result.retainedVarianceShare);

This variance share refers to factor innovations. It is neither a forecast accuracy measure nor the variance explained in GDP by monetary policy. Those quantities require different numerators, denominators, and often a horizon-specific decomposition.

Check shock units

% The unit shocks use the same residual degrees of freedom as the saved VAR covariance.
degreesOfFreedom = result.var.T-result.var.k;
% Recompute the sample covariance of the four projected and rotated structural shocks.
unitCovariance = result.unitShocks * result.unitShocks' / degreesOfFreedom;
% Each unscaled shock has unit variance and is orthogonal to the other retained shocks.
assert(norm(unitCovariance-eye(4),'fro') < 1e-9);
% The policy rate is the third identifying observable and the policy shock is column three.
policyRow = result.identification.identifyingRows(3);
% The separately rescaled displayed response equals fifty basis points on impact.
assert(abs(result.levelResponses(policyRow,3,1)-0.5) < 1e-10);
% Display the scale without applying it to the other three shocks.
disp(result.policyScale);

Follow a missing measurement

% Read the known-parameter scalar filtering example, not an estimated empirical state-space fit.
filtered = result.filterExample;
% The first observation updates the prior mean from zero to 0.8.
assert(abs(filtered.mean(1)-0.8) < 1e-12);
% The missing middle observation still leaves one state transition in the calendar.
assert(abs(filtered.mean(2)-0.64) < 1e-12);
% Its uncertainty rises to 0.488 because no measurement reduces prediction variance.
assert(abs(filtered.covariance(:,:,2)-0.488) < 1e-12);
% The missing measurement contributes no observed-data likelihood term.
assert(filtered.logLikelihood(2) == 0);

The extension demonstrates the mechanics required for ragged-edge nowcasting. It does not estimate a nowcasting model, choose an observation-error covariance for the empirical panel, or evaluate historical data releases.

Worked exercises

Exercises

1. What rank reduction discards

Let \Sigma_F=\operatorname{diag}(9,4,1) and retain q=2 shocks. Construct R, calculate RR', the discarded covariance and the retained variance share. For an innovation \varepsilon=(3,2,5)', find the standardized retained shocks and reconstructed innovation.

Hint: The retained eigenvectors are the first two coordinate vectors.

2. Policy-shock units

A unit-variance structural shock raises the federal funds rate by 0.2 percentage points and moves GDP by -0.003 log points at horizon four. Rescale the response to a fifty-basis-point tightening. State the GDP response in approximate percent. Explain why multiplying every other structural shock by the same factor is unnecessary.

Hint: Fifty basis points equals 0.5 percentage points, not 50 points.

3. A missing observation

Consider a_t=0.8a_{t-1}+\eta_t, Q=0.36, and y_t=a_t+\epsilon_t, H=0.25. The first-date prior is N(0,1) and the observations are (1,\text{missing},0). Work out all three filtered means and variances. Calculate the first log-likelihood contribution.

Hint: A missing measurement skips the update, not the transition.

4. The factor penalty

For a panel with T=200, N=100, suppose V(1)=0.50, V(2)=0.46, and V(3)=0.43. Calculate IC2 at each candidate count and choose the minimum. How would the conclusion differ if only the unpenalized reconstruction error were considered?

Hint: The penalty per factor is (N+T)\log(\min(N,T))/(NT).

What rank reduction discards

The retained impact matrix is

R=\begin{pmatrix}3&0\\0&2\\0&0\end{pmatrix},\qquad RR'=\operatorname{diag}(9,4,0).

The discarded covariance is \operatorname{diag}(0,0,1). The retained trace share is (9+4)/(9+4+1)=13/14\simeq0.928571. It is incorrect to write RR'=\Sigma_F because the third eigenvalue is positive.

With K_q=(e_1,e_2) and M_q=\operatorname{diag}(3,2), the retained standardized shocks for (3,2,5)' are w=M_q^{-1}K_q'\varepsilon=(1,1)'. Reconstruction gives Rw=(3,2,0)', leaving discarded innovation (0,0,5)'. A low-rank approximation can explain a large fraction of unconditional covariance while missing a large component of a particular realized observation.

Policy-shock units

The reporting multiplier is 0.5/0.2=2.5. At horizon four, the GDP response becomes 2.5(-0.003)=-0.0075 log points, or approximately -0.75 percent. The exact proportional change would be 100(e^{-0.0075}-1)\simeq-0.7472 percent.

The original shock series still has unit variance. If the impulse response is rescaled, its innovation-unit interpretation changes and the multiplier must be recorded. The other shock columns describe different disturbances, so applying the policy multiplier to them does not standardize them to an economically comparable intervention. The replication retains unit-variance shocks and stores policyScale separately.

A missing observation

At date one, the innovation is one and F_1=1+0.25=1.25. Thus K_1=1/1.25=0.8, the posterior mean is 0.8, and its variance is (1-0.8)1=0.2. The Gaussian log-likelihood contribution is

\ell_1=-\tfrac12[\log(2\pi)+\log(1.25)+1/1.25] \simeq-1.430510.

At date two, prediction gives mean 0.8(0.8)=0.64 and variance 0.8^2(0.2)+0.36=0.488. No measurement is available, so these are also the posterior moments and the measurement log-likelihood contribution is zero.

At date three, the predicted mean is 0.8(0.64)=0.512 and variance is 0.8^2(0.488)+0.36=0.67232. Now

K_3=\frac{0.67232}{0.67232+0.25}\simeq0.728944,

so the zero observation yields posterior mean 0.512(1-K_3)\simeq0.138780 and variance 0.67232(1-K_3)\simeq0.182236. Deleting the missing second row would apply only one transition between the first and third measurements and produce a different, incorrectly timed answer.

The factor penalty

The penalty per factor is

\frac{100+200}{100\cdot200}\log(100) =0.015\log(100)\simeq0.069078.

Consequently,

\begin{aligned} IC_2(1)&=\log(0.50)+0.069078\simeq-0.624070,\\ IC_2(2)&=\log(0.46)+2(0.069078)\simeq-0.638373,\\ IC_2(3)&=\log(0.43)+3(0.069078)\simeq-0.636737. \end{aligned}

The minimum is at two factors. The third factor improves reconstruction, but not enough to compensate for its additional penalty. Unpenalized reconstruction error would select three among these candidates and, more generally, would keep falling as the retained PCA rank increases. This is precisely why reconstruction fit alone cannot determine a parsimonious factor dimension.