AlphaEar Predictor Skill
Overview
This skill utilizes the Kronos model (via KronosPredictorUtility) to perform time-series forecasting and adjust predictions based on news sentiment.
Capabilities
1. Forecast Market Trends
1. Forecast Market Trends
Workflow:
- 1. Generate Base Forecast: Use
scripts/kronos_predictor.py (via KronosPredictorUtility) to generate the technical/quantitative forecast. - Adjust Forecast (Agentic): Use the Forecast Adjustment Prompt in
references/PROMPTS.md to subjectively adjust the numbers based on latest news/logic.
Key Tools:
- -
KronosPredictorUtility.get_base_forecast(df, lookback, pred_len, news_text): Returns List[KLinePoint].
Example Usage (Python):
CODEBLOCK0
Configuration
This skill requires the Kronos model and an embedding model.
- 1. Kronos Model:
- Ensure
exports/models directory exists in the project root.
- Place trained news projector weights (e.g.,
kronos_news_v1.pt) in
exports/models/.
- Or depend on the base model (automatically downloaded).
[!CAUTION]
Model Security: This skill loads model weights from exports/models. We use weights_only=True and only scan for the kronos_news_*.pt pattern. Ensure you only place trusted checkpoints in this directory.
- 2. Environment Variables:
-
EMBEDDING_MODEL: Path or name of the embedding model (default:
sentence-transformers/all-MiniLM-L6-v2).
-
KRONOS_MODEL_PATH: Optional path to override model loading.
Dependencies
- - INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
- INLINECODE20
AlphaEar 预测器技能
概述
本技能利用Kronos模型(通过KronosPredictorUtility)执行时间序列预测,并根据新闻情感调整预测结果。
功能
1. 预测市场趋势
1. 预测市场趋势
工作流程:
- 1. 生成基础预测:使用scripts/kronos_predictor.py(通过KronosPredictorUtility)生成技术/量化预测。
- 调整预测(智能代理):使用references/PROMPTS.md中的预测调整提示,根据最新新闻/逻辑主观调整数值。
关键工具:
- - KronosPredictorUtility.getbaseforecast(df, lookback, predlen, newstext):返回List[KLinePoint]。
使用示例(Python):
python
from scripts.utils.kronos_predictor import KronosPredictorUtility
from scripts.utils.database_manager import DatabaseManager
db = DatabaseManager()
predictor = KronosPredictorUtility()
预测
forecast = predictor.predict(600519, horizon=7d)
print(forecast)
配置
本技能需要Kronos模型和嵌入模型。
- 1. Kronos模型:
- 确保项目根目录下存在exports/models目录。
- 将训练好的新闻投影器权重(例如kronos
newsv1.pt)放置在exports/models/中。
- 或依赖基础模型(自动下载)。
[!CAUTION]
模型安全性:本技能从exports/models加载模型权重。我们使用weightsonly=True,仅扫描kronosnews_*.pt模式。请确保仅在此目录中放置受信任的检查点。
- 2. 环境变量:
- EMBEDDING_MODEL:嵌入模型的路径或名称(默认值:sentence-transformers/all-MiniLM-L6-v2)。
- KRONOS
MODELPATH:可选路径,用于覆盖模型加载。
依赖项
- - torch
- transformers
- sentence-transformers
- pandas
- numpy
- scikit-learn