Skip to content

Commit

Permalink
some miscelaneous changes, merged TPI
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-magnusson committed Jul 20, 2015
1 parent e9706c2 commit cde004e
Show file tree
Hide file tree
Showing 8 changed files with 121 additions and 125 deletions.
6 changes: 5 additions & 1 deletion Python/CURRENT_DEBUGGED_VERSION/TPI.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
'''


def SS_TPI_firstdoughnutring(guesses, winit, rinit, BQinit, T_H_init, j):
def SS_TPI_firstdoughnutring(guesses, winit, rinit, BQinit, T_H_init, , initial_b, j, parameters, theta, tau_bq):
'''
Solves the first entries of the upper triangle of the twist doughnut. This is
separate from the main TPI function because the the values of b and n are scalars,
Expand All @@ -117,7 +117,11 @@ def SS_TPI_firstdoughnutring(guesses, winit, rinit, BQinit, T_H_init, j):
rinit = initial rental rate (scalar)
BQinit = initial aggregate bequest (scalar)
T_H_init = initial lump sum tax (scalar)
initial_b = initial distribution of capital (SxJ array)
j = which ability type is being solved for (scalar)
parameters = list of parameters (list)
theta = replacement rates (Jx1 array)
tau_bq = bequest tax rates (Jx1 array)
Output:
euler errors (2x1 list)
'''
Expand Down
10 changes: 6 additions & 4 deletions Python/dynamic/SS_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Creates graphs for steady state values.
This py-file calls the following other file(s):
firm.py
household.py
SSinit/ss_init_vars.pkl
SS/ss_vars.pkl
OUTPUT/Saved_moments/params_given.pkl
Expand All @@ -26,8 +28,8 @@
from mpl_toolkits.mplot3d import Axes3D
import cPickle as pickle

import firm_funcs as firm
import household_funcs as house
import firm
import household

'''
------------------------------------------------------------------------
Expand Down Expand Up @@ -91,7 +93,7 @@ def the_inequalizer(dist, pop_weights, ability_weights, S, J):
Kss_init = Kss
Lss_init = Lss

Css_init = house.get_C(cssmat, omega_SS.reshape(S, 1), lambdas)
Css_init = household.get_C(cssmat, omega_SS.reshape(S, 1), lambdas)
iss_init = firm.get_I(bssmat_splus1, bssmat_splus1, delta, g_y, g_n_ss)
income_init = cssmat + iss_init
# print (income_init*omega_SS).sum()
Expand Down Expand Up @@ -292,7 +294,7 @@ def the_inequalizer(dist, pop_weights, ability_weights, S, J):



Css = house.get_C(cssmat, omega_SS.reshape(S, 1), lambdas)
Css = household.get_C(cssmat, omega_SS.reshape(S, 1), lambdas)
iss = firm.get_I(bssmat_splus1, bssmat_splus1, delta, g_y, g_n_ss)
income = cssmat + iss
# print (income*omega_SS).sum()
Expand Down
221 changes: 103 additions & 118 deletions Python/dynamic/TPI.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Python/dynamic/TPI_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Creates graphs for TPI values.
This py-file calls the following other file(s):
firm.py
SSinit/ss_init_vars.pkl
TPIinit/TPIinit_vars.pkl
SS/ss_vars.pkl
Expand All @@ -26,7 +27,7 @@
from mpl_toolkits.mplot3d import Axes3D
import cPickle as pickle

import firm_funcs as firm
import firm

'''
------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions Python/dynamic/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
demographics of the population
This py-file calls the following other file(s):
utils.py
data\demographic\demographic_data.csv
data\demographic\mortality_rates.csv
Expand Down
2 changes: 1 addition & 1 deletion Python/dynamic/firm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
------------------------------------------------------------------------
Last updated 7/16/2015
Firm functions for taxes in SS and TPI.
Firm functions for firms in SS and TPI.
------------------------------------------------------------------------
'''
Expand Down
2 changes: 2 additions & 0 deletions Python/dynamic/income.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
percentiles, as it uses fitted polynomials to those percentiles.
For a more generic version, see income_nopoly.py.
This file calls the following files:
utils.py
This py-file creates the following other file(s):
(make sure that an OUTPUT folder exists)
Expand Down
1 change: 1 addition & 0 deletions Python/dynamic/wealth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This py-file calls the following other file(s):
data/wealth/scf2007to2013_wealth_age_all_percentiles.csv
utils.py
This py-file creates the following other file(s):
(make sure that an OUTPUT folder exists)
Expand Down

0 comments on commit cde004e

Please sign in to comment.