GARCH 模型回溯測試

Python 中的 GARCH 模型

Chelsea Yang

Data Science Instructor

回溯測試

  • 評估模型預測能力的方法

  • 將模型預測與實際歷史資料比較

Python 中的 GARCH 模型

內樣本 vs. 外樣本

  • 內樣本:模型擬合

  • 外樣本:回溯測試

Python 中的 GARCH 模型

MAE

平均絕對誤差

MAE 公式

Python 中的 GARCH 模型

MSE

均方誤差

MSE 公式

Python 中的 GARCH 模型

在 Python 計算 MAE、MSE

from sklearn.metrics import mean_absolute_error, mean_squared_error
# Call function to calculate MAE
mae = mean_absolute_error(observation, forecast)

# Call function to calculate MSE
mse = mean_squared_error(observation, forecast)
Python 中的 GARCH 模型

一起來練習吧!

Python 中的 GARCH 模型

Preparing Video For Download...