\documentclass[11pt]{article}
\usepackage{amsmath}
\usepackage{lscape}
\textwidth=7.7in  \textheight=10in
\hoffset=-1.5in \voffset=-1.5in
%\pagestyle{empty}
\newcommand{\boxspace}{\parbox{1.42in}}
\newcommand{\hhspace}{\hspace{0.02in}}
%
\newcommand{\bboxspace}{\parbox{2.0in}}
\newcommand{\hhhspace}{\hspace{0.05in}}
\input{tcilatex}
\begin{document}
\begin{flushright}
Jaime Frade\\
ECO5282-Dr. Garriga\\
Homework\:$\#4$\\
\end{flushright}
\begin{enumerate}
\item  \textbf{(Equilibrium with Exogenous Borrowing Constraints)}  Consider an economy with a continuum [0,1] of consumers of symmetric typed who live forever.  Consumers have utility
\begin{displaymath}
\sum^\infty_{t=0} \beta^t\log(c^i_t)
\end{displaymath}

Consumers of type 1 have an endowment steam of the single good in each period $(w^1_0, w^1_1, w^1_2, \ldots) = (8,1,8,1, \ldots)$ while consumers of type 2 have $(\omega^2_0, \omega^2_1, \omega^2_2, \ldots) = (1,8,1,8, \ldots)$. In addition there is one unit of trees that produses $d=1$ units of good at each period.  Each consumer of type $i$ owns $\bar{s}^i_0$ of such a trees in period $t=0$, $\bar{s^i_0} > 0$, $\bar{s}^1_0 + \bar{s}^2_0 = 1$.  Trees do not grow or decay over time.
 
\begin{description}
\item[(a)]  
\begin{itemize}
\item[(i)]  Define an Arrow-Debreu equilibrium.  
\vspace{.25cm}
\\
\textbf{Definition} An \underline{Arrow-Debreu equilibrium}  is an allocation $\{\{c^i,\bar{s}^i_{t+1}\}^\infty_{t=0}\}^2_{i=1}$ and a sequence of prices $\{q_t, r_t\}^\infty_{t=0}$ such that the allocation solves each household problem.
For a given household, the comsumer solves
\begin{equation}\label{eq:max1a}
\max \sum^{\infty}_{t=0}\beta^t\,u(c^i_t)
\end{equation}
Subject to the following budget constraint
\begin{equation}
c^i_t + q_t(\bar{s}^i_{t+1}-\bar{s}^i_t) \leq \omega^i_t + d\,\bar{s}^i_t \hspace{.15cm} \forall \hspace{.05cm} t\label{eq:bc1a}
\end{equation}
\begin{equation}
\bar{s}^i_t \geq 0 \nonumber
\end{equation}
Goods and financial markets clear
\begin{equation}
c^1_t+c^2_t = \omega^g+\omega^b + d  =  \omega \hspace{.15cm} \forall \hspace{.05cm} t\label{eq:bc1-1a}
\end{equation}
\begin{equation}
\bar{s}^1_t + \bar{s}^2_t  \geq  1 \hspace{.15cm} \forall \hspace{.05cm} t \label{eq:bc1-2a}
\end{equation}

From the initial problem, a symmetric allocation implies the following:
\begin{equation}\label{eq:equalconsum}
c^{*} = \widehat{c}\,^1_t = \widehat{c}\,^2_t = \dfrac{\omega^g+\omega^b+d}{2} = \dfrac{8+1+1}{2} = 5 \hspace{.15cm} \forall \hspace{.05cm} t
\end{equation}

