#!/usr/bin/env python
# coding: utf-8
# ## UNFINISHED: Thinking About Blanchard's Presidential Address...
#
# Consider the effect of increasing and then rolling over government debt in a near-canonical model: the Diamond (1965) Overlapping-Generations model.
#
# In this model, one important effect—perhaps the principal effect—of government debt is to directly shift consumption away from the young who buy the debt to use it as a savings vehicle and to the old who hold and sell the debt and . I follow and agree with Blanchard’s correct conclusion that this direct-transfer effect can be welfare-raising or welfare-lowering. It will be welfare-raising as long as the economy is dynamically-inefficient, defined as having its safe rate of interest is less than its growth rate. So far, so good.
#
# In this near-canonical model, a second effect springs from government debt’s potential role in crowding-out capital investment. To the extent that it does so, and to the extent with that crowding-out raises profits received by old wealthholders and diminishes wages earned by younger workers, this second factor-price effect can also be welfare-raising or welfare-lowering: it also transfers from the young, who earn less in wages, to the old, whose profits are increased because the firms they own pay less in wages. It will be welfare-raising, Blanchard concludes in his presidential address, only under a stronger condition than that required for the direct-transfer effect: not just the safe rate of interest on government bonds but the risky rate of profit on capital investment must be lower than the economy’s growth rate.
#
# We here try to dot some of the i's and cross some of the t's in Blanchard's argument.
#
#
# ### MEMO: Math for the Two-State Log-Utility Cobb-Douglas Production Case
#
# Consider the simple near-canonical model, with all variables expressed in per-worker values, with neither population growth nor technological progress, with log utility, with Cobb-Douglas production, with a wedge between the expected profit rate and the safe government bond rate generated by two-state aggregate uncertainty about returns to capital, and with zero initial government debt. We then consider an infinitesimal increase $ dD$ in this debt, which is then rolled over indefinitely.
#
# Assume that the economy is populated by people who live for two periods, working when young, receiving profits from their savings when old, and consuming in both periods. Their utility function is:
#
# >(1) $ V = (1-\beta)U(C_y) + \beta{U(C_o)} (1-\beta)ln(C_y) + \beta{ln(C_o)} $
#
# where $ C_y $ is consumption when young, and $ C_o $ is consumption when old. Maximizing utility produces this consumption first-order condition for an agent young ("y") in period t and old ("o") in period t+1:
#
# >(2) $ \frac{(1-\beta)}{C_{y,t}} = {R^f}_t E_t \left[ \frac{\beta}{C_{o,t+1}} \right] $
#
# Now add uncertainty: in each period there is a shock $ \epsilon $ to the production function. Thus the poroduction function is:
#
# >(3) $ Y_{t+1} = (1 + \epsilon_{t+1})F(K_{t+1}) = (1 + \epsilon_{t+1})(K_{t+1})^\alpha $
#
# Because this is a Cobb-Douglas production function, the profits and thus the consumption of the old are simply a fraction $\alpha $ of the volume of production:
#
# >(4) $ C_{o,t+1} = R_{t+1}K_{t+1} = {\alpha}(1 + \epsilon_{t+1})F(K_{t+1}) = {\alpha}(1 + \epsilon_{t+1})F({\beta}W_t) $
#
# And from the assumptions of Cobb-Douglas production and log utility, the consumption of the young is a fraction $(1-\beta)(1-\alpha) $ of the volume of production:
#
# >(5) $ C_{y,t} = (1-\beta)W_t = (1-\beta)(1-\alpha)(1 + \epsilon_{t})F(K_{t}) $
#
# Under these assumptions, the risky interest rate must then satisfy:
#
# >(6) $ \frac{(1-\beta)}{C_{y,t}} = E_t \left[ \frac{\beta{R_{t+1}}}{C_{o,t+1}} \right] $
#
# Now consider the two-state-shock world: in each period the shock to the economy $ \epsilon $ can take on one of two values with equal probability: $ +\sigma $ or $ -\sigma $:
#
# Derive the one-period safe interest rate as of time t, after the resolution of period-t uncertainty:
#
# >(7) $ \frac{(1-\beta)}{C_{y,t}} = {R^f}_t \left[ \frac{1}{2}\frac{\beta}{{\alpha}(1 + \sigma)F({\beta}W_t)} + \frac{1}{2}\frac{\beta}{{\alpha}(1 - \sigma)F({\beta}W_t)} \right] $
#
# >(8) $ \frac{1}{W_t} = {R^f}_t \frac{\beta}{{\alpha}F({\beta}W_t)} \left[ \frac{1}{1 - \sigma^2} \right] $
#
# >(9) $ {R^f}_t = \frac{{\alpha}F({\beta}W_t)}{{\beta}W_t}\left[ 1 - \sigma^2 \right] = \frac{\alpha[1-\sigma^2]}{({\beta}W_t)^{1-\alpha}} $
#
# Derive the one-period risky interest rate as of time t, after the resolution of period-t uncertainty:
#
# >(10) $ E_t(R_{t+1}) = \frac{{\alpha}F({\beta}W_t)}{{\beta}W_t} = \frac{\alpha}{({\beta}W_t)^{1-\alpha}} $
#
# Thus the one-period risk spread as of time t, after the resolution of period-t uncertainty:
#
# >(11) $ \frac{E_t(R_{t+1})}{{R^f}_t} = \frac{1}{1 - \sigma^2} $
#
# This completes our framework.
#
#
# ### Intergenerational Transfer Scenarios
#
# We consider intergenerational transfer scenarios:
#
# >(a) Transfer a fixed amount from the young to the old: appropriately evaluated from the standpoint of those young at time t at the period-t safe interest rate $ {R^f}_t $
#
# >(b) Make a risky investment that costs a fixed amount when young and returns an amount correlated with consumption when old: appropriately evaluated from the standpoint of those young at time t at the period-t risky interest rate $ E_t(R_{t+1}) $.
#
# >(c) The factor-price crowding-out effect in Blanchard's presidential address. Evaluated from the individual's standpoint—after the resolution of the period-t shock to the economy—this looks exactly like a risky investment: your profits in the future will be higher by an amount correlated with consumption-when-old at the cost of a known and certain reduction in your consumption resources today, and hence is appropriately evaluated at the risky interest rate.
#
# >(d) But I also want to think about another case": The "social insurance" case—a transfer proportional to your wage and consumption when young, to finance a fixed payment to the old. As this is a negative-beta asset, it is properly evaluated at an interest rate lower than the period-t safe rate _if we evaluate it before period-t uncertainty is resolved_. But if it is evaluated after period-t uncertainty is resolved, it is appropriately evaluated at the period-t safe interest rate
#
#
#
# ### Stepping Back from Period t to the Nunc Stans
#
# And things get (more) complicated. Analysis as of time t knowing the one-period risky and safe interest rates as of time t is well and good. However, from a broader social-welfare perspective the risky interest rate as of time t $ E_t(R_{t+1}) = \frac{{\alpha}F({\beta}W_t)}{{\beta}W_t} $ is itself stochastic—a function of all those previous $ \epsilon $ shocks up to time t that determine $ Y_t $ both directly and by feeding into the value of $ K_t $. The safe interest rate as of time t $ {R^f}_t = (1-\sigma^2)E_t(R_{t+1}) $ is also stochastic: it also depends on everything that affects the risky interest rate, plus it depends on the variance of the shock.
#
# The natural next step, therefore, is to cease conditioning on $ \left[ \epsilon_t, \epsilon_{t-1}, \epsilon_{t-2}... \epsilon_{t-∞} \right] $ and take unconditonal expectations. In which case things get messy... or messier...
#
# From a social-welfare every-generation-counts-equally standpoint, it is sufficient to compare the average utility loss to the young with the average utility gain to the old: we are aggregating over both generations and ages. Thus we do not have to keep track of the fact that relatively-poor young with low consumption because of a low wage when young and thus with a high marginal utility of wealth when young will probably still be poor (but less poor) when old because they have little capital and hence have a high (but less high) marginal utility of wealth when old.
#
# Proper analysis this thus requires calculating the unconditional expected utility cost of fixed and proportional-to-current consumption transfers:
#
# >(a) From an unconditional expectations standpoint, the expected marginal utility of the young which multiplies the amount of a fixed direct-transfer is:
#
# >>(12) $ E \left[ \frac{1-\beta}{(1-\beta)W} \right] $
#
# >The expected marginal utility of the old which multiplies the amount of a fixed direct-transfer is:
#
# >>(13) $ E \left[ \frac{\beta(1-\alpha)}{{\alpha}W} \right] $
#
# >Thus a direct transfer will raise expected well-being if:
#
# >>(14) $ E \left[ \frac{1}{W} \right] < \left[ \frac{\beta(1-\alpha)}{\alpha} \right] E \left[ \frac{1}{W} \right] $
#
# >>(15) $ \frac{\alpha}{\beta(1-\alpha)} < 1 $
#
# >The question then is: how does this relate to $ E \left[ {R^f}_t \right] $ ? Which depends on $ \sigma $, doesn't it?
#
# >(c) From an unconditional expectations standpoint, a proportional transfer raises well-being if the proportional rise in consumption for the old times $ \beta $ is greater than the proportional decline in consumption for the young. The ratio of consumption of the old to the consumption of the young is:
#
# >>(16) $ \frac{\alpha}{(1-\beta)(1-\alpha)} $
#
# >Thus the unconditional expected utility gain to the old will be greater than the loss to the young when
#
# >>(17) $ \frac{\alpha(1-\beta)}{\beta(1-\alpha)} < 1 $
#
# If we consider the steady-state of the model without any stochastic shocks, we have:
#
# >(18) $ W = (1-\alpha)K^{\alpha} $
#
# >(19) $ RK = {\alpha}K^{\alpha} $
#
# >(20) $ W = (1-\alpha)\frac{RK}{\alpha} $
#
# >(21) $ \frac{W}{K} = \frac{(1-\alpha)R}{\alpha} $
#
# And we also have:
#
# >(22) $ K = {\beta}W $
#
# >(23) $ \frac{W}{K} = \frac{1}{\beta} $
#
# So:
#
# >(24) $ \frac{1}{\beta} = \frac{(1-\alpha)}{\alpha}R $
#
# >(25) $ \frac{\alpha}{\beta(1-\alpha)} = R $
#
# Which would seem to mean that (17) is:
#
# >(26) $ R < \frac{1}{1-\beta} $
#
#
# ### Memos...
#
# #### The State of the System as a Function of Past Shocks
#
# >(1) $ C_{y,t} = (1-\beta)W_t $
#
# >(2) $ C_{y,t} = (1-\beta)(1+\epsilon_t)(K_t)^\alpha $
#
# >(3) $ K_{t+1} = \beta W_t $
#
# >(4) $ K_{t+1} = \beta(1+\epsilon_t)(K_t)^\alpha $
#
# >(5) $ C_{o,t} = \alpha(1+\epsilon_{t+1})\left[ \beta(1+\epsilon_t)(K_t)^\alpha \right]^\alpha $
#
# >(6) $ K_{t+2} =\beta(1+\epsilon_{t+1})(\beta(1+\epsilon_t)(K_t)^\alpha)^\alpha $
#
# >(7) $ K_t = \beta^\left(\frac{1}{1-\alpha}\right)(1+\epsilon_{t-1})(1+\epsilon_{t-2})^\alpha(1+\epsilon_{t-3})^{2\alpha}(1+\epsilon_{t-4})^{3\alpha}(1+\epsilon_{t-5})^{4\alpha}... $
#
# >(7') $ K_t = \beta^\left(\frac{1}{1-\alpha}\right) \displaystyle\prod_{i=1}^{∞} {(1+\epsilon_{t-i})^{\alpha(i-1)}} $
#
# And then other variables:
#
# >(8) $ W_t = (1-\alpha)(1+\epsilon_t) \beta^\left(\frac{\alpha}{1-\alpha}\right) \left[ \displaystyle\prod_{i=1}^{∞} {(1+\epsilon_{t-i})^{\alpha(i-1)}} \right]^\alpha $
#
# >(9) $ C_{y,t} = (1-\beta)(1-\alpha)(1+\epsilon_t) \beta^\left(\frac{\alpha}{1-\alpha}\right) \left[ \displaystyle\prod_{i=1}^{∞} {(1+\epsilon_{t-i})^{\alpha(i-1)}} \right]^\alpha $
#
# >(10) $ C_{o,t+1} = \alpha(1+\epsilon_{t+1}) \beta^\left(\frac{\alpha}{1-\alpha}\right) \left[ \displaystyle\prod_{i=1}^{∞} {(1+\epsilon_{t+1-i})^{\alpha(i-1)}} \right]^\alpha $
#
#
# #### Steady States
#
# >(1) $ K = \beta(K)^\alpha $
#
# >(2) $ K^{1-\alpha} = \beta $
#
# >(3) $ K = \beta^{\left( \frac{1}{1-\alpha} \right)} $
#
# >(4) $ W = (1-\alpha)K^\alpha $
#
# >(5) $ W = (1-\alpha)\beta^{\left( \frac{\alpha}{1-\alpha} \right)} $
#
# >(6) $ W = (1-\alpha) \frac{RK}{\alpha} $
#
# >(7) $ \frac{W}{K} \frac{\alpha}{1-\alpha} = R $
#
# >(8) $ \frac{W}{K} = \frac{1-\beta}{\beta} $
#
# >(9) $ R = \frac{\alpha(1-\beta)}{\beta(1-\alpha)} $
#
#
# ## Thinking About Blanchard's Presidential Address...
#
#
#
# ## Catch Our Breath—Further Notes:
#
# Blanchard:
# Waldmann:
# *
# *
#
#

