I'm trying to derive the Heath Jarrow Morton drift condition (from Björk, page 298) and this equation is the part that I'm not able to derive:
$$ A(t,T) + \frac{1}{2} ||S(t,T)||^2 = \sum_{i=0}^d S_i(t,T) \lambda_i(t) $$
where $$ A(t,T) = - \int_t^T \alpha(t,s)ds \\ S(t,T) = - \int_t^T \sigma(t,s)ds \\ \lambda(t) = [\lambda_1(t), ... , \lambda_d(t)]' $$
The book states that this is obtained from Girsanov Theorem. Can you please help me out in understanding how?
I don't know what the book is attempting, but I provide you with a different proof, which IMHO is quite fast and easy.
For HJM, we have the following dynamics for the instantaneous forward rates: $ \begin{cases} df(t,T) = \alpha(t,T) dt + \sigma(t,T) dW_t \\ f(0,T) = f_{\text{mkt}}(0,T) \end{cases} $
With such an SDE for f, we have that a ZCB has a dynamics under $\mathbb{Q}$ given by $dp(t,T) = p(t,T)[r(t) + A(t,T)+\frac{\Sigma^2 (t,T)}{2}] + p \Sigma dW_t$, where $A = -\int_{t}^{T} \alpha(t,s) ds$ and $\Sigma = -\int_{t}^{T} \sigma(t,s) ds$.
Since we want to respect NA, the square brakets has to be equal to the riskless rate $r(t)$ which results, after semplification, in $A(t,T)+\frac{\Sigma^2 (t,T)}{2} = 0$ which derived wrt T gives the wanted new drift condition, namely $\alpha(t,T) = \sigma(t,T) \int_{t}^{T}\sigma(t,s) ds$.