\item[(ii)]  Compute the equilibrium prices.   
\vspace{.25cm}
\\
The Euler equation for a symmetric equilibrium is also satisfied.  Since $u'(c^g)= u'(c^b)$ and $u'(c^g)=u'(c^b)$ obtain the following:
\begin{equation}\label{eq:euler1}
\dfrac{u'(c^g)}{\beta\,u'(c^b)} = \dfrac{q+d}{q} = \dfrac{u'(c^g)}{\beta\,u'(c^b)}
\end{equation}
\begin{displaymath}
\dfrac{1}{\beta} = \dfrac{q+d}{q}
\end{displaymath}
Then, using $d=1$, the equilibrium prices satisfies:
\begin{equation}\label{eq:eqprice}
q = \dfrac{\beta}{1-\beta}d = \dfrac{\beta}{1-\beta}
\end{equation}
\newpage
\item[(iii)]   Given the endowment, find the intial asset holdings $\bar{s}^1_0$ and $\bar{s}^2_0$ such that in equilibrium, \\
$\widehat{c}\,^1_t = \widehat{c}\,^2_t$ $\forall$ $t$.  [\textbf{Hint:}  You have to becareful when writing down the consolidated budget constraint for the individuals.]
\vspace{.25cm}
\\
When the financial markets clear, (\ref{eq:bc1-2a}), then, the aggregate resource constraint as well as the consumer budget constraint are satisfied.  Compute the steady state trade associated to the optimal consumption level:
\begin{eqnarray}
\dfrac{\omega}{2} - \omega^g & = & (p+d)\bar{s}^2_0 - p\bar{s}^1_0 \nonumber
\\
\omega^b - \dfrac{\omega}{2} & = & (p+d)\bar{s}^1_0 - p\bar{s}^2_0 \nonumber
\end{eqnarray}
Solve for the optimal share distribution by solving a linear system of equations:
\begin{equation} \label{eq:opshare}
\left[\begin{array}{c c}
p+d & -p \\
-p & p+d
\end{array}\right]
\left[\begin{array}{c}
\bar{s}^2_0 \\
\bar{s}^1_0
\end{array}\right]
=
\left[\begin{array}{c}
\dfrac{\omega}{2} - \omega^g \\
\omega^b - \dfrac{\omega}{2}
\end{array}\right]
\end{equation}
Consumers of type 1 will recieve the a good shock in the intial period, while consumers of type 2 recieve a bad shock.
\vspace{.25cm}
\\
Compute the intial asset holdings $\bar{s}^1_0$ and $\bar{s}^2_0$, using the following subsitutions for the equilibrium price (\ref{eq:eqprice}), $d=1$, $\omega^g = 8$, $\omega^b = 1$, and $\dfrac{\omega}{2} = 5$ into (\ref{eq:opshare}), to obtain:
\begin{eqnarray} \label{eq:ans1a}
\left[\begin{array}{c c}
p+d & -p \\
\: \\
-p & p+d
\end{array}\right]
\left[\begin{array}{c}
\bar{s}^2_0 \\
\: \\
\bar{s}^1_0
\end{array}\right]
& = &
\left[\begin{array}{c}
\dfrac{\omega}{2} - \omega^g \\
\omega^b - \dfrac{\omega}{2}
\end{array}\right] \nonumber
\\
\left[\begin{array}{c c}
\dfrac{1}{1-\beta} & -\dfrac{\beta}{1-\beta} \\
\: \\
-\dfrac{\beta}{1-\beta} & \dfrac{1}{1-\beta}
\end{array}\right]
\left[\begin{array}{c}
\bar{s}^2_0 \\
\: \\
\bar{s}^1_0
\end{array}\right]
& = &
\left[\begin{array}{c}
-3 \\
4
\end{array}\right] \nonumber
\end{eqnarray}
Solving for $\bar{s}^1_0$ and $\bar{s}^2_0$ in the previous equation will obtain the following:
\begin{eqnarray}
\left[\begin{array}{c}
\bar{s}^2_0 \\
\: \\
\bar{s}^1_0
\end{array}\right]
& = &
\left[\begin{array}{c c}
\dfrac{1}{1-\beta} & -\dfrac{\beta}{1-\beta} \\
\: \\
-\dfrac{\beta}{1-\beta} & \dfrac{1}{1-\beta}
\end{array}\right]^{-1}
\left[\begin{array}{c}
-3 \\
4
\end{array}\right] \nonumber
\: \\ \nonumber
\\
\left[\begin{array}{c}
\bar{s}^2_0 \\
\: \\
\bar{s}^1_0
\end{array}\right]
& = &
\left[\begin{array}{c c}
\dfrac{1}{1+\beta} & \dfrac{\beta}{1+\beta} \\
\: \\
\dfrac{\beta}{1+\beta} & \dfrac{1}{1-\beta}
\end{array}\right]
\left[\begin{array}{c}
-3 \\
4
\end{array}\right] \nonumber
\: \\ \nonumber
\\
\left[\begin{array}{c}
\bar{s}^2_0 \\
\: \\
\bar{s}^1_0
\end{array}\right]
& = &
\left[\begin{array}{c}
\dfrac{4\beta-3}{1+\beta} \\
\: \\
\dfrac{4- 3\beta}{1+\beta} 
\end{array}\right] \label{eq:1ans1-a}
\end{eqnarray} 
\end{itemize}

From (\ref{eq:1ans1-a}), obtain the initial asset holdings for $\bar{s}\,^2_0 =\dfrac{4\beta-3}{1+\beta}$ and  $\bar{s}^1_0 =\dfrac{4- 3\beta}{1+\beta}$

\newpage

\item[(b)] Suppose that consumers cannot borrow or lend.  Define an equilibrium for this liquidity constraint economy. 
\vspace{.25cm}
\\
\textbf{Definition} An \underline{Arrow-Debreu equilibrium}  is an allocation $\{\{c^i,\bar{s}^i_{t+1}\}^\infty_{t=0}\}^2_{i=1}$ and a sequence of prices $\{q_t, r_t\}^\infty_{t=0}$ such that the allocation solves each household problem.
For a given household, the comsumer solves
\begin{equation}\label{eq:max1b}
\max \sum^{\infty}_{t=0}\beta^t\,u(c^i_t)
\end{equation}
Subject to the following budget constraint
\begin{equation}
c^i_t + q_t(\bar{s}^i_{t+1}-\bar{s}^i_t) \leq \omega^i_t + d\,\bar{s}^i_t \hspace{.15cm} \forall \hspace{.05cm} t\label{eq:bc1b}
\end{equation}
\begin{equation}
\bar{s}^i_t \geq -A \nonumber
\end{equation}
Goods and financial markets clear
\begin{eqnarray}
c^1_t+c^2_t = \omega^g+\omega^b + d & = & \omega \hspace{.15cm} \forall \hspace{.05cm} t\label{eq:bc1-1a}
\\
\: \\ \nonumber
\bar{s}^1_t + \bar{s}^2_t & \geq & 1 \hspace{.15cm} \forall \hspace{.05cm} t \label{eq:bc1-2a}
\end{eqnarray}



 
\item[(c)]  Compute the stochastic discount factor for this economy and compare it with the complete markets solution
\vspace{.25cm}
\\
Let M represent the  stochastic discount factor and r the interest rate.  The stochastic discount factor is the price of pure discount bond.  Using the following formula, can switch from either case,
\begin{equation}\label{eq:switch}
M = \dfrac{1}{1+r}
\end{equation}

The stochastic discount factor is determined by the Euler equation, where the superscript $c$ indicates the complete market.
\begin{equation}\label{eq:1c1}
M^c=\dfrac{\beta u'(c_{t+1})}{u'(c_{t})}
\end{equation}
\\
\\
Consumptions are constant across periods because there exists perfect risk sharing in the case of complete market
\begin{equation}\label{eq:1c2}
c_t=c_{t+1}=c_{t+2}= \ldots
\end{equation}

In the complete market, the stochastic discount factor  is obtained by using the constant consumption (\ref{eq:1c2}), and subsititing into (\ref{eq:1c1}): 
\begin{equation}\label{eq:1c3}
M^c=\dfrac{\beta u'(c_{t})}{u'(c_{t})}= \,\beta
\end{equation}

In the liquidity constrained market, $l$ will denote the  liquidity constrained market , the stochastic discount factor is determined by the agents who  recieved the good shock.
\begin{equation}\label{eq:1c4}
M^l=\dfrac{\beta u'(c^b)}{u'(c^g)}
\end{equation}
\vspace{.25cm}
\\
\newpage

