gcubed.projections.projections

This module contains the Projections class, used as a base class for generating baseline and simulation projections. It provides access to all forms of projections.

class Projections(gcubed.base.Base):

Base class for Simulation Projections and for Baseline Projections.

Projections( stable_manifold: gcubed.linearisation.stable_manifold.StableManifold, previous_projections: Optional[Projections] = None)

Arguments

stable_manifold: The stable manifold used for projecting the model.

previous_projections: The previous projections (baseline or simulation layer or other) or None if these projections have no previous projections.

Exceptions

Raises an exception if the stable manifold has not been supplied correctly.

Raises an exception if the stable manifold has not converged.

name: str

The name of these projections.

is_baseline_projections: bool

True if the projections are baseline projections rather than some other kind of projections.

baseline_projections: Optional[ForwardRef('BaselineProjections')]

The baseline projections that underpin these projections. If these projections are baseline projections then this property is this instance.

first_projections: Optional[Projections]

The first projections created (these have no previous projections).

is_first_projections: bool

True if the projections are the first projections and False otherwise.

This setting is used to determine whether constant adjustments to long interest rates (nominal and real bond rates) are calculated to ensure first projection year long interest rates match the observed data for that year.

previous_projections: Optional[Projections]

The previous projections (baseline or simulation layer or other) or None if these projections are baseline projections.

The stable manifold used for projecting the model.

The state-space form of the linearised model.

The linearised model.

The model being used to generate the projections.

The SYM processor data generated from the SYM model definition.

The calibrated parameters of the model.

The model configuration.

first_projection_year: int

The first projection year for this projection.

original_first_projection_year: int

The original first projection year for this projection.

last_projection_year: int

The last year of projections

last_publishable_projection_year: int

The last year of projections that are publishable.

projection_years: list[int]

Returns the list of years for projections from the event year through to and including the projection end year.

projection_years_count: list[int]
projection_years_column_labels: list[str]

Returns the ordered list of 4 digit (YYYY) year column labels for the projections.

publishable_projection_years: list[int]

Returns the list of years for publishable projections.

publishable_projection_years_column_labels: list[str]

Returns the ordered list of 4 digit (YYYY) year publishable projection column labels for the projections.

projections: pandas.core.frame.DataFrame

Returns the dataframe of projections for all variables in the model that are part of the 4 vectors specified. There still need to be additional variable projected that are computed outside of the system to take non-linearity into account (eg long-term interest rates.)

Exceptions

Raises an exception if the projections are not yet available.

combined_database_and_projections: pandas.core.frame.DataFrame

Returns the dataframe of the original database and the projections for all variables in the model.

This splicing of the database onto the database projections is intended to be used for diagnostic purposes only.

Exceptions

Raises an exception if the combined database and projections are not yet available.

database_projections: pandas.core.frame.DataFrame

Returns the dataframe of projections for all variables in the model in forms that are consistent with the values contained in the original model database.

Exceptions

Raises an exception if the database projections are not yet available.

publishable_projections: pandas.core.frame.DataFrame

Returns the dataframe of projections for all variables in the model.

Exceptions

Raises an exception if the publishable projections are not yet available.

yxr_initial_values: pandas.core.frame.DataFrame

The yxr initial values used to start the projections process.

Exceptions

Raises an exception if the initial values contain NaNs.

Raises an exception if the initial values are not yet available.

yxr_projections_as_dataframe: pandas.core.frame.DataFrame

Get yxr variable projection values of the projection years as a dataframe.

yxr_projections: numpy.ndarray

Get yxr variable projection values of the projection years.

yjr_projections_as_dataframe: pandas.core.frame.DataFrame

Get yjr variable projection values of the projection years as a dataframe.

yjr_projections: numpy.ndarray

Get yjr variable projection values of the projection years.

exz_projections_as_dataframe: pandas.core.frame.DataFrame

Get exz variable projection values of the projection years as a dataframe.

exz_projections: numpy.ndarray

Get exz variable projection values of the projection years.

zel_projections_as_dataframe: pandas.core.frame.DataFrame

Get zel variable projection values of the projection years as a dataframe.

zel_projections: numpy.ndarray

Get zel variable projection values of the projection years.

z1l_projections_as_dataframe: pandas.core.frame.DataFrame

Get z1l variable projection values of the projection years as a dataframe.

z1l_projections: numpy.ndarray

Get z1l variable projection values of the projection years.

exo_projections: pandas.core.frame.DataFrame

A dataframe (not a numpy array) that contains the exogenous variable projection values for all of the projection years from the original first projection year through to the last projection year, as a dataframe.

The exogenous variable projections for the years before the first projection year of this projections object are retained because they can be necessary in the event of a subsequent model relinearisation.

Exceptions

Raises an exception if the exogenous variable projections contain NaN values.

long_rate_constants: pandas.core.frame.DataFrame

The constant adjustments to long bond rates (real and nominal) in the base projection year to ensure projections equal observed values.

h3t: numpy.ndarray

Equivalent to h3t in the Ox implementation

Returns constants and the functions of current and future exogenous variables affecting J1.

c4t: numpy.ndarray

Equivalent to c4t in the Ox implementation

Returns constants and the functions of current and future exogenous variables affecting ZE.

h3t_as_dataframe: pandas.core.frame.DataFrame

Returns constants and the functions of current and future exogenous variables affecting J1. as a dataframe, indexing the rows with costate variable names and the columns with projection years.

c4t_as_dataframe: pandas.core.frame.DataFrame

Returns constants and the functions of current and future exogenous variables affecting ZE. as a dataframe, indexing the rows with costate variable names and the columns with projection years.

constantBL: pandas.core.frame.DataFrame

The constantBL matrix used to generate the state variable projections.

annotated_projections: pandas.core.frame.DataFrame

Raw projections along with annotations for units and variable descriptions.

annotated_database_projections: pandas.core.frame.DataFrame

Database projections along with annotations for units and variable descriptions.

annotated_combined_database_and_projections: pandas.core.frame.DataFrame

Combined database and projections along with annotations for units and variable descriptions.

annotated_publishable_projections: pandas.core.frame.DataFrame

Publication projections along with annotations for units and variable descriptions.

charting_projections: pandas.core.frame.DataFrame

Charting projections along with annotations for set member descriptions and prefix.