We solve analytically a pure exchange general equilibrium model of heterogeneous beliefs with habit forming preferences. Equilibrium prices depend on three factors: (i) the habit formation parameter; ii) the degree of disagreement; iii) the dynamics of disagreement. We show that in the absence of time-varying disagreement, it is possible to construct an observational equivalent economy with homogeneous beliefs, despite the fact that investors update their beliefs in a Bayesian way. We assume time-varying disagreement as a reduced-form model for an economy in which behavioral biases, asymmetric information or cultural differences might explain why information coming to the market is processed differently by different individuals. When the factor of disagreement is time-varying, its time varying properties have significant effects on the interest rate and its volatility. An increase in disagreement increases the interest rate when risk aversion is higher than logarithmic (myopic investor); negative correlation between disagreement and risk aversion (lower disagreement implies higher aggregate risk-aversion), results in lower volatility of interest rates. There is evidence that disagreement and risk aversion are negatively correlated: in recessions risk-aversion goes up while disagreement tends to go down (investors become pessimistic and markets dry up). In addition, time-varying disagreement affects the correlation between stock prices and the discount factor and, therefore, the equity premium.