In this market, the consumption of the agent who recieved the good shock is greater than or equal to the agent's consumption with bad shock. ($\Longrightarrow$ $c^g \geq c^b $)
\vspace{.25cm}
\\
Using above, as well as the fact that the marginal utility is decreasing, ($\Longrightarrow$ $u'< 0$), obtains
\begin{equation}\label{eq:1c5}
u'(c^g) \leq u'(c^b)
\end{equation}
\\
The stochastic discount factor In this market is obtained by using the  (\ref{eq:1c5}), and subsititing into (\ref{eq:1c4}) to obtain the following relationship:
\begin{equation}\label{eq:1c6}
M^l  = \dfrac{\beta u'(c^b)}{u'(c^g)} \geq \beta
\end{equation}
From (\ref{eq:1c3}) and above (\ref{eq:1c6}), obtain
\begin{equation}
M^l  \geq  M^c
\end{equation}
The stochastic discount factor is greater in the liquidity constrained market than in the complete market due to the constraints.  It would become the same if the liquidity constraint did not bind.







\newpage
\item[(d)]  Consider the function
\begin{equation} \label{eq:ques1d}
F^L(c^g)= u'(c^g)(c^g-8) + \beta\,u'(10-c^g)(9-c^g)
\end{equation}
\begin{itemize}
\item[(i)]  Show that when $\beta = 0.9$, $F^L(c^g)>0$ and that $\widehat{c}^i_t= 5$ satisifies all of the equilibrium conditions for the liquidity constraint economy for the right choice of $\bar{s}^i_0$.
\vspace{.25cm}
\\
From the initial problem and above conditions, plug each of the following: $u(c^i) =\log(c^i_t)$,
\\
 $\widehat{c}^i_t= 5 \Rightarrow c^g = 5$, and $\beta=.9$ into (\ref{eq:ques1d}) to obtain:
\begin{eqnarray}
F^L(c^g) &=& \dfrac{c^g-8}{c^g} + \dfrac{\beta\,(9-c^g)}{10-c^g} \nonumber
\\
F^L(5)&=& \dfrac{5-8}{5} + \dfrac{(.9)(9-5)}{10-5} \nonumber
\\
F^L(5)&=& .12 > 0 \label{eq:ans1-d}
\end{eqnarray}
From the above calculations, (\ref{eq:ans1-d}), obtain $F^L(c^g) = .12 > 0$ when $\widehat{c}^i_t= 5$ and $\beta=.9$
\vspace{.25cm}
\\
Using the above calculations, prove all of the equilibrium conditions for the liquidity constraint economy for the right choice of $\bar{s}^i_0$.  To prove this, find price system and asset holdings and check whether or not they satisfy the budget constraint, the Euler equation, and the market clearing conditions
\vspace{.25cm}
\\
From the budget constraints, (\ref{eq:1ans1-a}), using the given value for $\beta = .9$, obtain each asset holding
\begin{eqnarray}
s^b & = &\dfrac{4\beta-3}{1+\beta}=\dfrac{4 \times 0.9-3}{1+0.9}=\dfrac{0.6}{1.9} = 0.316 \nonumber
\\
s^g &=& \dfrac{4- 3\beta}{1+\beta}=\dfrac{-3 \times 0.9+4}{1+0.9}=\dfrac{1.3}{1.9} =0.684 \nonumber
\end{eqnarray}
From the pricing equation (\ref{eq:eqprice}), using the given value for $\beta = .9$, obtain
\begin{equation}\label{eq:eqprice1}
q = \dfrac{\beta}{1-\beta}=\dfrac{0.9}{1-0.9}=9
\end{equation}
\\
From above, obtain the equilibrium solution from this ecomony.
\begin{eqnarray}
	q&=&9 \nonumber \\
	s^b&=&0.316 \nonumber \\
	s^g&=&0.684 \nonumber \\
	c^b&=&c^g=0.5 \nonumber \\
\end{eqnarray}






\item[(ii)] Show that when $\beta = 0.2$, the solution of $F^L(c^g)=0$ and $c^g \in [5,8]$ is such that 
\begin{displaymath}
\widehat{c}^i_t= \left\{ \begin{array}{l l}
c^g & \textrm{if $\omega^i_t =8$}\\
10-c^g & \textrm{if $\omega^i_t =1$}\\
\end{array} \right.
\end{displaymath}
is an equilibrium allocation for the right choice of $\bar{s}^i_0$.  (\textbf{Hint:}  You can find the solution of $F^L(c^g)=0$ by solving a quadratic equation)
\vspace{.25cm}
\\
From the initial problem and above conditions, plug each of the following: $u(c^i) =\log(c^i_t)$ and $\beta=0.2$ into (\ref{eq:ques1d}) to obtain:
\begin{equation}
F^L(c^g) = \dfrac{c^g-8}{c^g} + \dfrac{\beta\,(9-c^g)}{10-c^g} \label{eq:ques1d-1}
\end{equation}
To solve (\ref{eq:ques1d-1}), using the given hint can solve $F^L(c^g)=0$ by applying quadratic formula.
\begin{eqnarray}
0 &=& \dfrac{c^g-8}{c^g} + \dfrac{\beta\,(9-c^g)}{10-c^g} \nonumber
\\
\dfrac{c^g-8}{c^g} &=& \dfrac{(0.2)(c^g-9)}{10-c^g} \nonumber
\\
(c^g-8)(10-c^g) &=& 0.2c^g(c^g-9) \nonumber
\\
-c^{2g}+18c^g-80 &=& 0.2c^{2g}-1.8c^g \nonumber
\\
1.2(c^{g})^2-19.8c^g+80 &=& 0 \label{eq:quad-1d}
\end{eqnarray}
Apply the quadratic formula to (\ref{eq:quad-1d}) to find solution(s) for for $c^g$.
\begin{equation}
c^g_{1,2} = \dfrac{19.8 \pm \sqrt{(-19.8)^2-4(12)(80)}}{2(1.2)}  \nonumber
\end{equation}
From above will obtain the following solutions:
\begin{eqnarray}
c^g_1 & \approx & 9.43 
\\
\: \nonumber
\\
c^g_2 & \approx & 7.069
\end{eqnarray}
Since must apply $c^g \in [5,8]$ from the intial problem setup, choose $\boldsymbol{c^g_2  \approx  7.069.}$
\end{itemize}

Using the above calculations, prove all of the equilibrium conditions for this economy for the right choice of $\bar{s}^i_0$.  To prove this, find price system and asset holdings and check whether or not they satisfy the budget constraint, the Euler equation, and the market clearing conditions
\vspace{.25cm}
\\
From the budget constraints, here the liquidity constraint binds thus,  using the given value for $\beta = .2$, obtain each asset holding
\begin{eqnarray}
s^b & =& 0 \nonumber
\\
s^g &=& 1 \nonumber
\end{eqnarray}
Using that $u(c) = \log(c^i_t)$, and from the Euler equation, (\ref{eq:euler1}), and $\beta=.2$, the agent with good shock,  obtain the price system
\begin{eqnarray*}
	\dfrac{\beta u'(c^b)}{u'(c^g)}&=&\dfrac{q}{q+d}\\
	\dfrac{\beta c^g)}{u'(c^b)}&=&\dfrac{q}{q+d}\\
	qc^b&=&0.2c^g(q+d)\\
	q&=&\dfrac{(0.2)c^g}{c^b-0.2c^g}=0.9318	
\end{eqnarray*}
From above, obtain the equilibrium solution from this ecomony.
\begin{eqnarray*}
	q&=&0.9318 \\
	s^b&=&0 \\
	s^g&=&1\\
	c^b&=&2.931\\
	c^g&=&7.069
\end{eqnarray*}
\end{description}
\newpage



\item \textbf{(Equilibrium with Endogenous Borrowing Constraints)}  Consider the economy from the previous question.  However, we assume that consumers face borrowinf constraints of the for
\begin{displaymath}
\sum^\infty_{j=0}\beta^i\,\log c^i_{t+j} \geq \sum^\infty_{j=0} \beta^i\,\log \omega^i_{t+j} \hspace{.15cm} \forall t,i
\end{displaymath}
but otherwise the definition of equilibrium is the same as in \textbf{part (a)}.
\vspace{.25cm}
\\

\begin{description}
\item[(a.)]  Provide a motivation for this environment and explain the economic initution of the constraint.
\begin{equation}
\underbrace{(1-\beta)\sum^\infty_{\tau=t}\beta^{\tau-t}u(c_{\tau}^i)}_{(A)} \geq \underbrace{(1-\beta)\sum^\infty_{\tau=t}\beta^{\tau-t}u(\omega_{\tau}^i)}_{(B)} \hspace{.15cm} \forall i
\end{equation}
\vspace{.25cm}
\\
At no time should the borrower see defaulting as optimal choice.  At any time each household may choose to default on credit payments and walk away from the credit market.  If the consumer chooses to default, the punishment is an exclusion from all future activity in the credit market.  At no time should the value of choosing to default (see \textbf{(B)}) should not exceed the value of staying in the market (see \textbf{(A)}).  . In other words, the value of continuing to participate in the economy is no less than the value of walking away.  Lenders will never loan to the borrower so that the borrower will choose to default.  They will never lend so much to consumers that they will choose bankruptcy.
\vspace{.5cm}
\\
\item[(b.)]  Define an equilibrium for this debt constaint economy.
\vspace{.25cm}
\\
\textbf{Definition} An \underline{equilibrium}  is an allocation $\{c^1_t,c^2_t\}^\infty_{t=0}$ and a sequence of prices $\{q_t\}^\infty_{t=0}$ such that each consumer $i$ solves
\begin{equation}\label{eq:max2b}
\max \sum^{\infty}_{t=0}\beta^t\,u(c^i_t)
\end{equation}
Subject to the following budget constraint
\begin{eqnarray}
\sum^\infty_{t=0}p_t\,c^i_t  & = & \sum^{\infty}_{t=0}p_t(\omega^i_t + s^i_0d) \hspace{.15cm} \forall \hspace{.15cm} \textrm{all periods}\label{eq:bc2-b}
\end{eqnarray}
Financial markets clear
\begin{equation}
c^1_t+c^2_t = \omega^g+\omega^b + d  =  \omega \hspace{.15cm} \forall \hspace{.05cm} t \label{eq:bc2-2b}
\end{equation}
%\begin{equation}
%\bar{s}^1_t + \bar{s}^2_t  \geq  1 \hspace{.15cm} \forall \hspace{.05cm} t \label{eq:bc1-2a}
%\end{equation}




\item[(c.)]  Consider the function
\begin{equation}\label{eq:func1c}
F^D(c^g)= u(c^g)- u(8)+ \beta[u(10-c^g)-u(1)]
\end{equation}
\begin{itemize}
\item[(i.)] Show that when $\beta = 0.9$, $F^D(c^g)>0$ and that $\widehat{c}^i_t= 5$ satisifies all of the equilibrium conditions for the debt constraint economy for the right choice of $\bar{s}^i_0$.
\vspace{.25cm}
\\
From the initial problem and above conditions, plug each of the following: $u(c^i) =\log(c^i_t)$,
\\
$\widehat{c}^i_t= 5 \Rightarrow c^g = 5$, and $\beta=.9$ into (\ref{eq:func1c}) to obtain:
\vspace{.25cm}
\\
\begin{eqnarray}
F^D(c^g) &=& u(c^g) - u(8) + \beta\,(u(10-c^g)-u(1)) \nonumber
\\
F^D(5) &=& u(5) - u(8) + (.9)(u(10-5)-u(1)) \nonumber
\\
F^D(5)&=&  \log(5) - \log(8) + (.9)(\log(5)-\log(1)) \nonumber
\\
F^D(5)&=& 0.9785 \label{eq:ans2-c1}
\end{eqnarray}
From the above calculations, (\ref{eq:ans1-d}), obtain $F^L(c^g) =  0.9785 > 0$ when $\widehat{c}^i_t= 5$ and $\beta=.9$.  To show that those consumptions are in equilibrium find price system and check whether or not they satisfy the budget constraint, the Euler equation, and the market clearing conditions.
\\
\\
>From the Euler equation of agent with good shock,
\begin{eqnarray*}
	\dfrac{\beta u'(c^b)}{u'(c^g)}&=&\dfrac{q}{q+d}\\
	\beta &=&\dfrac{q}{q+d}\\
	 q&=&(0.9)(q+d)\\
	 (0.1)q&=&(0.9)\\
	 q&=&9	
\end{eqnarray*}
From above, obtain the equilibrium solution from this ecomony.
\begin{eqnarray*}
	q&=&9 \\
	c^b&=&5\\
	c^g&=&5
\end{eqnarray*}


\newpage
\item[(ii.)]  Show that when $\beta = 0.2$, the solution of $F^D(c^g)=0$ and $c^g \in [5,8]$ is such that 
\begin{displaymath}
\widehat{c}^i_t= \left\{ \begin{array}{l l}
c^g & \textrm{if $\omega^i_t =8$}\\
10-c^g & \textrm{if $\omega^i_t =1$}\\
\end{array} \right.
\end{displaymath}
is an equilibrium allocation for the right choice of $\bar{s}^i_0$.  (\textbf{Hint:}  If $\beta=.2$, the solution to $F^D(c^g) = 0$ and $c^g \in [5,8]$ is approximately $c^g$ $\approx$ 6.09076)
\vspace{.25cm}
From the initial problem and above conditions, plug each of the following: $u(c^i) =\log(c^i_t)$ and $\beta=0.2$ into (\ref{eq:func1c}) to solve $F^D(c^g)=0$:
\begin{equation}
F^D(c^g)= u(c^g)- u(8)+ \beta[u(10-c^g)-u(1)] \label{eq:ques2d-2}
\end{equation}
After subsitutions, will use log properities and algebra to covert (\ref{eq:ques2d-2}) into a higher order polynomial in which \textbf{Maple} will find the solution(s).
\begin{eqnarray}
0 &=& \log(c^g)- \log(8)+ (.2)(\log(10-c^g)-\log(1)) \nonumber
\\
0 &=& \log(c^g)- \log(8)+ \log(10-c^g)^{0.2} \nonumber
\\
0 &=& \log_{10}\left(\dfrac{c^g(10-c^g)^{0.2}}{8}\right)  \nonumber
\\
1 &=& \left(\dfrac{c^g(10-c^g)^{0.2}}{8}\right) \nonumber
\\
8 &=& c^g(10-c^g)^{0.2} \nonumber
\\
8^5 &=& (c^g)^5((10-c^g)^{\frac{1}{5}})^5 \nonumber
\\
32768 &=& 10c^{5g}-c^{6g} \nonumber
\\
(c^{g})^6-10(c^{g})^5 +32768 & =&  0  \hspace{.75cm} \textrm{Let} \hspace{.15cm} c^g \rightarrow x \nonumber
\\
x^6-10x^5 +32768 & =&  0
\end{eqnarray}
Using Maple, (see code below), obtain the following solution for $F^D(c^g)=0$ in which $c^g \in [5,8].$
\begin{verbatim}
> z:= x^6-10*x^5+32768;

                             6       5
                       z := x  - 10 x  + 32768

> fsolve(z, x, 5..8);

                             6.090760678
\end{verbatim}
Therefore, when $\beta=.2$, the solution to $F^D(c^g) = 0$ and $c^g \in [5,8]$ is $c^g$ $\approx$ 6.09076.  Find price system and check whether or not they satisfy the budget constraint, the Euler equation, and the market clearing condition. 
\vspace{.25cm}
\\
From the Euler equation of agent with good shock,
\begin{eqnarray*}
	\dfrac{\beta u'(c^b)}{u'(c^g)}&=&\dfrac{q}{q+d}\\
	\dfrac{\beta c^g)}{u'(c^b)}&=&\dfrac{q}{q+d}\\
	qc^b&=&0.2c^g(q+d)\\
	q&=&\dfrac{(0.2)c^g}{c^b-0.2c^g}=0.452	
\end{eqnarray*}
From above, obtain the equilibrium solution from this ecomony.
\begin{eqnarray*}
	q&=&0.452 \\
	c^b&=&3.90924\\
	c^g&=&6.09076
\end{eqnarray*}


\end{itemize}
\vspace{.25cm}

\item[(d.)]  Compute the stochastic discount factor for this economy and compit it with the liquiidty constraint model.  Do you think these two economies can predict the same pattern for asset price movements?
%%%%%%55
\\Let me start with the final conclusion. The stochastic discount factor in the debt constraint economy is smaller than that in the liquidity constraint economy. Regarding interest rates, the interest rate in the debt constraint economy is larger than that in the liquidity constraint economy because the interest rates are negatively related to the stochastic discount factor. 
\\
\\The reason is that the liquidity constraint has less consumption smoothing and the debt constraint exhibits a large degree of consumption smoothing as seen in the previous questions 1(d) and 2(c). The stochastic discount factor is derived by the following equation:
\[m=\dfrac{\beta u'(c^{b})}{u'(c^{g})}\]
As more consumption smoothing is obtained in the debt constraint economy, $c^b$ and $c^g$ are closer to each other and so the stochastic discount factor gets closer to $\beta$. However, in the liquidity constraint economy,$c^b$ and $c^g$ keep away from each other and so the stochastic discount factor can be much bigger than $\beta$. Therefore,the stochastic discount factor in the debt constraint economy is smaller than that in the liquidity constraint economy. The difference of stochastic discount factors leads to different asset prices. 
\\ 
%%%%%%%%%%%%%%%%
\item[(e.)]  Unfortunately, the value of $\bar{s}^i_0$ that you calculated in the previous section when $\beta=0.2$ is negative.  Can you think of another way to make the proposed steady state an equilibrium?  Explain.
\vspace{.25cm}
\\
From the setup of the problem, the borrowing constraint allow the first consumer who recieves the good productivity to have a permanent advantage over the other. One way to arrive at the steady state of equilibrium is to impose a transfer payment from one consumer type to the other. In the liquidity model, assign a budget constraint for the consumer who first has high productivity in the first period.
\begin{equation}\label{eq:2f1}
c^g+q \leq \omega^g + s_0^1(q+d)-\tau
\end{equation}
\vspace{.25cm}
\\
In the debt constraint economy, transfer enough income so that the present discounted value of lifetime incomes are equal.
\begin{equation}\label{eq:2f2}
\sum_{t=0}^{\infty}p_t(\omega_t^1+\theta_0^1d)-\tau=  \sum_{t=0}^{\infty}p_t(\omega_t^2+\theta_0^2d)+\tau
\end{equation}

Also, another way to attain a steady state in the debt constraint economy, introduce uncertainty before the first period, giving both consumer types equal chances of having the high productivity first.  Then allow each consumer to write contingent contracts against the  initial uncertainty.


\item[(f.)]  Write down the endogenous borrowing constraint if the agent is allowed to save in an storage technology with a return $R>0$, following a default period.
\vspace{.25cm}
\\
If there exists storage technology, there exists no self sufficient economy. Derive the optimal self-storage policy in case the consumer chooses to default.  Denote $u^{*}$ as the optimal utility in the storage economy where choose to default, where $s_{t+j}$ means the amount of savings at time $t+j$
\\
\begin{eqnarray*}
	u^{*} &=& \max \, u(w_t-s_t)+\beta u(w_{t+1}+s_{t}R-s_{t+1})+\beta^2 u(w_{t+2}+s_{t+1}R-s_{t+2})+ \ldots \\
	       &=& \max \, u(w_t-s_t)+\sum_{j=1}^{\infty} \beta^j u(w_{t+j}+s_{t+j-1}R-s_{t+j})
\end{eqnarray*}
\vspace{.25cm}
\\
\newpage
This optimal problem can be solved as in, \textbf{HW$\#1$}, the Cake Eating Problem. The first order condition can be obtained taking differentiation with respect to $s_{t+j}$.
\begin{eqnarray*}
\dfrac{du^{s}}{ds_{t+j}} &=& -\beta^j u'(w_{t+j}+(s_{t+j-1})R-s_{t+j})+\beta^{j+1}R u'(w_{t+j+1}+s_{t+j}R-s_{t+j+1}) 
\\
u'(w_{t+j}+(s_{t+j-1})R-s_{t+j}) &=&\beta R u'(w_{t+j+1}+(s_{t+j})R-s_{t+j+1})
\end{eqnarray*}


From the Euler equation, the amount of savings can be determined  and from here the the optimal storage utility, $u^{*}$, can be obtained.
\begin{eqnarray}
\sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) & \geq & u^{*} \nonumber
\\
\sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) & \geq & \max u(w_t-s_t)+\sum_{j=1}^{\infty} \beta^j u(w_{t+j}+(s_{t+j-1})R-s_{t+j}) \nonumber
\end{eqnarray}

\item[(g.)]  Bankruptcy law only preclude individuals from trading just for a finite number of periods.  How would you modify this constraint to accomodate this institutional feature.  
\vspace{.25cm}
\\
Let there be a finite number of periods, $T$.  During the T periods, households will consume as if there exists a self-sufficient economy, $u^{aut}$ and after that consumers can access the original debt constraint economy. Therefore, in case consumers chose to default, calculate the maximum utility, $u^{max},$ that is attainable.
\begin{equation}
u^{max}=\sum^T_{j=0}\beta^{j}u(w_{t+j}^i)+u^{aut} \nonumber
\end{equation}
The utility after T period can be calculated as follows:
\begin{equation}
u^{aut}=\sum^\infty_{j=0}\beta^{T+j}u(c_{t+T+j}^i) \nonumber
\end{equation}
Subject to the following budget constraint and rationality constraint
\begin{eqnarray}
\sum^\infty_{j=0}p_{T+j}\,c^i_{T+j}  &=& \sum^{\infty}_{j=0}p_{T+j}(\omega^i_{T+j} + s^{i}_Td) \hspace{.15cm} 
\\
\sum^\infty_{j=0}\beta^{T+j}u(c_{T+j}^i) &\geq & \sum^\infty_{j=0}\beta^{T+j}u(\omega_{T+j}^i) \hspace{.15cm} \forall \hspace{.15cm} j
\end{eqnarray}
\vspace{.25cm}
\\
From, $u^{aut}$, the endogenous borrowing constraint becomes:
\begin{equation}\label{eq:2g1}
\sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) \geq \sum^T_{j=0}\beta^{j}u(w_{t+j}^i)+u^{aut} 
\end{equation}

\end{description}

\newpage


\item \textbf{(Equilibrium with Endogenous Borrowing Constraints and Uncertainity)}  We want to take the model one step furteher and include uncertiainty along two dimensions.  First, we assume thar income shocks are persistent, and evolve according to a symmetric Markov process with a probability distrubution
\begin{displaymath}
\prod_{\omega'|\omega} = 
\left[\begin{array}{c c}
\pi_{gg} & \pi_{bg} \\
\pi_{gb} & \pi_{bb} 
\end{array}\right]
=
\left[\begin{array}{c c}
1-\pi & \pi \\
\pi & 1-\pi 
\end{array}\right]
\end{displaymath}
Second we assume i.i.d. dividend shock where $\gamma$ is the probability of recieving a good dividend shock $d_g = 3$, and $1-\gamma$ is the probability of recieving a bad dividend or aggregrate shock, $d_b=1.$  Since we now have a aggregate uncertainity we can still solve for a symmetric equilibrium, but consumption across states of nature will differ due to aggregrate uncertainity.
\begin{description}
\item[(a.)]  Write down the market equilibrium in the endogenous borrowing constraint economy. [\textbf{Hint:}  You should be very careful when writing the endogenous borrowing constraint, since it could depend on aggregate uncertainity.]
\vspace{.25cm}
\\
From the setup of the problem, the dividend varies across time, $d_t$.  Also, since aggregate uncertainty, the \textbf{good and financial market clear condition} is  
\begin{eqnarray}
c^1_t+c^2_t  = \omega^g+\omega^b + d_t  & = &  \omega \hspace{.15cm} \forall \hspace{.05cm} t 
\\
s^1_t + s^2_t  &\leq&   1 \hspace{.15cm} \forall \hspace{.05cm} t 
\end{eqnarray}
Let the first superscript means the status of endowment shock while the second superscript indicates the status of dividend shock, then 
\\
Denote the good dividend shock, as $\Longrightarrow$ $c^{gg}+c^{bg}=\omega^g+\omega^b+d^g=\overline{\omega}$
\\
Denote the bad dividend shock, as $\Longrightarrow$ $c^{gb}+c^{bb}=\omega^g+\omega^b+d^b={\underline{\omega}}$
\vspace{.25cm}
\\
The household problem is defined by each agent's utility optimization problem:  
\begin{equation}
\max E_0 \sum^{\infty}_{t=0}\beta^t\,u(c^i_t)
\end{equation}
Subject to the following budget constraint and rationality constraint
\begin{eqnarray}
E_0 \sum^\infty_{t=0}p_t\,c^i_t & =& E_0 \sum^{\infty}_{t=0}p_t(\omega^i_t + s^i_0d_t) \hspace{.15cm} 
\\
(1-\beta)E_t \sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) &\geq& (1-\beta)E_t \sum^\infty_{j=0}\beta^{j}u(\omega_{t+j}^i) \hspace{.15cm} \forall \hspace{.15cm} t
\end{eqnarray}
\vspace{.25cm}
\\
\textbf{Definition} An  equilibrium in the debt constraint economy  is an allocation $\{\{c^i_t,s^i_t\}^\infty_{t=0}\}^2_{i=1}$ and a sequence of prices $\{p_t\}^\infty_{t=0}$ such that the allocation solves each household problem and satisfies the market clearing condition.
\\
\newpage
\item[(b).]
\vspace{.25cm}

\begin{itemize}
\item[(i.)]  Solve for the equilibrium allocations when the borrowing constraint binds.
\vspace{.25cm}
\\
Since there exists aggregate uncertainty, the borrowing constraint depend on the status of dividend shock.
\\
\textbf{Case 1:}  For the good dividend shock,
\begin{eqnarray*}
& & E_t \sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) =
\\
&=&u(c^{gg})+\sum^\infty_{j=1}\beta^{j}u((1-\pi) \gamma u(c^{gg})
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) )  \\
           &=&u(c^{gg})+\dfrac{\beta ((1-\pi) \gamma u(c^{gg})
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) ) }{1-\beta}    
\end{eqnarray*}
\begin{eqnarray*}
E_t \sum^\infty_{j=0}\beta^{j}u(\omega_{t+j}^i)&=&u(\omega^g)+\sum^\infty_{j=1}\beta^{j}((1-\pi)u(\omega^g)+\pi u(\omega^b)) \\
	&=& u(\omega^g) + \dfrac{\beta ((1-\pi)u(\omega^g)+\pi u(\omega^b))}{1-\beta}
