| name | inflation-forecasting |
| description | 通胀预测模型,基于Phillips曲线简化版计算CPI分项预测与核心通胀。适用于通胀预测方法的。Phillips曲线未处理通胀预期非线性与供给冲击,不适用于正式经济预测,不构成投资建议。 |
| version | 1.0.0 |
| author | wangyi |
inflation-forecasting
通胀预测工具,支持 CPI 分项预测、核心通胀估计和菲利普斯曲线模型,仅使用 Python 标准库。
📌 说明:本工具基于简化模型实现,仅使用 Python 标准库。结果仅供学习参考,不构成投资建议。
脚本API
cpi_component_forecast(components, forecast_horizon=4)
CPI 分项预测。
必填: components
core_inflation(components, exclude=None, method='exclude', trim_percent=0.1)
核心通胀计算。
必填: components
phillips_curve(inflation_history, unemployment_history, natural_unemployment, inflation_expectation=None, forecast_unemployment=None)
菲利普斯曲线模型。
必填: inflation_history, unemployment_history, natural_unemployment
forecast_inflation(method='phillips_curve')
统一通胀预测接口。
调用示例
python scripts/main.py \
--method <method> \
--components <components> \
--exclude <exclude> \
--forecast-horizon <forecast_horizon> \
--forecast-unemployment <forecast_unemployment> \
--inflation-expectation <inflation_expectation> \
--inflation-history <inflation_history> \
--natural-unemployment <natural_unemployment> \
--trim-percent <trim_percent> \
--unemployment-history <unemployment_history>