Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/book/content/api/aggregates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ ogcore.aggregates
------------------------------------------

.. automodule:: ogcore.aggregates
:members: get_L, get_I, get_B, get_BQ, get_RM, get_C, revenue, get_r_p,
resource_constraint, get_K_splits, get_ptilde
:members: get_io_prices, get_L, get_I, get_B, get_BQ, get_RM, get_C,
revenue, get_r_p, resource_constraint, get_capital_outflows,
get_K_splits, get_ptilde
2 changes: 1 addition & 1 deletion docs/book/content/api/demographics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ogcore.demographics

.. automodule:: ogcore.demographics
:members: get_un_data, get_fert, get_mort, get_pop, pop_rebin, get_imm_rates,
immsolve, get_pop_objs, pre_pop_solve
immsolve, expand_pop_obj_J, get_pop_objs
6 changes: 3 additions & 3 deletions docs/book/content/api/firm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ ogcore.firm
------------------------------------------

.. automodule:: ogcore.firm
:members: get_Y, get_r, get_w, get_KLratio, get_MPx,
get_w_from_r, get_K, get_L_from_Y,
get_pm, solve_L, get_cost_of_capital
:members: get_Y, get_r, get_w, get_KLratio_KLonly, get_KLratio, get_MPx,
get_w_from_r, get_K_KLonly, get_L_from_Y, get_K, get_cost_of_capital,
get_pm, get_KY_ratio, solve_L, adj_cost
4 changes: 2 additions & 2 deletions docs/book/content/api/output_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
Output Table Functions
=================================================

**output_tabls.py modules*
**output_tables.py modules**

ogcore.output_tables
------------------------------------------

.. automodule:: ogcore.output_tables
:members: macro_table, macro_table_SS, ineq_table, gini_table,
wealth_moments_table, time_series_table,
dynamic_revenue_decomposition
dynamic_revenue_decomposition, model_fit_table
2 changes: 1 addition & 1 deletion docs/book/content/api/pensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ ogcore.pensions
NDC_amount, PS_amount, deriv_theta, deriv_NDC, deriv_DB, deriv_PS,
delta_point, g_ndc, g_dir, delta_ret, deriv_DB_loop, deriv_PS_loop,
deriv_NDC_loop, delta_ret_loop, PS_1dim_loop, PS_2dim_loop, DB_1dim_loop,
DB_2dim_loop, NDC_1dim_loop, NDC_2dim_loop
DB_2dim_loop, DB_3dim_loop, NDC_1dim_loop, NDC_2dim_loop
2 changes: 1 addition & 1 deletion docs/book/content/api/tax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ogcore.tax
.. automodule:: ogcore.tax
:members: ETR_wealth, MTR_wealth, ETR_income,
MTR_income, get_biz_tax, net_taxes, income_tax_liab,
wealth_tax_liab, bequest_tax_liab
wealth_tax_liab, bequest_tax_liab, cons_tax_liab
2 changes: 1 addition & 1 deletion docs/book/content/api/txfunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ ogcore.txfunc
.. automodule:: ogcore.txfunc
:members: get_tax_rates, wsumsq, find_outliers, replace_outliers,
txfunc_est, tax_data_sample, tax_func_loop, tax_func_estimate,
monotone_spline
avg_by_bin_multd, monotone_spline
5 changes: 3 additions & 2 deletions docs/book/content/api/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ ogcore.utils
pickle_file_compare, comp_array, comp_scalar, dict_compare,
to_timepath_shape, get_initial_path, safe_read_pickle, rate_conversion,
save_return_table, print_progress, fetch_files_from_web, not_connected,
avg_by_bin, extrapolate_arrays, get_legacy_session, shift_bio_clock,
unstationarize_vars, params_to_json
avg_by_bin, extrapolate_array, extrapolate_nested_list,
get_legacy_session, shift_bio_clock, unstationarize_vars,
params_to_json, json_to_dict
61 changes: 58 additions & 3 deletions docs/book/content/intro/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ _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.
_Description:_ Input-output matrix used to map production outputs into consumption and government goods using a fixed coefficient model. This matrix has dimensions (I + 2) x M. The first I rows map consumption goods, row I maps government consumption, and row I + 1 maps infrastructure investment. The sum of each row must be 1.
_Value Type:_ float
_Valid Range:_ min = 0.0 and max = 1.0
_Out-of-Range Action:_ error
Expand Down Expand Up @@ -282,7 +282,7 @@ _Out-of-Range Action:_ error
### Fiscal Policy Parameters

