时间序列预测 MCP (Model Context Protocol) - 提供 AR、MA、ARIMA、GARCH、指数平滑五种时间序列预测能力
Project description
Time Series Forecast MCP
时间序列预测 MCP (Model Context Protocol),提供五种时间序列预测模型:
- AR: 自回归模型
- MA: 移动平均模型
- ARIMA: 自回归积分移动平均模型(支持自动选参)
- GARCH: 广义自回归条件异方差模型(波动率预测)
- EXPONENTIAL_SMOOTHING: 指数平滑模型(支持季节性)
安装
pip install time-series-forecast-mcp
使用
作为 MCP 服务启动
python -m time_series_forecast_mcp
或使用 fastmcp CLI:
fastmcp run server.py:mcp
工具列表
list_forecast_models
列出支持的时间序列预测模型及适用场景说明。
forecast_time_series
对历史时间序列进行预测。
参数:
model_type: AR / MA / ARIMA / GARCH / EXPONENTIAL_SMOOTHINGseries: 历史观测值,按时间升序排列horizon: 向前预测步数(默认 12)p: AR 阶数或 ARIMA/GARCH 的 p(可选)d: ARIMA 差分阶数(可选)q: MA 阶数或 ARIMA/GARCH 的 q(可选)seasonal_period: 季节周期,仅 EXPONENTIAL_SMOOTHING 使用(可选)confidence_level: 置信水平,默认 0.95
返回:
forecast: 点预测lower_bound / upper_bound: 置信区间model_info: 模型参数与 AIC/BIC 等信息diagnostics: 样本量等诊断信息
依赖
- fastmcp >= 2.0.0
- numpy >= 1.24.0
- pandas >= 2.0.0
- statsmodels >= 0.14.0
- arch >= 7.0.0
- scipy >= 1.10.0
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file time_series_forecast_mcp-0.1.0.tar.gz.
File metadata
- Download URL: time_series_forecast_mcp-0.1.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57159eb0a21edcf2030726a879c18182fb77920d826c2f21bc60c5939e793324
|
|
| MD5 |
c6dfa467b552cbee22389680174ccee5
|
|
| BLAKE2b-256 |
b04b66924480d99f76bb970ef310cffaa4fc62ea7abffca5084361e9b59b01db
|
File details
Details for the file time_series_forecast_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: time_series_forecast_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59f651e8c0ee92daf7403bd080c0bd1a2f8f5e41df9fa2735588d9a47148e261
|
|
| MD5 |
a12389b0901b43d98632ad80562ced18
|
|
| BLAKE2b-256 |
f9de19a87ed8d2d0eae35fec149207bcf116eed11c60153ae3d474533db0d82f
|