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( solved_model: gcubed.linearisation.solved_model.SolvedModel, previous_projections: Projections | None = 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: Projections | None

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

previous_projections: Projections | None

The previous projections (baseline projections or projections based on application of a simulation layer) or None if these projections are baseline projections.

The solved model used for projecting the model.

The stable manifold used for projecting the model.

The state-space form of the linearised model.

The linearisation database used as the starting point for the projections.

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.

combined_database_and_projections: pandas.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.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.DataFrame

Overview

This property gives access to the publishable projections, generated from the database projections.

Publishable projections are generated for human consumption only. They are not reused for model or simulation calculations.

The publishable projections must be associated with the publication_units of measurement that are available from the sym_data variable summary.

Key changes from the database projections are:

Real GDP scaling

LGDPR database projections are hypothetical projections of real GDP for each region, under the assumption that each region is in steady state and is growing at its steady state growth rate.

This steady-state growth has path has been eliminated from the path for effective labor productivity to ensure that the model settles down to a steady state in which there is no growth when the model is being solved. This steady-state growth path needs to be restored and this is where that restoration occurs.

Multiply database projections for all variables with GDP units by the LGDPR projections for the region to which the variable belongs.

Also multiply database projections for all variables with reference country GDP units by the LGDPR projections for the reference country region.

Dollar unit conversion (obsolete now that dollars units are not used.)

Conversion from cents (dollars * 100) representation to dollars for data with dollars units.

Aggregate consistency adjustments (optional)

Ensure that macroeconomic aggregates have components consistent with aggregates.

Returns

The dataframe of publishable level projections for all variables in the model, converted to the publishable units of measurement.

Exceptions

Raises an exception if the publishable projections cannot be generated.

yxr_initial_values: pandas.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.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.

exz_projections_as_dataframe: pandas.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.

exo_projections: pandas.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.DataFrame

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

annotated_database_projections: pandas.DataFrame

Database projections along with annotations for units and variable descriptions.

annotated_combined_database_and_projections: pandas.DataFrame

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

annotated_publishable_projections: pandas.DataFrame

Publication projections along with annotations for units and variable descriptions.

charting_projections: pandas.DataFrame

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