Endogenous State Prices, Liquidity, Default, and the Yield Curve