\end{eqnarray*}
Using above, obtain the rationality constraint as follows:
\begin{eqnarray}
 & &u(c^{gg})+\dfrac{\beta ((1-\pi) \gamma u(c^{gg}) 
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) ) }{1-\beta} \nonumber
           \\
            & \geq &
           u(\omega^g) + \dfrac{\beta ((1-\pi)u(\omega^g)+\pi u(\omega^b))}{1-\beta}  \nonumber
\end{eqnarray}
\begin{eqnarray}
F(c^{gg},c^{gb}) &=& (1-\beta)(u(c^{gg})-u(\omega^g)) +\beta (((1-\pi) \gamma u(c^{gg}) + (\pi) \gamma u(c^{bg})
\nonumber \\   \nonumber   & & + (1-\pi) (1-\gamma) u(c^{gb})  + (\pi) (1-\gamma) u(c^{bb}) ) -((1-\pi)u(\omega^g)+\pi u(\omega^b)))
\end{eqnarray}
\begin{eqnarray}
& = &(1-\beta)(u(c^{gg})-u(\omega^g))+\beta (1-\pi)(\gamma u(c^{gg})+(1-\gamma) u(c^{gb})-u(\omega ^g))
\nonumber \\
& & +\beta (\pi)(\gamma u(c^{bg})+(1-\gamma) u(c^{bb})-u(\omega ^b)) \nonumber
\end{eqnarray}