#
# ----
#
# * Weblog Support
# * nbViewer
#
# * Weblog Support
# * nbviewer
#
#
#
# ----
# ----
#
# ----
#
# ----
#
# ----
#
#
#
#
# 3.
# 3. Impose a payroll tax proportional to consumption when old and pay a fixed social insurance amount to the old: appropriately evaluated at ???
# 4. The factor-price effect in Blanchard: reduce resources of the young by an amount proportional to their wages, and increase resources of the old by an amount proportional to their profits...
# Let me set out a simple case, with neither population growth nor technological progressm with log utility, and with uncertainty and thus a wedge begtween the expected profit rate and the safe government bond rate generated by a shock to productivity in each period that can take on two values: the productivity of capital in period t can be, with 50% probability for each, either $ R_t = (1 + \epsilon_t)R(K_t) $ or $ R_t = (1 - \epsilon_t)R(K_t) $.
#
# Let me do the log-utility case:
#
# >(1) $ u(C) = \ln(C) $
#
# with rate of time-discount $ \beta $:
#
# >(2) $ U_t = E_t \left[ u\left(C_{y,t}\right) + {\beta}u\left(C_{o,t+1}\right) \right] = E_t \left[ \ln(C_{y,t}) + \beta\ln(C_{o,t+1}) \right] $
#
# and uncertainty:
#
# >(3) $ R_t = (1+\epsilon)R(K_t) $ with $ P=0.5 $; $ R_t = (1-\epsilon)R(K_t) $ with $ P=0.5 $
#
# Then log utility gives us:
#
# >(4) $ K_{t+1} = \frac{\beta}{1+\beta}W_t $
#
# And consumption spending when young and old are:
#
# >(5) $ C_{y,t} = W_t - K_{t+1} = \frac{1}{1+\beta}W_t $
#
# >(6) $ C_{o,t+1} = \frac{{\beta}R(K_{t+1})W_t}{1+\beta} $
#
# Marginal utility when young is:
#
# >(7) $ u'(C_{y,t}) = \frac{1}{C_{y,t}} = \frac{1+\beta}{W_t} $
#
# And marginal utility when old is:
#
# >(8) $ u'C_{o,t+1} = E\left[\frac{1}{C_{o,t+1}}\right] = \frac{1}{2}\frac{1}{(1+\epsilon)R(K_{t+1})K{t+1}} + \frac{1}{2}\frac{1}{(1-\epsilon)R(K_{t+1})K{t+1}} $
#
# >(9) $ u'C_{o,t+1} = \frac{1+\beta}{\beta(1-\epsilon^2)R(K_{t+1})W_t} $
#
# These together imply the safe government-bond rate of interest:
#
# >(10) $ {R^f}_{t+1} = (1-\epsilon^2)R(K_{t+1}) $
#
# Now let us consider a government that issues debt at the safe rate and rolls it over, paying out the surplus or taxing to cover its deficit. Suppose the government raises its debt from 0 by an amount $ dD $. This has a negative direct-transfer effect on the utility derived when young because the young commit cash to buying the debt of:
#
# >(11) $ -E \left[ u'(C_{y,t})dD \right] = -\frac{1+\beta}{W_t}dD $
#
# This has a positive direct-transfer effect on the utility derived when old because the old receive interest and principle (plus or minus surplus transfers or taxes) of:
#
# >(12) $ E \left[ {\beta}u'(C_{o,t+1})dD \right] = \frac{1+\beta}{(1-\epsilon^2)R(K_{t+1})W_t}dD $
#
# Now let us consider the factor-price effect of this infinitesimal debt increase. Via crowding-out of capital it lowers the bargaining power and thus the wage of the young by an amount $ dW_t $, with utility effect:
#
# >(13) $ E \left[ \frac{(1+\beta)dW_t}{W_t} \right] $
#
# And this factor-price effect reduces the wages paid by the old by an amount $ dW_{t+1} $, with utility effect:
#
# >(14) $ -\beta E \left[ u'C_{o,t+1} \right] =
# -\frac{1}{2}\frac{(1+\beta)dW_{t+1}}{(1+\epsilon)R(K_{t+1})W_t} -
# \frac{1}{2}\frac{(1+\beta)dW_{t+1}}{(1-\epsilon)R(K_{t+1})W_t} $
#
# From (11) and (12), our condition for the direct-transfer effect to raise well-being becomes:
#
# >(15) $ -\frac{1+\beta}{W_t} + \frac{1+\beta}{(1-\epsilon^2)R(K_{t+1})W_t} > 0 $
#
# >(16) $ -(1-\epsilon^2)R(K_{t+1}) + 1 > 0 $
#
# which is that the risk-free rate is less than one—i.e., that the risk-free rate is less than the zero growth rate of the economy.
#
# If $ W_t $ and $ dW_{t+1} $ are not stochastic—if wages are set before that period's productivity shock is revealed—then the factor-price effect condition derived from (13) and (14) also becomes (16), and the relevant rate is the risk-free rate.
#
# If by contrast wages are stochastic—if wages are a constant fraction of output, say, so that the productivity shock affects wages so that: $ W_t = (1 ± \epsilon_t)W(K_t) $ and $ dW_{t+1} = (1 ± \epsilon_t)\frac{dW(K_{t+1})}{dD}dD $, then (13) becomes
#
# >(17) $ \frac{1}{2}\frac{(1+\beta)(1 + \epsilon_t)dW(K_t)}{(1 + \epsilon_t)W(K_t)} + \frac{1}{2}\frac{(1+\beta)(1 - \epsilon_t)dW(K_t)}{(1 - \epsilon_t)W(K_t)} = \frac{(1+\beta)dW(K_t)}{W(K_t)} $
#
# and (14) becomes:
#
# >(18) $ -\frac{1}{4}\frac{(1+\beta)(1+\epsilon)dW(K_{t+1})}{(1+\epsilon)R(K_{t+1})(1+\epsilon)W(K_t)} -
# \frac{1}{4}\frac{(1+\beta)(1-\epsilon)dW(K_{t+1})}{(1-\epsilon)R(K_{t+1})(1+\epsilon)W(K_t)}
# -\frac{1}{4}\frac{(1+\beta)(1+\epsilon)dW(K_{t+1})}{(1+\epsilon)R(K_{t+1})(1-\epsilon)W(K_t)} -
# \frac{1}{4}\frac{(1+\beta)(1-\epsilon)dW(K_{t+1})}{(1-\epsilon)R(K_{t+1})(1-\epsilon)W(K_t)} $
#
# Simplifying:
#
# >(19) $ \left[ -\frac{1}{4}\frac{1}{R(K_{t+1})(1+\epsilon)W(K_t)} -
# \frac{1}{4}\frac{1}{R(K_{t+1})(1+\epsilon)W(K_t)}
# -\frac{1}{4}\frac{1}{R(K_{t+1})(1-\epsilon)W(K_t)} -
# \frac{1}{4}\frac{1}{R(K_{t+1})(1-\epsilon)W(K_t)} \right] \left[(1+\beta)dW(K_{t+1}) \right] $
#
# >(20) $ -\left[ \frac{1}{4}\frac{1}{(1+\epsilon)}
# +\frac{1}{4}\frac{1}{(1+\epsilon)}
# +\frac{1}{4}\frac{1}{(1-\epsilon)}
# +\frac{1}{4}\frac{1}{(1-\epsilon)} \right] \left[ \frac{(1+\beta)dW(K_{t+1})}{R(K_{t+1})W(K_t)} \right] $
#
# >(21) $ \frac{(1+\beta)dW(K_{t+1})}{(1-\epsilon^2)R(K_{t+1})W(K_t)} $
#
# The condition for the factor-price effect on utility to be positive is then:
#
# >(22) $ \frac{(1+\beta)dW(K_t)}{W(K_t)} - \frac{(1+\beta)dW(K_{t+1})}{(1-\epsilon^2)R(K_{t+1})W(K_t)} > 0 $
#
# >(23) $ dW(K_t) - \frac{dW(K_{t+1})}{(1-\epsilon^2)R(K_{t+1})} > 0 $
#
# And since $ dW(K_t) < 0 $:
#
# >(24) $ (1-\epsilon^2)R(K_{t+1}) - \frac{dW(K_{t+1})}{dW(K_t)} < 0 $
#
# This looks, again, like the risk-free rate. I think the intuition is that two equally-risky cash flows _are_, in fact, properly discounted at the risk-free rate.
#
# Thus I have been unable to reproduce Blanchard's conclusion that the proper discount rate to apply in assessing the factor-price effect is not the risk-free government-bond rate but the expected risky profit rate. As Robert Waldmann says, Blanchard is correct for the case he considers—which is of a generation of workers who work with the average capital stock and receive the average wage. But the effect on the average is not the average of the effects: the factor-price effect has a social insurance component, charging the young less for the transfer when the young are poor and when as a result their marginal utility of consumption when young is low.
#
# Of course, the chance I have not made an algebraic error somewhre here is 0.1, and my assessment of the chance that my conclusion is correct is only 0.25...
#
#
# ### Reply to Waldmann
#
# I see. Let us specialize further to:
#
# >(25) $ F(K_t,1) = \frac{{K_t}^\alpha}{\alpha} $
#
# And let us recall:
#
# >(4) $ K_{t+1} = \frac{\beta}{1+\beta}W_t $
#
# Then:
#
# >(26) $ R_{t+1} = {K_{t+1}}^{\alpha-1} = \left(\frac{1+\beta}{\beta{W_t}}\right)^{1-\alpha} $
#
# >(27) $ R_{t+1}K_{t+1} = \left(\frac{\beta}{1+\beta}\right)^{\alpha} {W_t}^\alpha $
#
# >(28) $ W_t = (1±\epsilon_t)\frac{(1-\alpha){K_t}^\alpha}{\alpha} $
#
# And so (13) plus (14):
#
# >(29) $ (1 + \beta) E\left[ \frac{dW_t}{W_t} -
# \frac{dW_{t+1}}{(1±\epsilon_{t+1})R(K_{t+1})W_t} \right] $
# becomes
#
# >(30) $ (1+\beta) E\left[
# \left(\frac{\alpha}{1-\alpha}\right)
# \frac{dW_t}{(1±\epsilon_{t}){K_t}^{\alpha}} -
# \left(\frac{1+\beta}{\beta}\right)^{\alpha}
# \left(\frac{\alpha}{1-\alpha}\right)^{\alpha}
# \frac{dW_{t+1}}{(1±\epsilon_{t+1})
# (1±\epsilon_{t})^\alpha}
# \frac{1}{{K_t}^{2\alpha}}
# \right] $
#
# and then $ K_t $ will depend on $ W_{t-1} $ which depends on $ K_{t-1} $ which depends on $ W_{t-2} $ which depends on $ K_{t-2} $, and so all the past $ \epsilon_{t-i} $ terms will get into the mix...
# Perhaps, since $ K_t $ depends only on $ \epsilon_{t-1} $ and earlier, we can write:
#
# >(31) $ (1+\beta)
# E\left[
# \left(
# \frac{\alpha}{1-\alpha}
# \right)
# \frac{dW_t}{(1-\epsilon^2){K_t}^{\alpha}} -
# \left(
# \frac{1+\beta}{\beta}
# \right)^{\alpha}
# \left(
# \frac{\alpha}{1-\alpha}
# \right)^{\alpha}
# \frac{dW_{t+1}}{(1-\epsilon^2){K_t}^{2\alpha}}
# \left[
# \frac{1}{2}\frac{1}{(1+\epsilon)^\alpha} +
# \frac{1}{2}\frac{1}{(1-\epsilon)^\alpha}
# \right]
# \right]
# $
#
# and then approximate it as:
#
# >(32) $ (1+\beta)
# E\left[
# \left(
# \frac{\alpha}{1-\alpha}
# \right)
# \frac{dW_t}{(1-\epsilon^2){K_t}^{\alpha}} -
# \left(
# \frac{1+\beta}{\beta}
# \right)^{\alpha}
# \left(
# \frac{\alpha}{1-\alpha}
# \right)^{\alpha}
# \frac{dW_{t+1}}{(1-\epsilon^2){K_t}^{2\alpha}}
# \left[
# \frac{1}{(1-\alpha^2\epsilon^2)}
# \right]
# \right]
# $
#
# ?
#
#
#
# ### RJW Writes on February 2...
#
# >I have been thinking a lot about Blanchard's presidential address and looking at the effect of changes in W and R on average welfare rather than on the welfare of a generation which works with an average amount of capital using average technology as Blanchard does. Also I have been playing a lot with oj.m the tiny MatLab program which simulates with Logarithmic utility, and Cobb Douglas production.
#
# >I think there is some interest in the point that these are different. But I no longer think the difference is very dramatic. One thing I've relearned is that Blanchard is very smart. The answer to his question is much simpler than the answer to the slightly more interesting question of what happens to average welfare. Also he has a very useful analogy -- the effects of reduced K on W and R are vaguely similar to the effects of a proportional (flat) tax wages with proceeds given to the old. In each case, the amount a young person loses depens on the technology shock and is higher if the shock is good. This means that I imagine a social insurance effect of taking less from poor generations (so did Brad). But now I accept that the key variable is the average risky return. I think this is what matters for the effect of the tax and transfer policy on average welfare too.
#
# >Warning this e-mail turned out to be much longer than I expected with lots of plain ascii algebra. The bottom line is that Blanchard's analysis is more relevant to the effect of debt on welfare averaged across generations than I guessed. He really used the tax and transfer analogy which is mentioned then dropped in his final text.
#
# >I consider another analogy. Imagine a young person decides to save a tiny bit more than the optimal amount. This must have zero first order effect on her welfare (FOC for optimum). Ok now imagine a worker in generation t who decides to save $ \Delta{W_t} $ extra for tiny delta (definitely tiny so tiny squared effect on welfare).
#
# >I'm just going to define $ \beta_t =K_{t+1}/W_t $ .Obviously I started with a logarithmic utility model where $ \beta_t $ is a constant but the story is general. Also $ \alpha_t $ is $ W_t/Y_t $. This is Blanchard's notation (which I hate). Of course I started with Cobb-Douglas production where $ \alpha_t $ is a constant, but the story is general.
#
# >Income next period is higher by
#
# >> $ R_{t+1}{\Delta}W_t = R_{t+1}{\Delta}K_{t+1}\frac{1}{\beta_t} = \frac{(1-\alpha_{t+1})}{\alpha_{t+1}}\frac{\Delta{W_{t+1}}}{\beta_t} $
#
# >So a worker is indifferent about giving up $ \Delta{W_t} $ consumption now to get more when old.
#
# >The effect of the tax and transfer policy on welfare depends on 1-(1-alpha_(t+1))/alpha_(t+1))(1/beta_t)
#
# Because with the tax and trasfer policy the worker pays (delta)W_t gets (delta)W_(t+1). when old and the worker is indifferent about paying (delta)W_t and getting (1-alpha_(t+1))/alpha_(t+1))(1/beta_t)(delta)W_t+1.
#
# Proposition: For the average worker working with average capital with average technology alpha_(t+1))/alpha_(t+1))(1/beta_t) is equal to the expected return on capital.
#
# Proof; Consider the average worker working with average technology
# So K_(t+1) = K_t which I call K. W_t is average wage W. Also assume that the technology shock is Hicks neutral so alpha_t is just a function of K_t and doesn't depend on the technology shock A_t, so alpha_t = alpha(K) which I call alpha. Also the workers get the average wage W and R_t = expected R given K_t=K which I call R.
#
# I will (very very gladly) drop time subscripts.
#
# (1-alpha_(t+1))/alpha_(t+1))(1/beta_t) = R_(t+1)K/W_(t+1) (W/K) Given the key Hicks neutral assumption, R_(t+1)/W_(t+1) is not stochastic and is equal to R/W
# so (1-alpha_(t+1))/alpha_(t+1))(beta_t) = R_(t+1)K/W_(t+1) (W/K) = R(K/W)(W/K) = R
#
# If we assume Cobb Douglas technology so alpha is constant and logarithmic utility so beta is constant, then the tax and transfer program increases all generations' welfare to increase if and only if R<1. Here recall that R is defined as the return on capital for average capital used with average technology. Even for constant alpha and beta, the expected return on capital will vary as K varies, but (for that very special case) the key number for all generations is the return on average capital used with average technology.
#
# More generally, the sign of the effect on different generations' welfare will depend on variable alpha and beta, but there is no reason to think that the critical variable will generally be less than the expected return on capital.
#
# This has gotten very long. The point is that OJ is smart and it is much easier to understand the effects of a payroll tax and transfer policy than to understand the effects of crowding out K.
#
# Blanchard's problem is that fixed D crowds out a fixed amount of capital not a fixed fraction of the capital. This means that the effect of increased debt D on log(wages) and returns on capital depends on K_t . Wages aren't reduced by a fixed proportion of wages. This creates social insurance effects. This means that we sort of have a point. But it is all kind of second order.
#
#
# Robert Waldmann
# 12:49 AM (7 hours ago)
#
# Reply
#
# to Barbara, me
#
# Read the first e-mail first (not that it is necessarily worth working through all the ascii algebra in it). I can't help typing more. following " Blanchard's problem is that fixed D crowds out a fixed amount of capital not a fixed fraction of the capital. This means that the effect of increased debt D on log(wages) and returns on capital depends on K_t . Wages aren't reduced by a fixed proportion of wages. This creates social insurance effects. This means that we sort of have a point. But it is all kind of second order."
#
# OK so the point (if any) is that fixed debt D doesn't cause K_t to decline by a constant proportion. Rather, given K_t and A_t fixed debt crowds out a fixed amount D of capital reducing K_(t+1) by D not multiplying it by a number less than 1. Above I argued that key to understanding of a payroll tax and transfer on weflare is (R-1) where R is the return on an average capital stock used with average technology. That works also for changes in W and R, provided the reduction of W is a constant fraction of W. That would be true for a constant elasticity of substitution production function if the reduction of K is a fixed proportion of K. But it isn't.
#
# This matters for two reasons, both of which are a bit like social insurance (neither applies to workers who work with average K using average technology).
# 1) if the workers young at time t are unlucky because they are hit by a bad technology shock (low A) then fixed D is good for them, because a) they will also be poor when they are old because K_(t+1) will be low and b) crowding out by debt. has a big effect on R_(t+1) because K_(t+1) is low. This is good for average welfare. A big positive effect on R for old generations with low K reduces the variance of consumption when old if other things are equal (longer argument below if anyone is interested)
# 2) but other things aren't. The fixed amont of crowding out will reduce the mean of K more than it reduces the standard deviation of K, so it increases the coefficient of variation of K. This is bad for expected welfare. One way of seeing this is to think of generation young at t+1 when A_t is low. They are poor even if A_(t+1) is average, because K_(t+1) is low. Debt will have a big proportional effect on their wages, because K_(t+1) is low. (again longer argument below if anyone is interested).
#
# In simulations the good effect 1) is bigger than the bad effect 2) because the welfare of generation t depends a lot on A_t and not so much on K_t which doesn't vary so much. However, first this isn't a dramatic result even in the special case and second I fear it depends on the particular assumptions of log utility, Cobb-Douglas production, share of labor of around 0.67 and saving about half of labor income. (a third time more on this below if anyone is interested.
#
# So there is something there about how the effect on average welfare is different than the effect on welfare of a generation which uses an average amount of capital with average technology. But it isn't as dramatic as I expected.
#
# long boring version of point 1)
# This really is analysis of the welfare of a generation which works with the average amound of capital K but using stochastic technology A_t.
# a) The argument requires that if A_t is low then K_(t+1) will be low. This a natural assumption. It is certainly true for logarithmic utility. It is, of course, possible to assume weird utility and production functions so it isn't true.
# b) it also requires that low K causes low capital income. This is true for a Cobb-Douglas production function, but it isn't true if capital and labor are very poor substitutes so the elasticity of demand for capital is greater than 1 in absolute value. It's a reasonable assumption, but the claim isn't universal.
# c) finally it requires that low K implies a large effect of reduction in K on R. This is true of functions with a constant elasticity of substitution of capital and labor. It isn't true of all concave CRS production functions.
#
# long boring version of point 2)
#
# One way of thinking about this is to note that low A_t is bad for the generation young in period t+1, because they don't have much capital to work with. compared to a fixed percent reduction in K, fixed D makes this worse for them, because it causes a proportionally large reduction in K_(t+1). More generally, this also means that (compared to a fixed proportional reduction in K, D increases the harm due to low A_(t-1), A_(t-2) etc. The simple way of summing up these costs is what I wrote above. For the same reduction in average K, fixed D causes a smaller reduction in the variance of K than a fixed proportional reduction in K. The higher (in the fixed D case) variance causes a lower average of welfare across generations. This is a social (anti)insurance effect which matters for average welfare but not for the welfare of workers who work with the average amount of capital.
#
# Long boring discussion of which effect is bigger. This unfortunately begins to be very dependent on assuming logarithmic utility and Cobb-Douglas production . I'm just going to do that.
# log(K_(t+1)) = log(beta*alpha*A_t*K_t^(1-alpha) ) [all of this is Blanchard's notation which is different from Brads. alpha is the share of labor, agents max (utility young)(1-beta) + (utility when old)beta
# variance(log(K)) = variance(log(A)) + (1-alpha)^2 variance(log(K))
# variance log(K)) = variance(log(A))/(1-(1-alpha)^2)
#
# log(W) = log(alpha*A*K^(1-alpha))
#
# Variance(log(W)) = variance(log(A)) + (1-alpha)^2/(1-(1-alpha)^2)variance(log(A))
#
# For alpha = 2/3 the second term is 1/8 as big as the first.
#
# This was all at D = 0, but it's clear that the changes in the variance of consumption when old due to A_t and the variance of capital are rougnly proportional to the variances.
#
# finally, for log utility the second order approximation has the term -variance/(2 mean^2) so what matters is the coefficient of variation or the variance of the log.
#
# Fortunately, in the real world, K grows smoothly and risk is risk in Y/K not in K, so this at least seems realistic.
#
# But all kind of messy and second order.
#
#
#
# For (3), the utility cost when young is:
#
# > (11) $ \frac{(1+\epsilon_t)dW_t}{(1-\beta)(1-\alpha)(1 + \epsilon_{t})F(K_{t})} = \frac{dW_t}{(1-\beta)(1-\alpha)F(K_{t})} = (1-\sigma^2) E \left[ U'(C_y) \right] dW_t $
#
#
# In[ ]: