diff --git a/CHANGELOG.md b/CHANGELOG.md index 564fb8e2d..4f2c7e777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.13.1] - 2024-10-02 12:00:00 + +### Added + +- Three new parameters to adjust government spending amounts in the case of `baseline_spending=True`: + - `alpha_bs_G`: the proportional adjustment to the level of baseline spending on government consumption (time varying, default value is 1.0 for each model period) + - `alpha_bs_T`: the proportional adjustment to the level of baseline spending on non-pension transfers (time varying, default value is 1.0 for each model period) + - `alpha_bs_I`: the proportional adjustment to the level of baseline spending on infrastructure investment (time varying, default value is 1.0 for each model period) + ## [0.13.0] - 2024-09-26 12:00:00 ### Added @@ -333,6 +342,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Version [0.7.0] on August 30, 2021 was the first time that the OG-USA repository was detached from all of the core model logic, which was named OG-Core. Before this version, OG-USA was part of what is now the [`OG-Core`](https://github.com/PSLmodels/OG-Core) repository. In the next version of OG-USA, we adjusted the version numbering to begin with 0.1.0. This initial version of 0.7.0, was sequential from what OG-USA used to be when the OG-Core project was called OG-USA. - Any earlier versions of OG-USA can be found in the [`OG-Core`](https://github.com/PSLmodels/OG-Core) repository [release history](https://github.com/PSLmodels/OG-Core/releases) from [v.0.6.4](https://github.com/PSLmodels/OG-Core/releases/tag/v0.6.4) (Jul. 20, 2021) or earlier. +[0.13.1]: https://github.com/PSLmodels/OG-Core/compare/v0.13.0...v0.13.1 +[0.13.0]: https://github.com/PSLmodels/OG-Core/compare/v0.12.0...v0.13.0 [0.12.0]: https://github.com/PSLmodels/OG-Core/compare/v0.11.17...v0.12.0 [0.11.17]: https://github.com/PSLmodels/OG-Core/compare/v0.11.16...v0.11.17 [0.11.16]: https://github.com/PSLmodels/OG-Core/compare/v0.11.15...v0.11.16 diff --git a/docs/book/content/intro/parameters.md b/docs/book/content/intro/parameters.md index b3c6a35f9..a9b60ad1f 100644 --- a/docs/book/content/intro/parameters.md +++ b/docs/book/content/intro/parameters.md @@ -12,828 +12,878 @@ organization of the theory in the `OG-Core` documentation. ### Behavioral Assumptions -#### `frisch` -_Description:_ Frisch elasticity of labor supply. -_Notes:_ See Altonji (JPE, 1986) and Peterman (Econ Inquiry, 2016) for estimates of the Frisch elasticity. -_Value Type:_ float -_Valid Range:_ min = 0.2 and max = 0.62 -_Out-of-Range Action:_ error +#### `frisch` +_Description:_ Frisch elasticity of labor supply. +_Notes:_ See Altonji (JPE, 1986) and Peterman (Econ Inquiry, 2016) for estimates of the Frisch elasticity. +_Value Type:_ float +_Valid Range:_ min = 0.2 and max = 0.62 +_Out-of-Range Action:_ error -#### `beta_annual` -_Description:_ Annual rate of time preference for households. -_Notes:_ Default value from Carroll (JME, 2009). Allows for each type to have a different value. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.9999 -_Out-of-Range Action:_ error +#### `beta_annual` +_Description:_ Annual rate of time preference for households. +_Notes:_ Default value from Carroll (JME, 2009). Allows for each type to have a different value. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.9999 +_Out-of-Range Action:_ error -#### `sigma` -_Description:_ Coefficient of relative risk aversion in household utility function. -_Notes:_ Default value from Attanasio, Banks, Meghir and Weber (JEBS, 1999). -_Value Type:_ float -_Valid Range:_ min = 1.0 and max = 2.0 -_Out-of-Range Action:_ error +#### `sigma` +_Description:_ Coefficient of relative risk aversion in household utility function. +_Notes:_ Default value from Attanasio, Banks, Meghir and Weber (JEBS, 1999). +_Value Type:_ float +_Valid Range:_ min = 1.0 and max = 2.0 +_Out-of-Range Action:_ error -#### `alpha_c` -_Description:_ Share parameters for each good in the composite consumption good. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `alpha_c` +_Description:_ Share parameters for each good in the composite consumption good. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `chi_b` -_Description:_ Household utility weight on bequests. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 10000.0 -_Out-of-Range Action:_ error +#### `chi_b` +_Description:_ Household utility weight on bequests. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 10000.0 +_Out-of-Range Action:_ error -#### `chi_n` -_Description:_ Household utility weight on on disutility of labor supply. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 10000.0 -_Out-of-Range Action:_ error +#### `chi_n` +_Description:_ Household utility weight on on disutility of labor supply. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 10000.0 +_Out-of-Range Action:_ error ### Endowments -#### `e` -_Description:_ Effective labor hours matrix. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 9e+99 -_Out-of-Range Action:_ error +#### `e` +_Description:_ Effective labor hours matrix. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9e+99 +_Out-of-Range Action:_ error -#### `ltilde` -_Description:_ Total time endowment of household. -_Notes:_ Can be normalized to 1.0 without loss of generality. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 5.0 -_Out-of-Range Action:_ error +#### `ltilde` +_Description:_ Total time endowment of household. +_Notes:_ Can be normalized to 1.0 without loss of generality. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 5.0 +_Out-of-Range Action:_ error -#### `zeta` -_Description:_ Matrix that describes the bequest distribution process. -_Notes:_ This SxJ matrix gives the fraction of total aggregate bequests going to each age s and ability type j. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `alpha_RM_1` +_Description:_ Exogenous ratio of aggregate remittances to GDP in current period (t=1). +_Value Type:_ float +_Valid Range:_ min = -0.05 and max = 0.4 +_Out-of-Range Action:_ error -#### `use_zeta` -_Description:_ Indicator variable for whether or not to use the zeta matrix to distribute bequests. -_Value Type:_ bool +#### `alpha_RM_T` +_Description:_ Exogenous ratio of aggregate remittances to GDP in the long run/steady state (t>T). +_Value Type:_ float +_Valid Range:_ min = -0.05 and max = 0.4 +_Out-of-Range Action:_ error + + +#### `g_RM` +_Description:_ Growth rate of aggregate remittances between periods tG1 and tG2 +_Value Type:_ float +_Valid Range:_ min = -0.02 and max = 0.15 +_Out-of-Range Action:_ error + + +#### `eta_RM` +_Description:_ Matrix that allocates aggregate remittances across households. +_Notes:_ This SxJ matrix gives the fraction of total aggregate remittances going to each age s and ability type j. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error + + +#### `zeta` +_Description:_ Matrix that describes the bequest distribution process. +_Notes:_ This SxJ matrix gives the fraction of total aggregate bequests going to each age s and ability type j. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error + + +#### `use_zeta` +_Description:_ Indicator variable for whether or not to use the zeta matrix to distribute bequests. +_Value Type:_ bool ### Model Dimensions -#### `S` -_Description:_ Maximum number of periods of economic life of model agent. -_Value Type:_ int -_Valid Range:_ min = 3 and max = 80 -_Out-of-Range Action:_ error +#### `S` +_Description:_ Maximum number of periods of economic life of model agent. +_Value Type:_ int +_Valid Range:_ min = 3 and max = 80 +_Out-of-Range Action:_ error -#### `J` -_Description:_ Number of different labor productivity types of agents. -_Value Type:_ int -_Valid Range:_ min = 1 and max = 100 -_Out-of-Range Action:_ error +#### `J` +_Description:_ Number of different labor productivity types of agents. +_Value Type:_ int +_Valid Range:_ min = 1 and max = 100 +_Out-of-Range Action:_ error -#### `T` -_Description:_ Number of periods until it is assumed that the model reaches its steady state. -_Value Type:_ int -_Valid Range:_ min = 3 and max = 1000 -_Out-of-Range Action:_ error +#### `T` +_Description:_ Number of periods until it is assumed that the model reaches its steady state. +_Value Type:_ int +_Valid Range:_ min = 3 and max = 1000 +_Out-of-Range Action:_ error -#### `I` -_Description:_ Number of different consumption goods. -_Value Type:_ int -_Valid Range:_ min = 1 and max = 50 -_Out-of-Range Action:_ error +#### `I` +_Description:_ Number of different consumption goods. +_Value Type:_ int +_Valid Range:_ min = 1 and max = 50 +_Out-of-Range Action:_ error -#### `lambdas` -_Description:_ Fraction of population of each labor productivity type. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `lambdas` +_Description:_ Fraction of population of each labor productivity type. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `starting_age` -_Description:_ Age at which households become economically active. -_Value Type:_ int -_Valid Range:_ min = 0 and max = ending_age -_Out-of-Range Action:_ error +#### `starting_age` +_Description:_ Age at which households become economically active. +_Value Type:_ int +_Valid Range:_ min = 0 and max = ending_age +_Out-of-Range Action:_ error -#### `ending_age` -_Description:_ Maximum age a household can live until. -_Value Type:_ int -_Valid Range:_ min = starting_age and max = 120 -_Out-of-Range Action:_ error +#### `ending_age` +_Description:_ Maximum age a household can live until. +_Value Type:_ int +_Valid Range:_ min = starting_age and max = 120 +_Out-of-Range Action:_ error ## Firm Parameters ### Capital Accumulation -#### `delta_annual` -_Description:_ Annual rate of economic depreciation of capital. -_Notes:_ Approximately the value from Kehoe calibration exercise: http://www.econ.umn.edu/~tkehoe/classes/calibration-04.pdf. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `delta_annual` +_Description:_ Annual rate of economic depreciation of capital. +_Notes:_ Approximately the value from Kehoe calibration exercise: http://www.econ.umn.edu/~tkehoe/classes/calibration-04.pdf. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error ### Model Dimensions -#### `M` -_Description:_ Number of different production industries. -_Value Type:_ int -_Valid Range:_ min = 1 and max = 50 -_Out-of-Range Action:_ error +#### `M` +_Description:_ Number of different production industries. +_Value Type:_ int +_Valid Range:_ min = 1 and max = 50 +_Out-of-Range Action:_ error ### Production Function -#### `gamma` -_Description:_ Capital's share of output in firm production function. -_Notes:_ Historical value in U.S. is about 0.33, but Elsby, Hobijn, and Sahin (BPEA, 2013) find capital's share is increasing, so default value is above this. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `gamma` +_Description:_ Capital's share of output in firm production function. +_Notes:_ Historical value in U.S. is about 0.33, but Elsby, Hobijn, and Sahin (BPEA, 2013) find capital's share is increasing, so default value is above this. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `gamma_g` -_Description:_ Public capital's share of output in firm production function. -_Value Type:_ float +#### `gamma_g` +_Description:_ Public capital's share of output in firm production function. +_Value Type:_ float -#### `epsilon` -_Description:_ Elasticity of substitution among private capital, public capital, and labor in firm production function. -_Notes:_ If epsilon=1, then production function is Cobb-Douglas. If epsilon=0, then production function is perfect substitutes. -_Value Type:_ float -_Valid Range:_ min = 0.2 and max = 10.0 -_Out-of-Range Action:_ error +#### `epsilon` +_Description:_ Elasticity of substitution among private capital, public capital, and labor in firm production function. +_Notes:_ If epsilon=1, then production function is Cobb-Douglas. If epsilon=0, then production function is perfect substitutes. +_Value Type:_ float +_Valid Range:_ min = 0.2 and max = 10.0 +_Out-of-Range Action:_ error -#### `io_matrix` -_Description:_ Input-output matrix used to map production outputs into consumption goods using a fixed coefficient model. This matrix has dimensions I x M, where I is the number of distinct consumption goods and M is the number of distinct production goods. The sum each row of this matrix must be 1. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `io_matrix` +_Description:_ Input-output matrix used to map production outputs into consumption goods using a fixed coefficient model. This matrix has dimensions I x M, where I is the number of distinct consumption goods and M is the number of distinct production goods. The sum each row of this matrix must be 1. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `Z` -_Description:_ Total factor productivity in firm production function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 5.0 -_Out-of-Range Action:_ error +#### `Z` +_Description:_ Total factor productivity in firm production function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 5.0 +_Out-of-Range Action:_ error ## Government Parameters -#### `delta_g_annual` -_Description:_ Annual rate of economic depreciation of public capital. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `delta_g_annual` +_Description:_ Annual rate of economic depreciation of public capital. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error ## Fiscal Policy Parameters ### Fiscal Closure Rules -#### `tG1` -_Description:_ Number of model periods until budget closure rule kicks in. -_Notes:_ It may make sense for this tG1 to exceed the length of the budget window one is looking at. But it must also not be too late into the time path that a steady-state won't be reached by time T. -_Value Type:_ int -_Valid Range:_ min = 0 and max = tG2 -_Out-of-Range Action:_ error +#### `tG1` +_Description:_ Number of model periods until budget closure rule kicks in. +_Notes:_ It may make sense for this tG1 to exceed the length of the budget window one is looking at. But it must also not be too late into the time path that a steady-state won't be reached by time T. +_Value Type:_ int +_Valid Range:_ min = 0 and max = tG2 +_Out-of-Range Action:_ error -#### `tG2` -_Description:_ Number of model periods until budget closure ends and budgetary variables jump to steady-state values. -_Notes:_ The number of periods until the closure rule ends must not exceed T, the time at which the model is assumed to reach the steady-state. -_Value Type:_ int -_Valid Range:_ min = tG1 and max = T -_Out-of-Range Action:_ error +#### `tG2` +_Description:_ Number of model periods until budget closure ends and budgetary variables jump to steady-state values. +_Notes:_ The number of periods until the closure rule ends must not exceed T, the time at which the model is assumed to reach the steady-state. +_Value Type:_ int +_Valid Range:_ min = tG1 and max = T +_Out-of-Range Action:_ error -#### `rho_G` -_Description:_ Speed of convergence to a stable government budget deficit for periods [tG1, tG2-1]. -_Notes:_ Lower rho_G => slower convergence. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 0.9 -_Out-of-Range Action:_ error +#### `rho_G` +_Description:_ Speed of convergence to a stable government budget deficit for periods [tG1, tG2-1]. +_Notes:_ Lower rho_G => slower convergence. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 0.9 +_Out-of-Range Action:_ error -#### `debt_ratio_ss` -_Description:_ Debt to GDP ratio to be achieved in the steady state. -_Notes:_ Note that depending upon the tax policy parameters, some debt to GDP ratios may not be achievable with positive government spending. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 5.0 -_Out-of-Range Action:_ error +#### `debt_ratio_ss` +_Description:_ Debt to GDP ratio to be achieved in the steady state. +_Notes:_ Note that depending upon the tax policy parameters, some debt to GDP ratios may not be achievable with positive government spending. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 5.0 +_Out-of-Range Action:_ error ### Government Pension Parameters -#### `retirement_age` -_Description:_ Age at which agents can collect Social Security benefits. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ int -_Valid Range:_ min = 0 and max = 100 -_Out-of-Range Action:_ error +#### `retirement_age` +_Description:_ Age at which agents can collect Social Security benefits. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ int +_Valid Range:_ min = 0 and max = 100 +_Out-of-Range Action:_ error -#### `pension_system` -_Description:_ Pension system. -_Value Type:_ str -_Valid Choices:_['US-Style Social Security', 'Defined Benefits', 'Notional Defined Contribution', 'Points System'] +#### `pension_system` +_Description:_ Pension system. +_Value Type:_ str +_Valid Choices:_['US-Style Social Security', 'Defined Benefits', 'Notional Defined Contribution', 'Points System'] -#### `tau_p` -_Description:_ Pension system contribution tax rate under a notional defined contribution system. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `tau_p` +_Description:_ Pension system contribution tax rate under a notional defined contribution system. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `indR` -_Description:_ Adjustment for survivor benefits under a notional defined contribution system. -_Notes:_ indR = 0.0 for no survivor benefits, indR = 0.5 for survivor benefits -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `indR` +_Description:_ Adjustment for survivor benefits under a notional defined contribution system. +_Notes:_ indR = 0.0 for no survivor benefits, indR = 0.5 for survivor benefits +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `k_ret` -_Description:_ Adjustment for frequency of pension payments under a notional defined contribution system. -_Notes:_ k = 0.5 - (6/13n), where n is the number of payments per year -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `k_ret` +_Description:_ Adjustment for frequency of pension payments under a notional defined contribution system. +_Notes:_ k = 0.5 - (6/13n), where n is the number of payments per year +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `alpha_db` -_Description:_ Replacement rate under a defined contribution system. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `alpha_db` +_Description:_ Replacement rate under a defined contribution system. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `vpoint` -_Description:_ The value of a point under a points system pension. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `vpoint` +_Description:_ The value of a point under a points system pension. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `yr_contrib` -_Description:_ Number of years of contributions made to defined benefits pension system. -_Notes:_ Since there is not exit from the labor force in the model, the number of years of contributions is set exogenously. -_Value Type:_ int -_Valid Range:_ min = 0 and max = retirement_age -_Out-of-Range Action:_ error +#### `yr_contrib` +_Description:_ Number of years of contributions made to defined benefits pension system. +_Notes:_ Since there is not exit from the labor force in the model, the number of years of contributions is set exogenously. +_Value Type:_ int +_Valid Range:_ min = 0 and max = retirement_age +_Out-of-Range Action:_ error -#### `avg_earn_num_years` -_Description:_ Number of years used to compute average earnings for pension benefits. -_Notes:_ US-styel Social Security AIME is computed using average earnings from the highest earnings years for the number of years specified here. -_Value Type:_ int -_Valid Range:_ min = 1 and max = retirement_age -_Out-of-Range Action:_ error +#### `avg_earn_num_years` +_Description:_ Number of years used to compute average earnings for pension benefits. +_Notes:_ US-styel Social Security AIME is computed using average earnings from the highest earnings years for the number of years specified here. +_Value Type:_ int +_Valid Range:_ min = 1 and max = retirement_age +_Out-of-Range Action:_ error -#### `AIME_bkt_1` -_Description:_ Upper bound to the first average index monthly earnings (AIME) bracket. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 9999999999.0 -_Out-of-Range Action:_ error +#### `AIME_bkt_1` +_Description:_ Upper bound to the first average index monthly earnings (AIME) bracket. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9999999999.0 +_Out-of-Range Action:_ error -#### `AIME_bkt_2` -_Description:_ Upper bound to the second average index monthly earnings (AIME) bracket. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 9999999999999.9 -_Out-of-Range Action:_ error +#### `AIME_bkt_2` +_Description:_ Upper bound to the second average index monthly earnings (AIME) bracket. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9999999999999.9 +_Out-of-Range Action:_ error -#### `PIA_rate_bkt_1` -_Description:_ The rate used to determine the primary insurance amount (PIA) in the first bracket for average index monthly earnings (AIME). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `PIA_rate_bkt_1` +_Description:_ The rate used to determine the primary insurance amount (PIA) in the first bracket for average index monthly earnings (AIME). +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `PIA_rate_bkt_2` -_Description:_ The rate used to determine the primary insurance amount (PIA) in the second bracket for average index monthly earnings (AIME). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `PIA_rate_bkt_2` +_Description:_ The rate used to determine the primary insurance amount (PIA) in the second bracket for average index monthly earnings (AIME). +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `PIA_rate_bkt_3` -_Description:_ The rate used to determine the primary insurance amount (PIA) in the third bracket for average index monthly earnings (AIME). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `PIA_rate_bkt_3` +_Description:_ The rate used to determine the primary insurance amount (PIA) in the third bracket for average index monthly earnings (AIME). +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `PIA_maxpayment` -_Description:_ The maximum primary insurance amount (PIA) payment. -_Value Type:_ float -_Valid Range:_ min = PIA_minpayment and max = 9999999999999.9 -_Out-of-Range Action:_ error +#### `PIA_maxpayment` +_Description:_ The maximum primary insurance amount (PIA) payment. +_Value Type:_ float +_Valid Range:_ min = PIA_minpayment and max = 9999999999999.9 +_Out-of-Range Action:_ error -#### `PIA_minpayment` -_Description:_ The minimum primary insurance amount (PIA) payment. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = PIA_maxpayment -_Out-of-Range Action:_ error +#### `PIA_minpayment` +_Description:_ The minimum primary insurance amount (PIA) payment. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = PIA_maxpayment +_Out-of-Range Action:_ error -#### `replacement_rate_adjust` -_Description:_ Adjustment to the Social Security retirement benefits replacement rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ This parameter willy only vary along the time path. It is assumed to be one in the steady state. The steady state retirement rate can be adjusted by changing the parameters of the retirement benefits function. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 10.0 -_Out-of-Range Action:_ error +#### `replacement_rate_adjust` +_Description:_ Adjustment to the Social Security retirement benefits replacement rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ This parameter willy only vary along the time path. It is assumed to be one in the steady state. The steady state retirement rate can be adjusted by changing the parameters of the retirement benefits function. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 10.0 +_Out-of-Range Action:_ error ### Spending -#### `alpha_T` -_Description:_ Exogenous ratio of government transfers to GDP when budget balance is false. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.3 -_Out-of-Range Action:_ error +#### `alpha_T` +_Description:_ Exogenous ratio of government transfers to GDP when budget balance is false. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.3 +_Out-of-Range Action:_ error + + +#### `alpha_G` +_Description:_ Exogenous ratio of government spending to GDP when budget balance is false. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.3 +_Out-of-Range Action:_ error + + +#### `alpha_I` +_Description:_ Exogenous fraction of GDP that goes towards government investment in infrastructure (public capital) when balanced budget is false. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.3 +_Out-of-Range Action:_ error + + +#### `alpha_bs_T` +_Description:_ Proportional adjustment to government transfers relative to baseline amount when budget balance is true. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9.9999e+103 +_Out-of-Range Action:_ error -#### `alpha_G` -_Description:_ Exogenous ratio of government spending to GDP when budget balance is false. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.3 -_Out-of-Range Action:_ error +#### `alpha_bs_G` +_Description:_ Proportional adjustment to government consumption expenditures relative to baseline amount when budget balance is true. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9.9999e+103 +_Out-of-Range Action:_ error -#### `alpha_I` -_Description:_ -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.3 -_Out-of-Range Action:_ error +#### `alpha_bs_I` +_Description:_ Proportional adjustment to infrastructure (public capital) spending relative to baseline amount when balanced budget is true. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9.9999e+103 +_Out-of-Range Action:_ error -#### `ubi_growthadj` -_Description:_ Boolean indicator variable for whether or not to growth adjust universal basic income transfer. -_Notes:_ When this Boolean = True, the ubi_{j,s,t} matrix is stationary because it is multiplied by e^{g_y t} in the nonstationary household budget constraint. When this Boolean = False, the ubi_{j,s,t} is not multiplied by e^{g_y t} and the steady-state value is a matrix of zeros. -_Value Type:_ bool +#### `ubi_growthadj` +_Description:_ Boolean indicator variable for whether or not to growth adjust universal basic income transfer. +_Notes:_ When this Boolean = True, the ubi_{j,s,t} matrix is stationary because it is multiplied by e^{g_y t} in the nonstationary household budget constraint. When this Boolean = False, the ubi_{j,s,t} is not multiplied by e^{g_y t} and the steady-state value is a matrix of zeros. +_Value Type:_ bool -#### `ubi_nom_017` -_Description:_ Dollar (nominal) amount of universal basic income (UBI) per child age 0 through 17. -_Notes:_ The universal basic income (UBI) per child ages 0 through 17 can range from $0 per year to $7,200 per year (max $600 per month). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 7200.0 -_Out-of-Range Action:_ error +#### `ubi_nom_017` +_Description:_ Dollar (nominal) amount of universal basic income (UBI) per child age 0 through 17. +_Notes:_ The universal basic income (UBI) per child ages 0 through 17 can take positive or negative values (e.g., a negative value may be used to implement a head tax). +_Value Type:_ float +_Valid Range:_ min = -99000000000.0 and max = 99000000000.0 +_Out-of-Range Action:_ error -#### `ubi_nom_1864` -_Description:_ Dollar (nominal) amount of universal basic income (UBI) per adult age 18 to 64. -_Notes:_ The universal basic income (UBI) per adult age 18 through 64 can range from $0 per year to $18,000 per year ($1,500 per month). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 18000.0 -_Out-of-Range Action:_ error +#### `ubi_nom_1864` +_Description:_ Dollar (nominal) amount of universal basic income (UBI) per adult age 18 to 64. +_Notes:_ The universal basic income (UBI) per adult age 18 through 64 can take positive or negative values (e.g., a negative value may be used to implement a head tax). +_Value Type:_ float +_Valid Range:_ min = -99000000000.0 and max = 99000000000.0 +_Out-of-Range Action:_ error -#### `ubi_nom_65p` -_Description:_ Dollar (nominal) amount of universal basic income (UBI) per adult age 65 and over. -_Notes:_ The universal basic income (UBI) per adult age 65 and over can range from $0 per year to $12,000 per year ($1,000 per month). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 12000.0 -_Out-of-Range Action:_ error +#### `ubi_nom_65p` +_Description:_ Dollar (nominal) amount of universal basic income (UBI) per adult age 65 and over. +_Notes:_ The universal basic income (UBI) per adult age 65 can take positive or negative values (e.g., a negative value may be used to implement a head tax). +_Value Type:_ float +_Valid Range:_ min = -99000000000.0 and max = 99000000000.0 +_Out-of-Range Action:_ error -#### `ubi_nom_max` -_Description:_ Maximum dollar (nominal) amount of universal basic income (UBI) per household when all UBI allowances are added up. -_Notes:_ The maximum dollar (nominal) amount of universal basic income (UBI) per household can range from $0 per year to $40,000 per year ($3,333 per month). -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 40000.0 -_Out-of-Range Action:_ error +#### `ubi_nom_max` +_Description:_ Maximum dollar (nominal) amount of universal basic income (UBI) per household when all UBI allowances are added up. +_Notes:_ The maximum dollar (nominal) amount of universal basic income (UBI) per household can range from $0 per year to $40,000 per year ($3,333 per month). +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 40000.0 +_Out-of-Range Action:_ error -#### `eta` -_Description:_ Matrix that allocated government transfers across households. -_Notes:_ This SxJ matrix gives the fraction of total aggregate transfers going to each age s and ability type j. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `eta` +_Description:_ Matrix that allocated government transfers across households. +_Notes:_ This SxJ matrix gives the fraction of total aggregate transfers going to each age s and ability type j. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `budget_balance` -_Description:_ Flag to balance government budget in each period. -_Value Type:_ bool +#### `budget_balance` +_Description:_ Flag to balance government budget in each period. +_Value Type:_ bool -#### `baseline_spending` -_Description:_ Flag for use in reform simulations to keep level of government spending and transfers constant between baseline and reform runs. -_Value Type:_ bool +#### `baseline_spending` +_Description:_ Flag for use in reform simulations to keep level of government spending and transfers constant between baseline and reform runs. +_Value Type:_ bool ### Taxes -#### `cit_rate` -_Description:_ Corporate income tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ This is the top marginal corporate income tax rate. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.99 -_Out-of-Range Action:_ error +#### `cit_rate` +_Description:_ Corporate income tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ This is the top marginal corporate income tax rate. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.99 +_Out-of-Range Action:_ error -#### `c_corp_share_of_assets` -_Description:_ Share of total business assets held in C corporations -_Notes:_ This affects the effective corporate income tax rate on the representative firm in the model -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `c_corp_share_of_assets` +_Description:_ Share of total business assets held in C corporations +_Notes:_ This affects the effective corporate income tax rate on the representative firm in the model +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `adjustment_factor_for_cit_receipts` -_Description:_ Adjustment to the statutory CIT rate to match effective rate on corporations -_Notes:_ This adjustment is necessary to match corporate income tax receipts found in the data. It is computed as the ratio of the CIT/GDP from US data to CIT/GDP in the model (with this parameter =1) -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 2.0 -_Out-of-Range Action:_ error +#### `adjustment_factor_for_cit_receipts` +_Description:_ Adjustment to the statutory CIT rate to match effective rate on corporations +_Notes:_ This adjustment is necessary to match corporate income tax receipts found in the data. It is computed as the ratio of the CIT/GDP from US data to CIT/GDP in the model (with this parameter =1) +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 2.0 +_Out-of-Range Action:_ error -#### `inv_tax_credit` -_Description:_ Investment tax credit rate. This credit reduced the cost of new investment by the specified rate. -_Notes:_ This credit reduced the cost of new investment by the specified rate -_Value Type:_ float -_Valid Range:_ min = -1.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `inv_tax_credit` +_Description:_ Investment tax credit rate. This credit reduced the cost of new investment by the specified rate. +_Notes:_ This credit reduced the cost of new investment by the specified rate +_Value Type:_ float +_Valid Range:_ min = -1.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `tau_c` -_Description:_ Consumption tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ This policy parameter represents the effective consumption tax rate from sales taxes, VATs, and excise taxes by consumption good. Tax rates cab vary over time. It is thus a TxI array. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 5.0 -_Out-of-Range Action:_ error +#### `tau_c` +_Description:_ Consumption tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ This policy parameter represents the effective consumption tax rate from sales taxes, VATs, and excise taxes by consumption good. Tax rates cab vary over time. It is thus a TxI array. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 5.0 +_Out-of-Range Action:_ error -#### `delta_tau_annual` -_Description:_ Annual rate of depreciation of capital for tax purposes. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ Cost-of-Capital-Calculator can help to calibrate this parameter. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `delta_tau_annual` +_Description:_ Annual rate of depreciation of capital for tax purposes. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ Cost-of-Capital-Calculator can help to calibrate this parameter. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `h_wealth` -_Description:_ Numerator in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 10.0 -_Out-of-Range Action:_ error +#### `h_wealth` +_Description:_ Numerator in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 10.0 +_Out-of-Range Action:_ error -#### `m_wealth` -_Description:_ Term in denominator in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ Must be positive to avoid division by zero when computing ETR and MTR for wealth tax -_Value Type:_ float -_Valid Range:_ min = 1e-08 and max = 10.0 -_Out-of-Range Action:_ error +#### `m_wealth` +_Description:_ Term in denominator in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ Must be positive to avoid division by zero when computing ETR and MTR for wealth tax +_Value Type:_ float +_Valid Range:_ min = 1e-08 and max = 10.0 +_Out-of-Range Action:_ error -#### `p_wealth` -_Description:_ Scale parameter in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ Set to 0 to have no wealth tax. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 10.0 -_Out-of-Range Action:_ error +#### `p_wealth` +_Description:_ Scale parameter in wealth tax function. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ Set to 0 to have no wealth tax. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 10.0 +_Out-of-Range Action:_ error -#### `tau_bq` -_Description:_ Linear tax rate on bequests. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.99 -_Out-of-Range Action:_ error +#### `tau_bq` +_Description:_ Linear tax rate on bequests. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.99 +_Out-of-Range Action:_ error -#### `tau_payroll` -_Description:_ Linear payroll tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ Set to zero as default since tax functions include income and payroll taxes. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.99 -_Out-of-Range Action:_ error +#### `tau_payroll` +_Description:_ Linear payroll tax rate. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ Set to zero as default since tax functions include income and payroll taxes. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.99 +_Out-of-Range Action:_ error -#### `constant_rates` -_Description:_ Flag to use linear tax functions. -_Value Type:_ bool +#### `constant_rates` +_Description:_ Flag to use linear tax functions. +_Value Type:_ bool -#### `zero_taxes` -_Description:_ Flag to run model without any individual income taxes. -_Value Type:_ bool +#### `zero_taxes` +_Description:_ Flag to run model without any individual income taxes. +_Value Type:_ bool -#### `analytical_mtrs` -_Description:_ Flag to use analytically derived marginal tax rates in tax functions. -_Value Type:_ bool +#### `analytical_mtrs` +_Description:_ Flag to use analytically derived marginal tax rates in tax functions. +_Value Type:_ bool -#### `age_specific` -_Description:_ Flag to use analytically derived marginal tax rates in tax functions. -_Value Type:_ bool +#### `age_specific` +_Description:_ Flag to use analytically derived marginal tax rates in tax functions. +_Value Type:_ bool -#### `tax_func_type` -_Description:_ Functional form for individual income tax functions. -_Value Type:_ str -_Valid Choices:_['DEP', 'DEP_totalinc', 'GS', 'HSV', 'linear', 'mono', 'mono2D'] +#### `tax_func_type` +_Description:_ Functional form for individual income tax functions. +_Value Type:_ str +_Valid Choices:_['DEP', 'DEP_totalinc', 'GS', 'HSV', 'linear', 'mono', 'mono2D'] -#### `labor_income_tax_noncompliance_rate` -_Description:_ Labor income tax noncompliance rate, the ratio of taxes paid to taxes owed. -_Notes:_ Can be specified to vary by type J and over year T -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `labor_income_tax_noncompliance_rate` +_Description:_ Labor income tax noncompliance rate, the ratio of taxes paid to taxes owed. +_Notes:_ Can be specified to vary by type J and over year T +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `capital_income_tax_noncompliance_rate` -_Description:_ Capital income tax noncompliance rate, the ratio of taxes paid to taxes owed. -_Notes:_ Can be specified to vary by type J and over year T -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `capital_income_tax_noncompliance_rate` +_Description:_ Capital income tax noncompliance rate, the ratio of taxes paid to taxes owed. +_Notes:_ Can be specified to vary by type J and over year T +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `etr_params` -_Description:_ Effective tax rate function parameters. -_Value Type:_ float -_Valid Range:_ min = -100.0 and max = 10000.0 -_Out-of-Range Action:_ error +#### `etr_params` +_Description:_ Effective tax rate function parameters. +_Value Type:_ float +_Valid Range:_ min = -100.0 and max = 10000.0 +_Out-of-Range Action:_ error -#### `mtrx_params` -_Description:_ Marginal tax rate on labor income function parameters. -_Value Type:_ float -_Valid Range:_ min = -100.0 and max = 10000.0 -_Out-of-Range Action:_ error +#### `mtrx_params` +_Description:_ Marginal tax rate on labor income function parameters. +_Value Type:_ float +_Valid Range:_ min = -100.0 and max = 10000.0 +_Out-of-Range Action:_ error -#### `mtry_params` -_Description:_ Marginal tax rate on capital income function parameters. -_Value Type:_ float -_Valid Range:_ min = -100.0 and max = 20000.0 -_Out-of-Range Action:_ error +#### `mtry_params` +_Description:_ Marginal tax rate on capital income function parameters. +_Value Type:_ float +_Valid Range:_ min = -100.0 and max = 20000.0 +_Out-of-Range Action:_ error -#### `frac_tax_payroll` -_Description:_ Fraction of IIT+Payroll tax revenue that is attributable to payroll taxes. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `frac_tax_payroll` +_Description:_ Fraction of IIT+Payroll tax revenue that is attributable to payroll taxes. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `initial_debt_ratio` -_Description:_ Debt to GDP ratio in the initial period. -_Notes:_ Should be calibrated based on government debt held by the public to GDP in the model start year. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 2.0 -_Out-of-Range Action:_ error +#### `initial_debt_ratio` +_Description:_ Debt to GDP ratio in the initial period. +_Notes:_ Should be calibrated based on government debt held by the public to GDP in the model start year. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 2.0 +_Out-of-Range Action:_ error -#### `initial_Kg_ratio` -_Description:_ Government capital (aka infrastructure) to GDP ratio in the initial period. -_Notes:_ Should be calibrated based on the value of public infrastructure to GDP in the model start year. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 50.0 -_Out-of-Range Action:_ error +#### `initial_Kg_ratio` +_Description:_ Government capital (aka infrastructure) to GDP ratio in the initial period. +_Notes:_ Should be calibrated based on the value of public infrastructure to GDP in the model start year. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 50.0 +_Out-of-Range Action:_ error -#### `r_gov_scale` -_Description:_ Parameter to scale the market interest rate to find interest rate on government debt. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 4.0 -_Out-of-Range Action:_ error +#### `r_gov_scale` +_Description:_ Parameter to scale the market interest rate to find interest rate on government debt. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 4.0 +_Out-of-Range Action:_ error -#### `r_gov_shift` -_Description:_ Parameter to shift the market interest rate to find interest rate on government debt. -_Value Type:_ float -_Valid Range:_ min = -0.3 and max = 0.3 -_Out-of-Range Action:_ error +#### `r_gov_shift` +_Description:_ Parameter to shift the market interest rate to find interest rate on government debt. +_Value Type:_ float +_Valid Range:_ min = -0.3 and max = 0.3 +_Out-of-Range Action:_ error ## Open Economy Parameters -#### `world_int_rate_annual` -_Description:_ Exogenous annual world interest rate to be used when modeling a small open economy. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 0.08 -_Out-of-Range Action:_ error +#### `world_int_rate_annual` +_Description:_ Exogenous annual world interest rate to be used when modeling a small open economy. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 0.08 +_Out-of-Range Action:_ error -#### `initial_foreign_debt_ratio` -_Description:_ Share of government debt held by foreigners in model start year. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `initial_foreign_debt_ratio` +_Description:_ Share of government debt held by foreigners in model start year. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `zeta_D` -_Description:_ Share of new debt issues from government that are purchased by foreigners. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ This value is about 0.4 historically for the U.S., set to zero to have closed econ as default. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `zeta_D` +_Description:_ Share of new debt issues from government that are purchased by foreigners. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ This value is about 0.4 historically for the U.S., set to zero to have closed econ as default. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `zeta_K` -_Description:_ Share of excess demand for capital that is supplied by foreigners. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. -_Notes:_ Set to 0.1 when running large-open verion of US economy, but hard to find data to pin this down. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `zeta_K` +_Description:_ Share of excess demand for capital that is supplied by foreigners. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered. +_Notes:_ Set to 0.1 when running large-open verion of US economy, but hard to find data to pin this down. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error ## Economic Assumptions -#### `g_y_annual` -_Description:_ Growth rate of labor augmenting technological change. -_Value Type:_ float -_Valid Range:_ min = -0.01 and max = 0.04 -_Out-of-Range Action:_ error +#### `g_y_annual` +_Description:_ Growth rate of labor augmenting technological change. +_Value Type:_ float +_Valid Range:_ min = -0.01 and max = 0.08 +_Out-of-Range Action:_ error ## Demographic Parameters -#### `constant_demographics` -_Description:_ Use constant demographics. -_Notes:_ This boolean allows one to use empirical mortality rates, but keep the population distribution constant across periods. Note that immigration is shut off when this is true. -_Value Type:_ bool +#### `constant_demographics` +_Description:_ Use constant demographics. +_Notes:_ This boolean allows one to use empirical mortality rates, but keep the population distribution constant across periods. Note that immigration is shut off when this is true. +_Value Type:_ bool -#### `omega` -_Description:_ Population distribution (fraction at each age) over the time path. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `omega` +_Description:_ Population distribution (fraction at each age) over the time path. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `omega_SS` -_Description:_ Population distribution (fraction at each age) in the steady-state. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `omega_SS` +_Description:_ Population distribution (fraction at each age) in the steady-state. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `omega_S_preTP` -_Description:_ Population distribution (fraction at each age) in the period before the transition path begins. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `omega_S_preTP` +_Description:_ Population distribution (fraction at each age) in the period before the transition path begins. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `g_n` -_Description:_ Population growth rate over the time path. -_Value Type:_ float -_Valid Range:_ min = -1.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `g_n` +_Description:_ Population growth rate over the time path. +_Value Type:_ float +_Valid Range:_ min = -1.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `g_n_ss` -_Description:_ Population growth rate in the steady-state. -_Value Type:_ float -_Valid Range:_ min = -1.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `g_n_ss` +_Description:_ Population growth rate in the steady-state. +_Value Type:_ float +_Valid Range:_ min = -1.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `imm_rates` -_Description:_ Immigration rates over the time path. -_Value Type:_ float -_Valid Range:_ min = -1.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `imm_rates` +_Description:_ Immigration rates over the time path. +_Value Type:_ float +_Valid Range:_ min = -1.0 and max = 1.0 +_Out-of-Range Action:_ error -#### `rho` -_Description:_ Age-specific mortality rates. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 1.0 -_Out-of-Range Action:_ error +#### `rho` +_Description:_ Age-specific mortality rates. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 1.0 +_Out-of-Range Action:_ error ## Model Solution Parameters -#### `nu` -_Description:_ Parameter for convergence rate of functional iteration. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 0.5 -_Out-of-Range Action:_ error +#### `nu` +_Description:_ Parameter for convergence rate of functional iteration. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 0.5 +_Out-of-Range Action:_ error -#### `SS_root_method` -_Description:_ Root finding algorithm for outer loop of the SS solution. -_Notes:_ Uses scipy.optimize.root, please see scipy documentation for description of methods. Note that some methods may require more arguments than are in the function calls in SS.py and TPI.py and will therefore break without modifications of the source code. -_Value Type:_ str -_Valid Choices:_['hybr', 'lm', 'broyden1', 'broyden2', 'anderson', 'linearmixing', 'diagbroyden', 'excitingmixing', 'krylov', 'df-sane'] +#### `SS_root_method` +_Description:_ Root finding algorithm for outer loop of the SS solution. +_Notes:_ Uses scipy.optimize.root, please see scipy documentation for description of methods. Note that some methods may require more arguments than are in the function calls in SS.py and TPI.py and will therefore break without modifications of the source code. +_Value Type:_ str +_Valid Choices:_['hybr', 'lm', 'broyden1', 'broyden2', 'anderson', 'linearmixing', 'diagbroyden', 'excitingmixing', 'krylov', 'df-sane'] -#### `FOC_root_method` -_Description:_ Root finding algorithm for solving household first order conditions. -_Notes:_ Uses scipy.optimize.root, please see scipy documentation for description of methods. Note that some methods may require more arguments than are in the function calls in SS.py and TPI.py and will therefore break without modifications of the source code. -_Value Type:_ str -_Valid Choices:_['hybr', 'lm', 'broyden1', 'broyden2', 'anderson', 'linearmixing', 'diagbroyden', 'excitingmixing', 'krylov', 'df-sane'] +#### `FOC_root_method` +_Description:_ Root finding algorithm for solving household first order conditions. +_Notes:_ Uses scipy.optimize.root, please see scipy documentation for description of methods. Note that some methods may require more arguments than are in the function calls in SS.py and TPI.py and will therefore break without modifications of the source code. +_Value Type:_ str +_Valid Choices:_['hybr', 'lm', 'broyden1', 'broyden2', 'anderson', 'linearmixing', 'diagbroyden', 'excitingmixing', 'krylov', 'df-sane'] -#### `maxiter` -_Description:_ Max iterations for time path iteration. -_Value Type:_ int -_Valid Range:_ min = 2 and max = 500 -_Out-of-Range Action:_ error +#### `maxiter` +_Description:_ Max iterations for time path iteration. +_Value Type:_ int +_Valid Range:_ min = 2 and max = 500 +_Out-of-Range Action:_ error -#### `mindist_SS` -_Description:_ Tolerance for convergence of steady state solution. -_Value Type:_ float -_Valid Range:_ min = 1e-13 and max = 0.001 -_Out-of-Range Action:_ error +#### `mindist_SS` +_Description:_ Tolerance for convergence of steady state solution. +_Value Type:_ float +_Valid Range:_ min = 1e-13 and max = 0.001 +_Out-of-Range Action:_ error -#### `mindist_TPI` -_Description:_ Tolerance for convergence of time path solution. -_Value Type:_ float -_Valid Range:_ min = 1e-13 and max = 0.001 -_Out-of-Range Action:_ error +#### `mindist_TPI` +_Description:_ Tolerance for convergence of time path solution. +_Value Type:_ float +_Valid Range:_ min = 1e-13 and max = 0.001 +_Out-of-Range Action:_ error -#### `RC_SS` -_Description:_ Tolerance for the resource constraint in the steady state solution. -_Value Type:_ float -_Valid Range:_ min = 1e-13 and max = 0.001 -_Out-of-Range Action:_ error +#### `RC_SS` +_Description:_ Tolerance for the resource constraint in the steady state solution. +_Value Type:_ float +_Valid Range:_ min = 1e-13 and max = 0.001 +_Out-of-Range Action:_ error -#### `RC_TPI` -_Description:_ Tolerance for the resource constraint in the time path solution. -_Value Type:_ float -_Valid Range:_ min = 1e-13 and max = 0.01 -_Out-of-Range Action:_ error +#### `RC_TPI` +_Description:_ Tolerance for the resource constraint in the time path solution. +_Value Type:_ float +_Valid Range:_ min = 1e-13 and max = 0.01 +_Out-of-Range Action:_ error -#### `reform_use_baseline_solution` -_Description:_ Whether or not the baseline SS solution is used for starting values when solving the reform. -_Value Type:_ bool +#### `reform_use_baseline_solution` +_Description:_ Whether or not the baseline SS solution is used for starting values when solving the reform. +_Value Type:_ bool -#### `initial_guess_r_SS` -_Description:_ Initial guess of r for the SS solution. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 0.25 -_Out-of-Range Action:_ error +#### `initial_guess_r_SS` +_Description:_ Initial guess of r for the SS solution. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 0.25 +_Out-of-Range Action:_ error -#### `initial_guess_w_SS` -_Description:_ Initial guess of w for the SS solution. -_Value Type:_ float -_Valid Range:_ min = 0.01 and max = 5.15 -_Out-of-Range Action:_ error +#### `initial_guess_w_SS` +_Description:_ Initial guess of w for the SS solution. +_Value Type:_ float +_Valid Range:_ min = 0.01 and max = 5.15 +_Out-of-Range Action:_ error -#### `initial_guess_TR_SS` -_Description:_ Initial guess of TR for the SS solution. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 0.2 -_Out-of-Range Action:_ error +#### `initial_guess_TR_SS` +_Description:_ Initial guess of TR for the SS solution. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 0.2 +_Out-of-Range Action:_ error -#### `initial_guess_factor_SS` -_Description:_ Initial guess of factor for the SS solution. -_Value Type:_ float -_Valid Range:_ min = 1.0 and max = 500000 -_Out-of-Range Action:_ error +#### `initial_guess_factor_SS` +_Description:_ Initial guess of factor for the SS solution. +_Value Type:_ float +_Valid Range:_ min = 1.0 and max = 500000 +_Out-of-Range Action:_ error ## Other Parameters -#### `start_year` -_Description:_ Calendar year in which to start model analysis. -_Notes:_ Calendar year for initial model period -_Value Type:_ int -_Valid Range:_ min = 2013 and max = 2100 -_Out-of-Range Action:_ error +#### `start_year` +_Description:_ Calendar year in which to start model analysis. +_Notes:_ Calendar year for initial model period +_Value Type:_ int +_Valid Range:_ min = 2013 and max = 2100 +_Out-of-Range Action:_ error -#### `mean_income_data` -_Description:_ Mean income (in current dollars) from the microdata used for tax function estimation. -_Value Type:_ float -_Valid Range:_ min = 0.0 and max = 9.9e+100 -_Out-of-Range Action:_ error +#### `mean_income_data` +_Description:_ Mean income (in current dollars) from the microdata used for tax function estimation. +_Value Type:_ float +_Valid Range:_ min = 0.0 and max = 9.9e+100 +_Out-of-Range Action:_ error diff --git a/docs/book/content/theory/government.md b/docs/book/content/theory/government.md index 1659d504f..3f98774b5 100644 --- a/docs/book/content/theory/government.md +++ b/docs/book/content/theory/government.md @@ -564,6 +564,17 @@ Total pension spending is the sum of the pension payments to each household in t Put description of growth-adjusted specification here. +#### Spending in the `reform` simulation + +While aggregate spending on $G$, $TR$, and $I_g$ in the baseline simulation are set as fractions of GDP, in the `reform` simulation, these spending amounts can be set in two different ways. The method is controlled by the `baseline_spending` parameter. If `baseline_spending=False`, the behavior of these spending is analgous to that in the baseline simulation; they are set as fractions of GDP, in this case **GDP in the reform simulation**. Thus, with the default assumption of `baseline_spending` it's assumed that spending levels in these three categories are function of GDP in the reform. In this case, users will see that, even with the parameters $\alpha_G$, $\alpha_T$, and $\alpha_I$ are unchanged, the *level* of spending will change in the reform *if* GDP in the reform is different. + +With the assumption of `baseline_spending=True`, the level of spending in the reform is held to the level of spending in the baseline. If the user wishes to adjust the level of spending, relative to the baseline level, in the reform, then the parameters `alpha_bs_G`, `alpha_bs_T`, and `alpha_bs_I` can be used to proportionally increase or decrease the levels of spending on $G$, $TR$, and $I_g$ in the reform simulation, relative to the levels in the baseline simulation. Note that the `alpha_bs_*` parameters are time varying, so the proportional change in spending can be different across time. E.g., for government consumption expenditures, we'd have the reform amount of $G$ determined as: + + ```{math} + G^{reform}_t = \alpha^{BS}_{G,t}G^{baseline}_{t} + ``` + +Note that the budget closure rule (described in Section ref{`SecUnbalGBCcloseRule`}) still takes effect in the case of `baseline_spending=True`. What this means is that the relation described above holds until the period in which the closure rules takes effect. Once the closure rule begins, the path of $G$ (and/or $TR$, depending on the closure rule used) will adjust as determined by the rule to close the government budget in the long run. (SecUnbalGBCrev)= ## Government Tax Revenue diff --git a/ogcore/SS.py b/ogcore/SS.py index 6d147df84..794ddd028 100644 --- a/ogcore/SS.py +++ b/ogcore/SS.py @@ -225,7 +225,9 @@ def inner_loop(outer_loop_vars, p, client): scattered_p = client.scatter(p, broadcast=True) if client else p # unpack variables to pass to function - bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, factor = outer_loop_vars + bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, Ig_baseline, factor = ( + outer_loop_vars + ) p_m = np.array(p_m) # TODO: why is this a list otherwise? p_i = np.dot(p.io_matrix, p_m) @@ -333,7 +335,7 @@ def inner_loop(outer_loop_vars, p, client): D, D_d, D_f, new_borrowing, _, new_borrowing_f = fiscal.get_D_ss( r_gov, Y, p ) - I_g = fiscal.get_I_g(Y, p.alpha_I[-1]) + I_g = fiscal.get_I_g(Y, Ig_baseline, p, "SS") K_g = fiscal.get_K_g(0, I_g, p, "SS") # Find wage rate consistent with open economy interest rate @@ -372,7 +374,7 @@ def inner_loop(outer_loop_vars, p, client): Y_vec[-1] = firm.get_Y(K_vec[-1], K_g, L_vec[-1], p, "SS", -1) # Find GDP Y = (p_m * Y_vec).sum() - I_g = fiscal.get_I_g(Y, p.alpha_I[-1]) + I_g = fiscal.get_I_g(Y, Ig_baseline, p, "SS") K_g = fiscal.get_K_g(0, I_g, p, "SS") if p.zeta_K[-1] == 1.0: new_r = p.world_int_rate[-1] @@ -553,7 +555,20 @@ def inner_loop(outer_loop_vars, p, client): def SS_solver( - bmat, nmat, r_p, r, w, p_m, Y, BQ, TR, factor, p, client, fsolve_flag=False + bmat, + nmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + Ig_baseline, + factor, + p, + client, + fsolve_flag=False, ): """ Solves for the steady state distribution of capital, labor, as well @@ -586,18 +601,30 @@ def SS_solver( if fsolve_flag: # case where already solved via SS_fsolve maxiter_ss = 1 if p.baseline_spending: - TR_ss = TR + TR_baseline = p.alpha_bs_T[-1] * TR if not p.budget_balance and not p.baseline_spending: Y = TR / p.alpha_T[-1] while (dist > p.mindist_SS) and (iteration < maxiter_ss): # Solve for the steady state levels of b and n, given w, r, # Y, BQ, TR, and factor if p.baseline_spending: - TR = TR_ss + TR = p.alpha_bs_T[-1] * TR_baseline if not p.budget_balance and not p.baseline_spending: Y = TR / p.alpha_T[-1] - outer_loop_vars = (bmat, nmat, r_p, r, w, p_m, Y, BQ, TR, factor) + outer_loop_vars = ( + bmat, + nmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + Ig_baseline, + factor, + ) ( euler_errors, @@ -654,7 +681,7 @@ def SS_solver( ).max() else: if p.baseline_spending: - TR = TR_ss + TR = p.alpha_bs_T[-1] * TR_baseline else: TR = utils.convex_combo(new_TR, TR, nu_ss) dist = np.array( @@ -695,7 +722,7 @@ def SS_solver( RM_ss = new_RM TR_ss = new_TR Yss = new_Y - I_g_ss = fiscal.get_I_g(Yss, p.alpha_I[-1]) + I_g_ss = fiscal.get_I_g(Yss, Ig_baseline, p, "SS") K_g_ss = fiscal.get_K_g(0, I_g_ss, p, "SS") Lss = aggr.get_L(nssmat, p, "SS") Bss = aggr.get_B(bssmat_splus1, p, "SS", False) @@ -718,7 +745,7 @@ def SS_solver( Bss, K_demand_open_ss.sum(), D_d_ss, p.zeta_K[-1] ) # Yss = firm.get_Y(Kss, K_g_ss, Lss, p, 'SS') - I_g_ss = fiscal.get_I_g(Yss, p.alpha_I[-1]) + I_g_ss = fiscal.get_I_g(Yss, Ig_baseline, p, "SS") K_g_ss = fiscal.get_K_g(0, I_g_ss, p, "SS") MPKg_vec = np.zeros(p.M) for m in range(p.M): @@ -1057,7 +1084,7 @@ def SS_fsolve(guesses, *args): implied outer loop variables """ - (bssmat, nssmat, TR_ss, factor_ss, p, client) = args + (bssmat, nssmat, TR_ss, Ig_baseline, factor_ss, p, client) = args # Rename the inputs r_p = guesses[0] @@ -1078,7 +1105,19 @@ def SS_fsolve(guesses, *args): if not p.budget_balance and not p.baseline_spending: Y = TR / p.alpha_T[-1] - outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, factor) + outer_loop_vars = ( + bssmat, + nssmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + Ig_baseline, + factor, + ) # Solve for the steady state levels of b and n, given w, r, TR and # factor @@ -1236,7 +1275,15 @@ def run_SS(p, client=None): Yguess = TRguess / p.alpha_T[-1] factorguess = p.initial_guess_factor_SS BQguess = aggr.get_BQ(rguess, b_guess, None, p, "SS", False) - ss_params_baseline = (b_guess, n_guess, None, None, p, client) + ss_params_baseline = ( + b_guess, + n_guess, + None, + None, + None, + p, + client, + ) if p.use_zeta: BQguess = 0.12231465279007188 guesses = ( @@ -1285,6 +1332,7 @@ def run_SS(p, client=None): Yss, BQss, TR_ss, + None, factor_ss, p, client, @@ -1364,13 +1412,22 @@ def run_SS(p, client=None): if p.use_zeta: BQguess = 0.12231465279007188 if p.baseline_spending: - TR_ss = TRguess - ss_params_reform = (b_guess, n_guess, TR_ss, factor, p, client) + TR_baseline = TRguess + Ig_baseline = ss_solutions["I_g_ss"] + ss_params_reform = ( + b_guess, + n_guess, + TR_baseline, + Ig_baseline, + factor, + p, + client, + ) if p.use_zeta: guesses = ( [r_p_guess, rguess, wguess] + list(p_m_guess) - + [Yguess, BQguess, TR_ss] + + [Yguess, BQguess, TR_baseline] ) else: guesses = ( @@ -1378,7 +1435,7 @@ def run_SS(p, client=None): + list(p_m_guess) + [Yguess] + list(BQguess) - + [TR_ss] + + [TR_baseline] ) sol = opt.root( SS_fsolve, @@ -1393,8 +1450,17 @@ def run_SS(p, client=None): p_m_ss = sol.x[3 : 3 + p.M] Yss = sol.x[3 + p.M] BQss = sol.x[3 + p.M + 1 : -1] + TR_ss = sol.x[-1] else: - ss_params_reform = (b_guess, n_guess, None, factor, p, client) + ss_params_reform = ( + b_guess, + n_guess, + None, + None, + factor, + p, + client, + ) if p.use_zeta: guesses = ( [r_p_guess, rguess, wguess] @@ -1435,6 +1501,8 @@ def run_SS(p, client=None): # Return SS values of variables fsolve_flag = True # Return SS values of variables + if not p.baseline_spending: + Ig_baseline = None output = SS_solver( b_guess, n_guess, @@ -1445,6 +1513,7 @@ def run_SS(p, client=None): Yss, BQss, TR_ss, + Ig_baseline, factor, p, client, diff --git a/ogcore/TPI.py b/ogcore/TPI.py index 7607b1e0e..7d7eca7ca 100644 --- a/ogcore/TPI.py +++ b/ogcore/TPI.py @@ -623,16 +623,6 @@ def run_TPI(p, client=None): Y = np.zeros_like(K) Y[: p.T] = firm.get_Y(K[: p.T], K_g[: p.T], L[: p.T], p, "TPI") Y[p.T :] = ss_vars["Yss"] - I_g = np.ones_like(Y) * ss_vars["I_g_ss"] - if p.baseline_spending: - I_g[: p.T] = Ig_baseline[: p.T] - else: - I_g = fiscal.get_I_g(Y[: p.T], p.alpha_I[: p.T]) - if p.baseline: - K_g0 = p.initial_Kg_ratio * Y[0] - else: - K_g0 = Kg0_baseline - K_g = fiscal.get_K_g(K_g0, I_g, p, "TPI") # path for industry specific aggregates K_vec_init = np.ones((p.T + p.S, p.M)) * ss_vars["K_vec_ss"].reshape( 1, p.M @@ -697,20 +687,36 @@ def run_TPI(p, client=None): D = np.zeros(p.T + p.S) D_d = np.zeros(p.T + p.S) D_f = np.zeros(p.T + p.S) + I_g = fiscal.get_I_g(Y[: p.T], None, p, "TPI") else: if p.baseline_spending: + # Will set to TRbaseline here, but will be updated in TPI loop + # with call to fiscal.get_TR TR = np.concatenate( (TRbaseline[: p.T], np.ones(p.S) * ss_vars["TR_ss"]) ) + # Will set to Ig_baseline here, but will be updated in TPI loop + # with call to fiscal.get_I_g + I_g = np.concatenate( + (Ig_baseline[: p.T], np.ones(p.S) * ss_vars["I_g_ss"]) + ) + # Will set to Gbaseline here, but will be updated in TPI loop + # with call to fiscal.D_G_path, which also does closure rule G = np.concatenate( (Gbaseline[: p.T], np.ones(p.S) * ss_vars["Gss"]) ) else: TR = p.alpha_T * Y G = np.ones(p.T + p.S) * ss_vars["Gss"] + I_g = np.ones(p.T + p.S) * ss_vars["I_g_ss"] D = np.ones(p.T + p.S) * ss_vars["Dss"] D_d = D * ss_vars["D_d_ss"] / ss_vars["Dss"] D_f = D * ss_vars["D_f_ss"] / ss_vars["Dss"] + if p.baseline: + K_g0 = p.initial_Kg_ratio * Y[0] + else: + K_g0 = Kg0_baseline + K_g = fiscal.get_K_g(K_g0, I_g, p, "TPI") total_tax_revenue = np.ones(p.T + p.S) * ss_vars["total_tax_revenue"] # Compute other interest rates @@ -993,7 +999,7 @@ def run_TPI(p, client=None): B[: p.T], K_demand_open_vec.sum(-1), D_d[: p.T], p.zeta_K[: p.T] ) if not p.baseline_spending: - I_g = fiscal.get_I_g(Y[: p.T], p.alpha_I[: p.T]) + I_g = fiscal.get_I_g(Y[: p.T], None, p, "TPI") if p.baseline: K_g0 = p.initial_Kg_ratio * Y[0] K_g = fiscal.get_K_g(K_g0, I_g, p, "TPI") diff --git a/ogcore/__init__.py b/ogcore/__init__.py index 5c0a1d072..c360e7800 100644 --- a/ogcore/__init__.py +++ b/ogcore/__init__.py @@ -20,4 +20,4 @@ from ogcore.txfunc import * from ogcore.utils import * -__version__ = "0.13.0" +__version__ = "0.13.1" diff --git a/ogcore/default_parameters.json b/ogcore/default_parameters.json index 88fe4ea42..3056b506a 100644 --- a/ogcore/default_parameters.json +++ b/ogcore/default_parameters.json @@ -729,8 +729,8 @@ } }, "alpha_I": { - "title": "Exogenous fraction of GDP that goes towards government investment in infrastructure (public capital)", - "description": "Exogenous fraction of GDP that goes towards government investment in infrastructure (public capital)", + "title": "Exogenous fraction of GDP that goes towards government investment in infrastructure (public capital)when balanced budget is false", + "description": "Exogenous fraction of GDP that goes towards government investment in infrastructure (public capital) when balanced budget is false.", "section_1": "Fiscal Policy Parameters", "section_2": "Spending", "notes": "", @@ -739,7 +739,7 @@ "value": [ { "value": [ - 0.00 + 0.0 ] } ], @@ -750,6 +750,72 @@ } } }, + "alpha_bs_T": { + "title": "Proportional adjustment to government transfers relative to baseline amount when budget balance is true", + "description": "Proportional adjustment to government transfers relative to baseline amount when budget balance is true. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered.", + "section_1": "Fiscal Policy Parameters", + "section_2": "Spending", + "notes": "", + "type": "float", + "number_dims": 1, + "value": [ + { + "value": [ + 1.0 + ] + } + ], + "validators": { + "range": { + "min": 0.0, + "max": 99999e99 + } + } + }, + "alpha_bs_G": { + "title": "Proportional adjustment to government consumption expenditures relative to baseline amount when budget balance is true", + "description": "Proportional adjustment to government consumption expenditures relative to baseline amount when budget balance is true. Set value for base year, click '+' to add value for next year. All future years not specified are set to last value entered.", + "section_1": "Fiscal Policy Parameters", + "section_2": "Spending", + "notes": "", + "type": "float", + "number_dims": 1, + "value": [ + { + "value": [ + 1.0 + ] + } + ], + "validators": { + "range": { + "min": 0.0, + "max": 99999e99 + } + } + }, + "alpha_bs_I": { + "title": "Proportional adjustment to infrastructure (public capital) spending relative to baseline amount when balanced budget is true", + "description": "Proportional adjustment to infrastructure (public capital) spending relative to baseline amount when balanced budget is true.", + "section_1": "Fiscal Policy Parameters", + "section_2": "Spending", + "notes": "", + "type": "float", + "number_dims": 1, + "value": [ + { + "value": [ + 1.0 + ] + } + ], + "validators": { + "range": { + "min": 0.0, + "max": 99999e99 + } + } + }, "rho_G": { "title": "Speed of convergence to a stable government budget deficit for periods [tG1, tG2-1]", "description": "Speed of convergence to a stable government budget deficit for periods [tG1, tG2-1].", diff --git a/ogcore/fiscal.py b/ogcore/fiscal.py index 8483dcf87..f00beebab 100644 --- a/ogcore/fiscal.py +++ b/ogcore/fiscal.py @@ -78,7 +78,7 @@ def D_G_path(r_gov, dg_fixed_values, p): D[0] = D0_baseline if p.baseline_spending: - G = Gbaseline[: p.T] + G = p.alpha_bs_G[: p.T] * Gbaseline[: p.T] else: G = p.alpha_G[: p.T] * Y[: p.T] @@ -340,7 +340,7 @@ def get_TR( total_tax_revenue - agg_pension_outlays - G - UBI_outlays - I_g ) elif p.baseline_spending: - new_TR = TR + new_TR = p.alpha_bs_T[-1] * TR else: if method == "SS": new_TR = p.alpha_T[-1] * Y @@ -375,7 +375,7 @@ def get_r_gov(r, p, method): return r_gov -def get_I_g(Y, alpha_I): +def get_I_g(Y, Ig_baseline, p, method="SS"): r""" Find investment in public capital @@ -384,12 +384,24 @@ def get_I_g(Y, alpha_I): Args: Y (array_like): aggregate output - alpha_I (array_like): percentage of output invested in public capital + Ig_baseline (array_like): public infrastructure investment in + the baseliine simulation + p (OG-Core Specifications object): model parameters + method (str): either 'SS' for steady-state or 'TPI' for transition path Returns I_g (array_like): investment in public capital """ - I_g = alpha_I * Y + if p.baseline_spending: + if method == "SS": + I_g = p.alpha_bs_I[-1] * Ig_baseline + else: + I_g = p.alpha_bs_I[: p.T] * Ig_baseline + else: + if method == "SS": + I_g = p.alpha_I[-1] * Y + else: + I_g = p.alpha_I[: p.T] * Y return I_g diff --git a/ogcore/parameters.py b/ogcore/parameters.py index 35c96e688..b07472c8e 100644 --- a/ogcore/parameters.py +++ b/ogcore/parameters.py @@ -159,6 +159,9 @@ def compute_default_params(self): "alpha_G", "alpha_T", "alpha_I", + "alpha_bs_G", + "alpha_bs_T", + "alpha_bs_I", "world_int_rate_annual", "adjustment_factor_for_cit_receipts", "tau_bq", diff --git a/pyproject.toml b/pyproject.toml index ac83d1290..e033eb0ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,5 +11,5 @@ build-backend = "setuptools.build_meta" [tool.black] line-length = 79 -target-version = ["py310", "py311"] +target-version = ["py311", "py312"] include = '\.pyi?$' diff --git a/setup.py b/setup.py index de51a92f2..5744aa250 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="ogcore", - version="0.13.0", + version="0.13.1", author="Jason DeBacker and Richard W. Evans", license="CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", description="A general equilibrium overlapping generations model for fiscal policy analysis", diff --git a/tests/test_SS.py b/tests/test_SS.py index 211041b62..f08408548 100644 --- a/tests/test_SS.py +++ b/tests/test_SS.py @@ -36,7 +36,7 @@ def dask_client(): guesses1 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07, 0.051] ) -args1 = (bssmat, nssmat, None, None, p1, None) +args1 = (bssmat, nssmat, None, None, None, p1, None) expected1 = np.array( [ -0.03640424626041604, @@ -61,7 +61,7 @@ def dask_client(): guesses2 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07] ) -args2 = (bssmat, nssmat, None, 0.51, p2, None) +args2 = (bssmat, nssmat, None, None, 0.51, p2, None) expected2 = np.array( [ -0.0389819118896058, @@ -87,7 +87,7 @@ def dask_client(): guesses3 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07] ) -args3 = (bssmat, nssmat, 0.13, 0.51, p3, None) +args3 = (bssmat, nssmat, 0.13, 0.0, 0.51, p3, None) expected3 = np.array( [ -0.042611174492217574, @@ -110,7 +110,7 @@ def dask_client(): guesses4 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07, 0.051] ) -args4 = (bssmat, nssmat, None, None, p4, None) +args4 = (bssmat, nssmat, None, None, None, p4, None) expected4 = np.array( [ -0.04501723939772713, @@ -135,7 +135,7 @@ def dask_client(): guesses5 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07, 0.051] ) -args5 = (bssmat, nssmat, None, 0.51, p5, None) +args5 = (bssmat, nssmat, None, None, 0.51, p5, None) expected5 = np.array( [ -0.02690768327226259, @@ -162,7 +162,7 @@ def dask_client(): guesses6 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07, 0.051] ) -args6 = (bssmat, nssmat, None, None, p6, None) +args6 = (bssmat, nssmat, None, None, None, p6, None) expected6 = np.array( [ -0.051097905293268894, @@ -196,7 +196,7 @@ def dask_client(): guesses7 = np.array( [0.06, 1.1, 0.2, 0.016, 0.02, 0.02, 0.01, 0.01, 0.02, 0.003, -0.07, 0.051] ) -args7 = (bssmat, nssmat, None, None, p7, None) +args7 = (bssmat, nssmat, None, None, None, p7, None) expected7 = np.array( [ -0.06985935377445636, @@ -247,7 +247,7 @@ def test_SS_fsolve(tmpdir, guesses, args, expected): ensure that output returned matches what it has been before. """ # args = - (bssmat, nssmat, TR_ss, factor_ss, p, client) = args + (bssmat, nssmat, TR_ss, Ig_baseline, factor_ss, p, client) = args p.baseline_dir = tmpdir p.output_base = tmpdir @@ -297,7 +297,7 @@ def test_SS_fsolve(tmpdir, guesses, args, expected): filename4 = "SS_solver_outputs_baseline_small_open.pkl" -# Note that chaning the order in which these tests are run will cause +# Note that changing the order in which these tests are run will cause # failures for the baseline spending=True tests which depend on the # output of the baseline run just prior @pytest.mark.parametrize( @@ -336,6 +336,12 @@ def test_SS_solver(baseline, param_updates, filename, dask_client): Yguess = 0.6376591201150815 p_m_guess = np.ones(p.M) + # for new Ig_baseline arg + if p.baseline_spending: + Ig_baseline = 0.0 # tests only have zero infrastructure + else: + Ig_baseline = None + test_dict = SS.SS_solver( b_guess, n_guess, @@ -346,6 +352,7 @@ def test_SS_solver(baseline, param_updates, filename, dask_client): Yguess, BQguess, TRguess, + Ig_baseline, factorguess, p, dask_client, @@ -406,6 +413,10 @@ def test_SS_solver_extra(baseline, param_updates, filename, dask_client): else: rguess = 0.06483431412921253 r_p_guess = rguess + if p.baseline_spending: + Ig_baseline = 0.0 + else: + Ig_baseline = None wguess = firm.get_w_from_r(rguess, p, "SS") TRguess = 0.05738932081035772 factorguess = 139355.1547340256 @@ -423,6 +434,7 @@ def test_SS_solver_extra(baseline, param_updates, filename, dask_client): Yguess, BQguess, TRguess, + Ig_baseline, factorguess, p, dask_client, @@ -518,9 +530,37 @@ def test_inner_loop(baseline, r_p, param_updates, filename, dask_client): factor = 100000 BQ = np.ones(p.J) * 0.00019646295986015257 if p.budget_balance: - outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, factor) + outer_loop_vars = ( + bssmat, + nssmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + None, + factor, + ) else: - outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, factor) + if p.baseline_spending: + Ig_baseline = 0.0 + else: + Ig_baseline = None + outer_loop_vars = ( + bssmat, + nssmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + Ig_baseline, + factor, + ) test_tuple = SS.inner_loop(outer_loop_vars, p, dask_client) try: @@ -623,7 +663,23 @@ def test_inner_loop_extra(baseline, param_updates, filename, dask_client): BQ = np.ones(p.J) * 0.00019646295986015257 p_m = np.array([1.0]) r_p = 0.04260341179572245 - outer_loop_vars = (bssmat, nssmat, r_p, r, w, p_m, Y, BQ, TR, factor) + if p.baseline_spending: + Ig_baseline = 0.0 + else: + Ig_baseline = None + outer_loop_vars = ( + bssmat, + nssmat, + r_p, + r, + w, + p_m, + Y, + BQ, + TR, + Ig_baseline, + factor, + ) test_tuple = SS.inner_loop(outer_loop_vars, p, dask_client) expected_tuple = utils.safe_read_pickle( os.path.join(CUR_PATH, "test_io_data", filename) diff --git a/tests/test_fiscal.py b/tests/test_fiscal.py index 8e203250e..e3b54c91a 100644 --- a/tests/test_fiscal.py +++ b/tests/test_fiscal.py @@ -276,14 +276,37 @@ def test_get_r_gov(r, p, method, r_gov_expected): assert np.allclose(r_gov, r_gov_expected) -def test_get_I_g(): +@pytest.mark.parametrize( + "baseline_spending,Ig_baseline,method", + [ + (True, 3.5, "SS"), + (False, [3.5, 4.2], "TPI"), + (False, None, "SS"), + (False, None, "TPI"), + ], + ids=["baseline spend, SS", "baseline spend, TPI", "SS", "TPI"], +) +def test_get_I_g(baseline_spending, Ig_baseline, method): """ Test function to determine investment in public capital """ + p = Specifications() + p.baseline_spending = baseline_spending Y = np.array([0.2, 4.0]) - alpha_I = np.array([0.1, 0.5]) - expected = np.array([0.02, 2.0]) - test_val = fiscal.get_I_g(Y, alpha_I) + p.alpha_I = np.array([0.1, 0.5]) + p.alpha_bs_I = np.array([0.1, 1.0]) + if method == "SS": + test_val = fiscal.get_I_g(Y[-1], Ig_baseline, p, method) + if baseline_spending: + expected = np.array([3.5]) + else: + expected = np.array([2.0]) + else: + test_val = fiscal.get_I_g(Y, Ig_baseline, p, method) + if baseline_spending: + expected = np.array([0.35, 4.2]) + else: + expected = np.array([0.02, 2.0]) assert np.allclose(test_val, expected) diff --git a/tests/test_io_data/run_TPI_outputs_baseline_Kg_nonzero_2.pkl b/tests/test_io_data/run_TPI_outputs_baseline_Kg_nonzero_2.pkl index ddb4cf919..6dd8cae50 100644 Binary files a/tests/test_io_data/run_TPI_outputs_baseline_Kg_nonzero_2.pkl and b/tests/test_io_data/run_TPI_outputs_baseline_Kg_nonzero_2.pkl differ