Formally, the problem being solved is:
fftargmax (rrt−B~tfft)′Ω−1(rrt−B~tfft) s.t. Cfft=dd
Where fft∈RK×1, rrt∈RN×1, Bt∈RN×K, C∈RP×K, dd∈RP×1, and Ω∈RN×N. Note that K=1+J+S where J is the number of industries and S is the number of style factors.
The associate Lagrangian is:
L=(rrt−B~tfft)′Ω−1(rrt−B~tfft)+2λ′(Cfft−dd)=rrt′Ω−1rrt−2rrt′Ω−1B~tfft+fft′B~tΩ−1B~tfft+2λλ′Cfft−2λλ′dd
Taking first order conditions:
∂fft∂F=0⟹−2B~t′Ω−1rrt+2B~t′Ω−1B~tfft+2C′λλ−B~t′Ω−1rrt+B~t′Ω−1B~tfft+C′λλ⟹B~t′Ω−1B~tfft+C′λλ=Bt′Ω−1rrt∂λλ∂F=0⟹2Cfft−2dd=0⟹Cfft′=dd=00=00
We wrote the first order conditions with ft and λ on one side so that we could factor our system of equations into block matrices.
[B~t′Ω−1B~tCC′0][fftλλ]=[Bt′Ω−1rrtdd]⟹[fftλλ]=[B~t′Ω−1B~tCC′0]−1[Bt′Ω−1rrtdd]
Following the formula for 2x2 block matrix inversion. We have A=B~t′Ω−1B~t, B=C′, C=C, and D=0
Therefore we have our inverted matrix equal to:
[(B~t′Ω−1B~t)−1−(B~t′Ω−1B~t)−1C′(C(B~t′Ω−1B~t)−1C′)−1C(B~t′Ω−1B~t)−1−(0−C(B~t′Ω−1B~t)−1C′)−1C(B~t′Ω−1B~t)−1(B~t′Ω−1B~t)−1C′(C(B~t′Ω−1B~t)−1C′(0−C(B~t′Ω−1B~t)−1C′)−1]
Consider multiplying the first row of the inverse matrix with the column vector to solve for fft.In our case dd=00 which will annihilate the second term in our equation. (In fact, it will set all terms in the second column of our block matrix to 0.) Therefore when solving for fft we only need to consider the top left element multiplied with B~t′Ω−1rrt. (Also, λλ will simply equal C multiplied by B~t′Ω−1rrt.)
Thus we have:
fft=[(B~t′Ω−1B~t)−1−(B~t′Ω−1B~t)−1C′(C(B~t′Ω−1B~t)−1C′)−1C(B~t′Ω−1B~t)−1]B~t′Ω−1rrt=(I−(B~t′Ω−1B~t)−1C′(C(B~t′Ω−1B~t)−1C′)−1C)(B~t′Ω−1B~t)−1B~t′Ω−1rrt
If we want to break this up to make it a little easier on the eyes we can write:
fft=Wtrrt
Where Wt, our linear estimator, is equal to:
Wt=(I−Q)(B~t′Ω−1B~t)−1B~t′Ω−1
and
Q=(B~t′Ω−1B~t)−1C′(C(B~t′Ω−1B~t)−1C′)−1C