s.t. \begin{equation} c_t + p_t s_{t+1} \leq y_t + d_t s_t + p_t s_t \end{equation}
Let's find the value function, $$ V(s_{t}) = \max_{c_t, s_{t+1}}\{u(c_t)+\beta E[V(s_{t+1})] \} $$$$ V(s_{t}) = \max_{s_{t+1}}\{u(y_t + d_t s_t + p_t (s_t-s_{t+1}))+\beta E[V(s_{t+1})] \} $$
FOC $$ p_t u'(c_t) = \beta E_t[V_s(s_{t+1})] $$
Envelop theorem $$ V_s(s_t) = u'(c_t)(d_t + p_t) $$
Envelop condition $$ E[V_s(s_{t+1})] = E[u'(c_{t+1})(d_{t+1} + p_{t+1})] $$
Stochastic Euler equation $$ p_t u'(c_t) = \beta E[u'(c_{t+1})(d_{t+1} + p_{t+1})] $$
We can rewrite this equation as
$$ u'(c_t) = \beta E[u'(c_{t+1})\frac{(d_{t+1} + p_{t+1})}{p_t}] $$*The LHS is telling us what is our utility of consuming today and the RHS is telling us what is our utility of foregoing our consumption today for tomorrow by holding the asset*
Let $\mu_{t+1}$ define as the stochastic discount factor, $\mu_{t+1}=\beta \frac{u'(c_{t+1})}{u'(c_t)}$.
The asset pricing equation is
from IPython.core.display import HTML
def css_styling():
import os
styles = open(os.path.expanduser("custom.css"), "r").read()
return HTML(styles)
css_styling()