I am analyzing the nth moment generation process for $r_t$ with dynamics defined by CIR model
$r_t$ has following dynamics $$dr_t=a(b-r_t)dt+\sigma \sqrt{r_t} dW_t^* \quad \quad (1)$$ for some constants $ab>\frac{\sigma^2}{2} \quad$
Letting T be a fixed date and $f_{\lambda}$ a function defined for some constant $\lambda >0$ is given $$f_{\lambda}(t,r)=E^*[e^{-\lambda {r_{T}}}|r_t=r] \quad \quad (2)$$
I want to generate first four moments. The solution manual suggest using the following function
$$ E^*[r_T^n]=(-1)^n \ E^* \big{[} \ \frac{d^n}{d \lambda^n}e^{-\lambda r_t}\big{|}_{\lambda=0} \ \big{]}$$ $$=(-1)^n \ \frac{d^n}{d \lambda^n}e^{-\lambda r_t}\big{|}_{\lambda=0} \ \quad \quad (3)$$
I understand the general idea of using MGF to derive moments of a function. In a standard way it is calculated as $$ M_t = E[e^{tX}]=\int e^{tx} \ f(x) dx \quad \quad (4)$$ and then $$ M_t^{(n)}(0) \quad \quad (5)$$ would give the n-th moment.
I am confused here with couple of things. First the fact that $f_{\lambda}$ looks already like moment generating function, so in this case what is multiplied by what.
Second I don't understand how the suggested function (3) was created. The $-\lambda$ used in (3) confuses me. There is no minus in the standard moment generation function.
Finally the steps of the of the calculations using this function are unclear to me. Are derivative of $r_t$ taken directly or just of the function $e^{-\lambda}r_t$ where the r_r is substituted.
Could anybody clarify please?
There are the first two moments of the $r_t$ I should get $$E^*[r_T^1]=b(1-e^{-at})+e^{-at}r_0 $$ $$E^*[r_T^2]=e^{-2aT}[(b(1-e^{-at})+e^{-at}r_0)^2]+\frac{e^{-2aT}}{2a}[(e^{aT}-1)(b(e^{aT}-1)+2r_0)\sigma^2] $$