# Stochastic Discount Factor of CIR bond pricing model

The CIR model states $dr=\kappa(\theta-r)dt+\sigma dW$ and the corresponding bond pricing equation can be derived from the general equilibrium approach.

The equation is: $\frac{1}{2}\sigma^2rP_{rr}+[\kappa(\theta-r)-\lambda r]P_r-rP=P_{\tau}$

where $\lambda$ is the factor of risk.

What is the derivation of the corresponding stochastic discount factor and pricing kernel of CIR model?

Consider the standard framework where an investor makes a consumption investment decision in a two period framework. Given some endowment today $e_0$ consumption is what is left after saving $c_1=e_1-s$, tomorrow you consume the uncertain return on investment $s\tilde{R}$
$$\underset{s}{max}\quad u(e_1-s) + \beta\mathbb{E}[u(s\tilde{R})]$$ The first order conditions of portfolio choice can be written as \begin{align*} u'(c_1) =& \mathbb{E}[u'(c_2)\tilde{R}]\\ 1 =& \mathbb{E}[\beta\frac{u'(c_2)}{u'(c_1)}\tilde{R}]\\ \end{align*}