gcubed.projections.baseline_projections
This module contains the BaselineProjections
class,
used for doing baseline projections.
The delta used to compute partial derivatives when calculating the intertemporal constants.
Note that a considerably larger value of DELTA is used when calculating the partial derivatives of the initial projection values of the variables whose values are adjusted by the intertemporal constants because those variable values are linear functions of the intertemporal constants. The size of the delta does not matter, theoretically, when calculating the partial derivatives of linear systems and a larger value of DELTA is used to eliminate precision issues. In the Ox implementation of G-Cubed, the DELTA used was 0.00001 but this can be made even larger to achieve better precision of the derivative estimates.
Overview
Compute the baseline model projections over the projection horizon from the first projection year (a year with available data to be matched by the projections) through to the last projection year.
Arguments
solved_model
: The solved model that provides access to all
of the information required to produce projections.
previous_projections
: The projections that this baseline builds upon. The first baseline
has previous projections equal to None
. Defaults to None
.
The solved model that provides access to all of the information required to produce projections.
If computing intertemporal constants,
the var_map details (the row of the SYM var_map dataframe)
for the variable being perturbed as part of computing
derivatives needed to set intertemporal constants. Otherwise, this returns
None
if just producing the baseline projections.
An column vector of first year projection values for those variables that are adjusted by intertemporal constants.
The vector is populated from the vectors of first year projections for
each of x1l
, j1l
, zel
, and z1l
.
The x1r
vector populated with database values
from the year after the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The j1r
vector populated with database values
from the year after the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The zer
vector populated with database values
from the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The z1r
vector populated with database values
from the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The yxr
vector populated with database values
from the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The yjr
vector populated with database values
from the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The exz
vector populated with database values
from the year after the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The exo
vector populated with database values
from the first projection year.
These values are not adjusted by any constants and are never altered after they are set.
The difference between the database values of x1r
and the raw baseline projections of those values,
without making any constant adjustments at all.
These differences are added to the constants that are used in the baseline projections to ensure that the projections in the first projection year match the database values in that year.
The difference between the database values of j1r
and the raw baseline projections of those values,
without making any constant adjustments at all.
These differences are added to the constants that are used in the baseline projections to ensure that the projections in the first projection year match the database values in that year.
The difference between the database values of zer
and the raw baseline projections of those values,
without making any constant adjustments at all.
These differences are added to the constants that are used in the baseline projections to ensure that the projections in the first projection year match the database values in that year.
The difference between the database values of z1r
and the raw baseline projections of those values,
without making any constant adjustments at all.
These differences are added to the constants that are used in the baseline projections to ensure that the projections in the first projection year match the database values in that year.
Equivalent to h3t in the Ox implementation Functions of current and future exogenous variables affecting J1. This is the reference version of h3t, computed to calculation the projections for the base year that will be used as a reference projection when determining the numeric derivatives for calculation of the intertemporal constants.
Its only role is to preserve the appropriate information for benchmarking against Ox.
Equivalent to c4t in the Ox implementation Functions of current and future exogenous variables affecting ZE. This is the reference version of h3t, computed to calculation the projections for the base year that will be used as a reference projection when determining the numeric derivatives for calculation of the intertemporal constants.
Its only role is to preserve the appropriate information for benchmarking against Ox.
The constant adjustments to X1 to ensure projections equal observed values. Add any intertemporal constant values to the X1R difference to SSF equation results with zero constants to get the combined set of constants.
The constant adjustments to J1 to ensure projections equal observed values. Add any intertemporal constant values to the X1R difference to SSF equation results with zero constants to get the combined set of constants.
The constant adjustments to ZE to ensure projections equal observed values. Add any intertemporal constant values to the X1R difference to SSF equation results with zero constants to get the combined set of constants.
The constant adjustments to Z1 to ensure projections equal observed values. Add any intertemporal constant values to the X1R difference to SSF equation results with zero constants to get the combined set of constants.
Projections of Z1_t (z1l=z1r) in the first projection year
The first year projected values for the variables that are being adjusted by the intertemporal constants.
The values are those for the projection that is not adjusted by intertemporal constants.
It is used in the calculation of the intertemporal constants but it is only preserved as a property to facilitate benchmarking against Ox.
The first year projected values for the state variables.
This is only required for benchmarking against Ox.
The first year projected values for the costate variables.
This is only required for benchmarking against Ox.
The first year projected values for the expected endogenous variables exz.
This is only required for benchmarking against Ox.
The first year projected values for the endogenous variables.
This is only required for benchmarking against Ox.
Returns the observed values, in the first projection year, of the variables that are adjusted by intertemporal constants.
The values are not adjusted after they are initially set so they can be relied up and reused by the constant calculation process in this baseline projections and in any later relinearisation projections.
The data frame of intertemporal constants information obtained from SYM but augmented with the values of the intertemporal constants.
The dataframe is indexed by the variable names.
The constant values are stored in a column called constant_value
.
The matrix of partial derivatives used in Newton's method to compute the intertemporal constants.
This is a property of the class just to support benchmarking against Ox.
Inherited Members
- gcubed.projections.projections.Projections
- name
- is_baseline_projections
- baseline_projections
- first_projections
- is_first_projections
- previous_projections
- stable_manifold
- state_space_form
- linear_model
- model
- sym_data
- parameters
- configuration
- first_projection_year
- original_first_projection_year
- last_projection_year
- last_publishable_projection_year
- projection_years
- projection_years_count
- projection_years_column_labels
- publishable_projection_years
- publishable_projection_years_column_labels
- projections
- combined_database_and_projections
- database_projections
- publishable_projections
- yxr_initial_values
- yxr_projections_as_dataframe
- yxr_projections
- yjr_projections_as_dataframe
- yjr_projections
- exz_projections_as_dataframe
- exz_projections
- zel_projections_as_dataframe
- zel_projections
- z1l_projections_as_dataframe
- z1l_projections
- exo_projections
- long_rate_constants
- h3t
- c4t
- h3t_as_dataframe
- c4t_as_dataframe
- constantBL
- annotated_projections
- annotated_database_projections
- annotated_combined_database_and_projections
- annotated_publishable_projections
- charting_projections