longbridge-seasonality
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-seasonality
longbridge-seasonality
Identifies calendar-driven return anomalies for a stock by analysing multi-year historical OHLCV data. Computes average returns grouped by month, day-of-week, and proximity to known events (holidays, earnings seasons) to surface statistically significant seasonal patterns.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
通过分析多年历史OHLCV数据,识别股票受日历驱动的收益异常。按月份、星期几以及与已知事件(节假日、财报季)的临近程度分组计算平均收益,以呈现具有统计显著性的季节性模式。
响应语言:匹配用户输入语言——简体中文 / 繁体中文 / 英文。
When to use
使用场景
- User asks "does AAPL tend to rise in January?", "周一买还是周五买", "节假日前后涨跌规律", "NVDA 财报季行情", "月份效应", "seasonality analysis".
- 用户询问“苹果(AAPL)在1月是否倾向于上涨?”、“周一买还是周五买”、“节假日前后涨跌规律”、“英伟达(NVDA)财报季行情”、“月份效应”、“seasonality analysis”等问题时。
Workflow
工作流程
- Fetch 5 years of daily candles (≈ 1260 trading days):
longbridge kline <SYMBOL> --period day --count 1260 --format json - Compute daily log-returns from column.
close - Group by:
- Month effect: average return per calendar month (Jan–Dec); flag months with |avg| > 1 std of all monthly averages.
- Day-of-week effect: parse field for weekday; average return Mon–Fri; flag extremes.
time - Holiday drift: identify the 3 trading days before/after major holidays (Christmas, Chinese New Year, Golden Week for HK/CN); compute average drift window.
- Earnings season: roughly Q1 (Jan–Feb), Q2 (Apr–May), Q3 (Jul–Aug), Q4 (Oct–Nov) for US stocks; compute average return in those windows vs non-earnings months.
- Summarise each effect as: (a) average return, (b) win rate (% positive days), (c) signal direction (Bullish/Bearish/Neutral).
- Output a summary table + top-3 actionable patterns.
Run to confirm flag names before calling.
longbridge kline --help- 获取5年的日K线数据(约1260个交易日):
longbridge kline <SYMBOL> --period day --count 1260 --format json - 根据(收盘价)字段计算每日对数收益。
close - 按以下维度分组:
- 月份效应:计算每个日历月(1月-12月)的平均收益;标记平均收益绝对值大于所有月度平均收益1倍标准差的月份。
- 星期效应:解析字段获取星期几;计算周一至周五的平均收益;标记极端值。
time - 节假日漂移:识别主要节假日(圣诞节、春节、港/内地黄金周)前后3个交易日;计算该窗口期的平均价格漂移。
- 财报季效应:美股财报季大致为Q1(1-2月)、Q2(4-5月)、Q3(7-8月)、Q4(10-11月);计算财报季窗口与非财报月份的平均收益对比。
- 将每个效应总结为:(a) 平均收益,(b) 胜率(上涨天数占比),(c) 信号方向(看涨/看跌/中性)。
- 输出汇总表格 + 排名前三的可执行交易模式。
调用前请运行确认参数名称。
longbridge kline --helpCLI
命令行界面(CLI)
bash
longbridge kline --helpbash
longbridge kline --help5-year daily history
获取5年日K线历史数据
longbridge kline <SYMBOL> --period day --count 1260 --format json
JSON rows: `{time, open, high, low, close, volume}`. Parse `time` for year/month/weekday grouping.longbridge kline <SYMBOL> --period day --count 1260 --format json
JSON行格式:`{time, open, high, low, close, volume}`。解析`time`字段用于按年/月/星期分组。Output
输出
| Effect | 简体 | 繁體 | English |
|---|---|---|---|
| Month effect | 月份效应 | 月份效應 | Month-of-year effect |
| Day-of-week | 星期效应 | 星期效應 | Day-of-week effect |
| Holiday drift | 节假日效应 | 節假日效應 | Holiday drift |
| Earnings season | 财报季效应 | 財報季效應 | Earnings season effect |
| Signal | 信号 | 訊號 | Signal |
Output: one table per effect (Month / DOW / Holiday / Earnings), then a "Top Patterns" section with concrete entry/exit rules. Cite Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券.
| 效应 | 简体 | 繁体 | English |
|---|---|---|---|
| Month effect | 月份效应 | 月份效應 | Month-of-year effect |
| Day-of-week | 星期效应 | 星期效應 | Day-of-week effect |
| Holiday drift | 节假日效应 | 節假日效應 | Holiday drift |
| Earnings season | 财报季效应 | 財報季效應 | Earnings season effect |
| Signal | 信号 | 訊號 | Signal |
输出形式:每个效应对应一张表格(月份/星期/节假日/财报季),随后是“核心交易模式”部分,包含具体的进出规则。标注Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券。
Error handling
错误处理
| Situation | 简体回复 | 繁體回復 | English reply |
|---|---|---|---|
| 回退到 MCP 或提示安装 longbridge-terminal | 回退到 MCP 或提示安裝 longbridge-terminal | Fall back to MCP or install longbridge-terminal |
| 请运行 | 請執行 | Run |
| Fewer than 250 candles returned | 数据不足以计算季节性,建议选择历史更长的标的 | 數據不足,建議選擇歷史更長的標的 | Insufficient data; choose a more liquid / longer-history symbol |
| Other stderr | 直接显示原始错误 | 直接顯示原始錯誤 | Surface verbatim |
| 场景 | 简体回复 | 繁体回復 | English reply |
|---|---|---|---|
| 回退至MCP或提示安装longbridge-terminal | 回退至MCP或提示安裝longbridge-terminal | Fall back to MCP or install longbridge-terminal |
| 请运行 | 請執行 | Run |
| 返回K线数据不足250条 | 数据不足以计算季节性,建议选择历史更长的标的 | 數據不足,建議選擇歷史更長的標的 | Insufficient data; choose a more liquid / longer-history symbol |
| 其他标准错误输出 | 直接显示原始错误信息 | 直接顯示原始錯誤訊息 | Surface verbatim |
MCP fallback
MCP回退方案
Use with , when CLI is unavailable.
mcp__longbridge__candlesticksperiod=Daycount=1260当CLI不可用时,使用,参数设置为,。
mcp__longbridge__candlesticksperiod=Daycount=1260Related skills
相关技能
- — raw candle data
longbridge-kline - — forward earnings dates and holidays
longbridge-calendar - — vol regime complement to seasonality
longbridge-volatility-strategy
- — 原始K线数据
longbridge-kline - — 未来财报日期与节假日信息
longbridge-calendar - — 与季节性策略互补的波动率状态策略
longbridge-volatility-strategy
File layout
文件结构
longbridge-seasonality/
└── SKILL.mdlongbridge-seasonality/
└── SKILL.md