gcubed.projections.baseline_projections

This module contains the BaselineProjections class, used for doing baseline projections.

DELTA = 0.001

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.

class BaselineProjections(gcubed.projections.projections.Projections):

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.

BaselineProjections( solved_model: gcubed.linearisation.solved_model.SolvedModel, previous_projections: Optional[gcubed.projections.projections.Projections] = None)

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.

The database used as the starting point for the projections.

perturbed_variable_details: pandas.core.series.Series

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.

first_year_projections_of_variables_adjusted_by_intertemporal_constants: numpy.ndarray

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.

first_projection_year_x1r: numpy.ndarray

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.

first_projection_year_j1r: numpy.ndarray

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.

first_projection_year_zer: numpy.ndarray

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.

first_projection_year_z1r: numpy.ndarray

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.

first_projection_year_yxr: numpy.ndarray

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.

first_projection_year_yjr: numpy.ndarray

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.

first_projection_year_exz: numpy.ndarray

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.

first_projection_year_exo: numpy.ndarray

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.

x1r_difference_from_ssf

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.

j1r_difference_from_ssf

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.

zer_difference_from_ssf

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.

z1r_difference_from_ssf

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.

reference_h3t_used_to_compute_intertemporal_constants: numpy.ndarray

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.

reference_c4t_used_to_compute_intertemporal_constants: numpy.ndarray

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.

x1_constants: numpy.ndarray

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.

j1_constants: numpy.ndarray

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.

ze_constants: numpy.ndarray

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.

z1_constants: numpy.ndarray

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.

yxr_first_year_projections: numpy.ndarray

Projections of X1_t (yxr) in the first projection year

yjr_first_year_projections: numpy.ndarray

Projections of J1_t (yjr) in the first projection year

exz_first_year_projections: numpy.ndarray

Projections of ZE_t (exz) in the first projection year

z1l_first_year_projections: numpy.ndarray

Projections of Z1_t (z1l=z1r) in the first projection year

exo_first_year_projections: numpy.ndarray

Projections of EXO_t in the first projection year

first_year_original_projections_of_variables_adjusted_by_intertemporal_constants: numpy.ndarray

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.

first_year_original_projections_of_yxr: numpy.ndarray

The first year projected values for the state variables.

This is only required for benchmarking against Ox.

first_year_original_projections_of_yjr: numpy.ndarray

The first year projected values for the costate variables.

This is only required for benchmarking against Ox.

first_year_original_projections_of_exz: numpy.ndarray

The first year projected values for the expected endogenous variables exz.

This is only required for benchmarking against Ox.

first_year_original_projections_of_z1l: numpy.ndarray

The first year projected values for the endogenous variables.

This is only required for benchmarking against Ox.

first_year_observed_values_of_variables_adjusted_by_intertemporal_constants: numpy.ndarray

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.

intertemporal_constants: pandas.core.frame.DataFrame

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.

partial_derivatives_wrt_intertemporal_constants: numpy.ndarray

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.