Since $c^{bg}=\overline{\omega}-c^{gg}$ and $c^{bb}=\underline{\omega}-c^{gb}$ 
\begin{eqnarray}
F(c^{gg},c^{gb})=(1-\beta)(u(c^{gg})-u(\omega^g))+\beta (1-\pi)(\gamma u(c^{gg})+(1-\gamma) u(c^{gb})- \nonumber
\\
u(\omega ^g)) 
+\beta (\pi)(\gamma u(\bar{\omega}-c^{gg})+(1-\gamma) u(\underline{\omega}-c^{gb})-u(\omega ^b)) \label{eq:3b1}
\end{eqnarray}

\textbf{Case 2:}  For the bad dividend shock, calculate the rationality constraint with similiar methods as above: 
\\
\begin{eqnarray*}
& & E_t \sum^\infty_{j=0}\beta^{j}u(c_{t+j}^i) =
\\
&=&u(c^{gb})+\sum^\infty_{j=1}\beta^{j}u((1-\pi) \gamma u(c^{gg})
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) )  \\
           &=&u(c^{gb})+\dfrac{\beta ((1-\pi) \gamma u(c^{gg})
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) ) }{1-\beta}    
\end{eqnarray*}
\begin{eqnarray}
	E_t \sum^\infty_{j=0}\beta^{j}u(\omega_{t+j}^i)&=&u(\omega^g)+\sum^\infty_{j=1}\beta^{j}((1-\pi)u(\omega^g)+\pi u(\omega^b)) \nonumber \\
	&=& u(\omega^g) + \dfrac{\beta ((1-\pi)u(\omega^g)+\pi u(\omega^b))}{1-\beta} \label{eq:3a}
