External regressors in finnts can be entered two separate ways.

  • historical values only
  • historical and future values

Historical Values Only

If you have an external regressor with just their historical values, finnts will only use lags of those values when creating features to use in a model. That fixes the need to know or predict what these values should be in the future. Forecasting these values into the future, either by simple methods like arima/ets or even using finnts to daisy chain forecasting regressors to then forecast the final target variable, only adds additional layers of uncertainty with the final future forecast. Using forecasts as inputs to another forecast can get out of hand quick, and is something we try to avoid within finnts.

Note: This only works for continuous (numeric) external regressors.

Historical and Future Values

If you have an external regressor, with both their historical and future values, finnts will then use both current (t-0) and lag (t-n) values when creating features to use in a model. This is required for categorical regressors, but optional for continuous (numeric) regressors.

Note: Future values of external regressors need to be provided for the entire forecast horizon. Current (t-0) values of these regressors will also be used as features during the back testing process.

Below is an example of how you can set up your input_data to leverage future values of external regressors.

  • monthly date type
  • forecast horizon of 3
  • historical end date of “2020-12-01”
  • external regressors: Holiday, GDP, Sales_Pipeline
#> # A tibble: 15 × 6
#>    Combo     Date       Target Holiday          GDP Sales_Pipeline
#>    <chr>     <date>      <dbl> <chr>          <dbl>          <dbl>
#>  1 Country_1 2020-01-01     10 New Years          5            100
#>  2 Country_1 2020-02-01     20 Valentines Day    10            110
#>  3 Country_1 2020-03-01     30 None              15            120
#>  4 Country_1 2020-04-01     40 Easter            20            130
#>  5 Country_1 2020-05-01     50 None              25            140
#>  6 Country_1 2020-06-01     60 None              30            150
#>  7 Country_1 2020-07-01     70 4th of July       35            160
#>  8 Country_1 2020-08-01     80 None              40            170
#>  9 Country_1 2020-09-01     90 Labor Day         45            180
#> 10 Country_1 2020-10-01    100 Halloween         50            190
#> 11 Country_1 2020-11-01    110 Thanksgiving      55            200
#> 12 Country_1 2020-12-01    120 Christmas         60            210
#> 13 Country_1 2021-01-01     NA New Years         NA            220
#> 14 Country_1 2021-02-01     NA Valentines Day    NA            230
#> 15 Country_1 2021-03-01     NA None              NA            240

Current and future values of “Holiday” and “Sales_Pipeline” will be used in creating the 3 month future forecast from “2021-01-01” to “2021-03-01”, while only the historical lags of “GDP” will be used to create the future forecast.