#### `alpha_FA`
_Description:_ Foreign aid payments to domestic government as a share of GDP.
_Description:_ Foreign aid payments to domestic government as a share of GDP. 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 = 1.0
_Out-of-Range Action:_ error
Expand Down Expand Up @@ -855,29 +855,84 @@ _Valid Range:_ min = -1.0 and max = 1.0
_Out-of-Range Action:_ error


#### `g_n_preTP`
_Description:_ Population growth rate from year before model start to start year.
_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_preTP`
_Description:_ Immigration rates in period before model start year.
_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_preTP`
_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

#### `use_sparse_FOC_jac`
_Description:_ Flag to use a sparse (banded) finite-difference Jacobian in the household first order condition root finder. When True (the default), the sparsity pattern of the stacked Euler/labor first order conditions is auto-detected once per problem size and supplied to scipy.optimize.root, which then needs far fewer function evaluations per Jacobian build than the default dense finite differences. The solver falls back to the dense finite-difference Jacobian automatically if the Jacobian is not sparse enough to benefit or if a solve fails. Set to False to use the legacy dense Jacobian on every call.
_Value Type:_ bool
_Valid Choices:_[True, False]


#### `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


#### `TPI_outer_method`
_Description:_ Update rule for the transition-path outer loop. 'picard' (default) is the model's historical damped functional iteration x <- (1-nu) x + nu G(x) (see nu), which leaves model solutions unchanged. 'anderson' uses limited-memory Anderson acceleration on the residual history to take larger, better-directed steps, guarded by a trust region anchored to the damped point (TPI_trust_radius).
_Notes:_ Opt-in solver acceleration. The default ('picard') reproduces the constant-nu behavior exactly.
_Value Type:_ str
_Valid Choices:_['picard', 'anderson']


#### `TPI_anderson_m`
_Description:_ Number of past iterate/residual differences retained by the Anderson accelerator when TPI_outer_method='anderson'. Ignored otherwise.
_Value Type:_ int
_Valid Range:_ min = 1 and max = 50
_Out-of-Range Action:_ error


#### `TPI_anderson_beta`
_Description:_ Mixing weight for the Anderson step when TPI_outer_method='anderson'. beta=1 is undamped; beta<1 adds damping for robustness far from the solution. Ignored otherwise.
_Value Type:_ float
_Valid Range:_ min = 0.1 and max = 1.0
_Out-of-Range Action:_ error


#### `TPI_trust_radius`
_Description:_ Initial trust radius for the accelerated TPI step, as a multiple of the damped functional-iteration step length around the always-feasible damped point. Grown after an improving iteration and shrunk (with a reset) after a worsening one. A non-positive value disables the trust region (unguarded accelerator; not recommended). Ignored when TPI_outer_method='picard'.
_Value Type:_ float
_Valid Range:_ min = 0.0 and max = 100.0
_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.
Expand Down Expand Up @@ -960,7 +1015,7 @@ _Out-of-Range Action:_ error
_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
_Valid Range:_ min = 2013 and max = 2101
_Out-of-Range Action:_ error


Expand Down
12 changes: 12 additions & 0 deletions docs/book/content/intro/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,18 @@ _TPI dimensions:_ TxI
_SS dimensions:_ I


#### `p_g`
_Description:_ Price of the government consumption composite good
_TPI dimensions:_ T
_SS dimensions:_ scalar


#### `p_Ig`
_Description:_ Price of the infrastructure investment composite good
_TPI dimensions:_ T
_SS dimensions:_ scalar


#### `p_tilde`
_Description:_ Price of composite output good
_TPI dimensions:_ T
Expand Down
Loading