\end{eqnarray}
From (\ref{eq:3b1}), the difference between the good and bad dividend shock deals with the first term in following:   See below.
\\
\begin{equation}
F(c^{gg},c^{gb}) = \underbrace{(1-\beta)(u(c^{gg})-u(\omega^g))}_{(A)}+ \beta (1-\pi)(\gamma u(c^{gg})+(1-\gamma) u(c^{gb})- \ldots \nonumber
\end{equation}

%Noting that the first term in the right hand side only is different from the previous equation, we can get to the following equation:
From (A) above, obtain the following function: 
\begin{eqnarray} \label{eq:G}
G(c^{gg},c^{gb}) &=& (1-\beta)(u(c^{gb})-u(\omega^g))+\beta (1-\pi)(\gamma u(c^{gg})+(1-\gamma) u(c^{gb})-u(\omega ^g)) 
\\
& & +\beta (\pi)(\gamma u(\bar{\omega}-c^{gg})+(1-\gamma) u(\underline{\omega}-c^{gb})-u(\omega ^b)) \nonumber
\end{eqnarray}


Since the borrowing constraint is always binding, ($G(c^{gg},c^{gb})=0$).  Households get an imperfect risk sharing when the recieve a bad dividend shock, yet attain perfect risk sharing when the dividend is good. From this can obtain the optimal consumptions:
\begin{equation}
c^{gg}=c^{bg}=\dfrac{\overline{\omega}}{2}
\end{equation}

Calculate $c^{gb}$, from the binding condition,  $G(c^{gg},c^{gb})=0$ and using the given $c^{gg}$. Lastly, obtain the $c^{bb}$ from the equation $c^{gb}+c^{bb}={\underline{\omega}}$.
\newpage
\item[(ii.)]  Will the borrowing constraint always bind?  

As dicussed in class, look at the economy in the extreme cases to see the overall effects on each household.  However, the parameters are not given, yet seeing the economy from this angle will see how the parameters affect default decision. 

\begin{description}
\item[$\gamma:$] As the value for $\gamma$ $\downarrow $, each household will recieve less dividend so that more likely to choose to default,
\item[$\beta$:]  As the value for $\beta$ $\downarrow $, the value of current consumption more the consumption in the future.  As $\beta$ decreases, the household is likely to choose to default
\item[$\pi$:]  As the value for $\pi$ $\uparrow $,  households have less persist shock to their endowment.  If obtain  good shock today, then the comsumer will get bad shock tomorrow. Therefore has a higher probability will choose to default today.
\vspace{.25cm}
\\
Listed below are the following parameters are such that the household is less likely to default.  
\begin{eqnarray} \label{eq:parade}
\beta &=& 1 \nonumber
\\
\gamma &=& 1 
\\
\pi&=&0 \nonumber
\end{eqnarray}


Using the extreme cases enables to predict when any household will chose to default.  Allowing the parameters in the extreme case, (\ref{eq:parade}), if the comsumer chooses to default $\Longrightarrow$ then will default $\forall$ set or parameters.  
\vspace{.25cm}
\\
Under the given parameters from (\ref{eq:parade}) , $F(c^{gg},c^{gb})$ from (\ref{eq:3b1}) and $G(c^{gg},c^{gb})$ from (\ref{eq:G}) are reduced to:

\begin{eqnarray}
F(c^{gg},c^{gb})&=&u(c^{gg})-u(\omega^g)  \label{eq:3b4}
\\
G(c^{gg},c^{gb})& =& u(c^{gg})-u(\omega^g) \label{eq:3b5}
\end{eqnarray}
From observation, allowing $\gamma=1$, (\ref{eq:3b5}) will disappear because each household only gets a dividend shock.
\vspace{.25cm}
\\
From the first solution, $\Longrightarrow$ $c^{gg}=\omega^g=9$
\vspace{.25cm}
\\
Applying good market clearing condition, will obtain $c^{bg}$, ($\Longrightarrow$ $c^{bg}=\bar{\omega}-c^{gg}=3$) to give allocation when the household will choose to default in the extreme case.  From here, this illustrated that the borrowing constraint will bind for any set of parameters.

\end{description}
\newpage
\item[(iii.)]   Calculate the stochastic discount factor in the presence of aggregate shocks.
\vspace{.25cm}
\\
The stochastic discount factor is determined by the marginal rates of substitutions of the household with good endowment shock, since this is the first consumption.  However, the dividend is stochastic, which forces the stochastic discount factor to be stochastic as well.  The stochastic discount factor depends on the current status of dividend shock in this economy.
\vspace{.25cm}
\\
\textbf{Case 2:}  For the good dividend shock, $M^g$:
\\
\begin{eqnarray}
M^g &=& \dfrac{E_t u(c_{t+1})}{u(c_t)} \nonumber \\
&=&\dfrac{\beta ((1-\pi) \gamma u(c^{gg}) 
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) )}{u^{gg}}
\end{eqnarray}
\\
\textbf{Case 1:}  For the bad dividend shock, $M^b$:
\\
\begin{eqnarray}
M^b &=& \dfrac{E_t u(c_{t+1})}{u(c_t)} \nonumber \\
&=&\dfrac{\beta ((1-\pi) \gamma u(c^{gg}) 
           +(\pi) \gamma u(c^{bg}) + (1-\pi) (1-\gamma) u(c^{gb}) + (\pi) (1-\gamma) u(c^{bb}) )}{u^{gb}}
\end{eqnarray}


\end{itemize}







\end{description}
\end{enumerate}

\end{document}