Scenario Analysis

After you have created good models, you can use them to conduct scenario analyses. If you create a scenario for how the input variables to the models will develop into the future, then the model can predict how the target variable is likely to develop, given that the input variables unfold as specified in the scenario.

Prognosis

The first step is to specify a scenario, by making a prognosis for how each of the input variables will develop. This is done with the extend function.

signal.extend(date, value)

Extend the signal into the future. The variable will be set to the given value at the given future date, and it will be linearly interpolated between the current value and that future value.

Parameters:
  • date (str) – The future date to make a prediction for

  • value (float) – The value the variable is predicted to have at the future date in the scenario

For example, to predict that the oil price will be $115 on December 31, 2019:

oil_price.extend('2019-12-31', 115)

A signal can be extended multiple times, to create a scenario with predictions at multiple future dates. For example, to predict that the oil price will be $115 on December 21, 2019 and then fall to $50 on August 15, 2020:

oil_price.extend('2019-12-31', 115).extend('2020-08-15', 50)