The document outlines a process for selecting and training forecasting models that incorporate exogenous variables, emphasizing the importance of model evaluation and forecasting accuracy. It discusses various methods for incorporating exogenous variables, including assuming constant values, forecasting them separately, conducting scenario analysis, and utilizing external data sources. Additionally, it provides Python code examples for implementing these methods in practice.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
19 views
exogenous variable hdl document
The document outlines a process for selecting and training forecasting models that incorporate exogenous variables, emphasizing the importance of model evaluation and forecasting accuracy. It discusses various methods for incorporating exogenous variables, including assuming constant values, forecasting them separately, conducting scenario analysis, and utilizing external data sources. Additionally, it provides Python code examples for implementing these methods in practice.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3
1.
Model Selection: Choose appropriate forecasting models that can
incorporate exogenous variables. Time-series models like ARIMA, SARIMA, or Prophet are commonly used for this purpose. 2. Model Training: Split the data into training and validation sets. Train the forecasting model using the training data, optimizing model parameters as necessary. Validate the model using the validation set to ensure it generalizes well to unseen data. 3. Incorporating Exogenous Variables: Modify the chosen forecasting model to incorporate the exogenous variables. This may involve adding them as additional input features or integrating them into the model's structure, depending on the specific model architecture. 4. Model Evaluation: Evaluate the performance of the model using appropriate metrics such as Mean Absolute Error (MAE), Mean Squared Error (MSE), or Root Mean Squared Error (RMSE). Compare the performance of the model with and without exogenous variables to assess their impact on forecasting accuracy. 5. Forecasting: Once the model is trained and validated, use it to make forecasts of the quantity of interest based on future values of the exogenous variables. Monitor forecast performance over time and refine the model as necessary.
Elaboration on Incorporating Exogenous Variable-
1. Assume Constant Values: Assume constant values for the exogenous variables in the forecast period. This assumes that the exogenous variables will remain unchanged from their last observed values. While this approach is simple, it may not capture potential changes or trends in the exogenous variables over time. 2. Forecast Exogenous Variables Separately: If feasible, you can develop separate forecasting models for the exogenous variables themselves. Once you have forecasts for the exogenous variables, you can then use them as inputs to your main forecasting model for the quantity of interest. This approach allows you to incorporate the uncertainty in the exogenous variable forecasts into your final forecast. 3. Scenario Analysis: Conduct scenario analysis by creating multiple forecasts based on different assumptions about the future values of exogenous variables. This approach can help you understand the range of possible outcomes and assess the sensitivity of your forecast to changes in the exogenous variables. 4. External Data Sources: Explore the possibility of obtaining future values of exogenous variables from external sources such as economic forecasts, industry reports, or expert opinions. While this may require additional effort and resources, it can provide valuable insights into future trends and developments that may impact your quantity forecast.
Situation 1: Assume Constant Values
Assuming last observed value of exogenous variable is used as constant last_observed_exog_value = exog_var.iloc[-1] forecast_constant_exog = results.forecast(steps=n_steps, exog=last_observed_exog_value) print(forecast_constant_exog) Situation 2: Forecast Exogenous Variables Separately python code Assuming you have separate models for forecasting exogenous variables exog_model = SARIMAX(exog_var, order=(1, 1, 1)) exog_results = exog_model.fit() forecast_exog = exog_results.forecast(steps=n_steps) forecast_with_exog_forecast = results.forecast(steps=n_steps, exog=forecast_exog) print(forecast_with_exog_forecast) Situation 3: Scenario Analysis Python code Perform scenario analysis by creating multiple forecasts with different assumptions forecast_scenario_1 = results.forecast(steps=n_steps, exog=scenario_1_exog) forecast_scenario_2 = results.forecast(steps=n_steps, exog=scenario_2_exog) print(forecast_scenario_1) print(forecast_scenario_2) Situation 4: External Data Sources Python code Assume future values of exogenous variable are obtained from an external source external_data = pd.read_csv('external_data.csv') future_exog_values = external_data['future_exog_var'] forecast_external = results.forecast(steps=n_steps, exog=future_exog_values) print(forecast_external)