stock-historical-index
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseStock Historical Index
股票指数历史数据获取
Retrieve full historical end-of-day price data for market indices using the Octagon MCP server.
使用Octagon MCP服务器获取市场指数的完整历史每日收盘价数据。
Prerequisites
前提条件
Ensure Octagon MCP is configured in your AI agent (Cursor, Claude Desktop, Windsurf, etc.). See references/mcp-setup.md for installation instructions.
确保你的AI Agent(Cursor、Claude Desktop、Windsurf等)中已配置Octagon MCP。安装说明请查看references/mcp-setup.md。
Workflow
操作流程
1. Identify Parameters
1. 确定参数
Determine your query parameters:
- Index Symbol: ^GSPC (S&P 500), ^DJI (Dow), ^IXIC (NASDAQ), etc.
- Start Date: Beginning of date range
- End Date: End of date range
明确你的查询参数:
- 指数代码: ^GSPC(标普500)、^DJI(道琼斯)、^IXIC(纳斯达克)等。
- 开始日期: 日期范围的起始时间
- 结束日期: 日期范围的结束时间
2. Execute Query via Octagon MCP
2. 通过Octagon MCP执行查询
Use the tool with a natural language prompt:
octagon-agentRetrieve full historical end-of-day price data for the <INDEX> index from <START_DATE> to <END_DATE>.MCP Call Format:
json
{
"server": "octagon-mcp",
"toolName": "octagon-agent",
"arguments": {
"prompt": "Retrieve full historical end-of-day price data for the ^GSPC index from 2025-01-01 to 2025-04-30."
}
}使用工具,配合自然语言提示词:
octagon-agentRetrieve full historical end-of-day price data for the <INDEX> index from <START_DATE> to <END_DATE>.MCP调用格式:
json
{
"server": "octagon-mcp",
"toolName": "octagon-agent",
"arguments": {
"prompt": "Retrieve full historical end-of-day price data for the ^GSPC index from 2025-01-01 to 2025-04-30."
}
}3. Expected Output
3. 预期输出
The agent returns comprehensive daily index data:
| Date | Open | High | Low | Close | Volume | Change | Change % | VWAP |
|---|---|---|---|---|---|---|---|---|
| 2025-04-30 | 5,499.44 | 5,581.84 | 5,433.24 | 5,569.07 | 5.45B | +69.63 | +1.27% | 5,520.90 |
| 2025-04-29 | 5,508.87 | 5,571.95 | 5,505.70 | 5,560.82 | 4.75B | +51.95 | +0.94% | 5,536.84 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
Key Statistics:
- Highest single-day volume: 9.49B on 2025-04-09
- Largest daily gain: +9.90% on 2025-04-09
- Largest daily loss: -4.12% on 2025-04-04
- Trading days covered: 79
Data Sources: octagon-stock-data-agent
Agent会返回全面的每日指数数据:
| 日期 | 开盘价 | 最高价 | 最低价 | 收盘价 | 成交量 | 涨跌点数 | 涨跌幅 | VWAP |
|---|---|---|---|---|---|---|---|---|
| 2025-04-30 | 5,499.44 | 5,581.84 | 5,433.24 | 5,569.07 | 5.45B | +69.63 | +1.27% | 5,520.90 |
| 2025-04-29 | 5,508.87 | 5,571.95 | 5,505.70 | 5,560.82 | 4.75B | +51.95 | +0.94% | 5,536.84 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
关键统计数据:
- 单日最高成交量:2025-04-09日的9.49B
- 单日最大涨幅:2025-04-09日的+9.90%
- 单日最大跌幅:2025-04-04日的-4.12%
- 覆盖交易日:79天
数据来源: octagon-stock-data-agent
4. Interpret Results
4. 解读结果
See references/interpreting-results.md for guidance on:
- Analyzing index price trends
- Calculating period returns
- Understanding volume patterns
- Identifying significant market moves
关于以下内容的指导,请查看references/interpreting-results.md:
- 分析指数价格趋势
- 计算区间回报率
- 理解成交量形态
- 识别重大市场波动
Example Queries
查询示例
S&P 500 History:
Retrieve full historical end-of-day price data for the ^GSPC index from 2025-01-01 to 2025-04-30.NASDAQ Composite:
Get historical data for ^IXIC from 2024-01-01 to 2024-12-31.Dow Jones:
Show ^DJI historical prices for Q1 2025.Russell 2000:
Retrieve historical data for ^RUT from 2024-06-01 to 2025-06-01.Multiple Indices:
Compare ^GSPC and ^IXIC performance from 2025-01-01 to 2025-03-31.标普500历史数据:
Retrieve full historical end-of-day price data for the ^GSPC index from 2025-01-01 to 2025-04-30.纳斯达克综合指数:
Get historical data for ^IXIC from 2024-01-01 to 2024-12-31.道琼斯指数:
Show ^DJI historical prices for Q1 2025.罗素2000指数:
Retrieve historical data for ^RUT from 2024-06-01 to 2025-06-01.多指数对比:
Compare ^GSPC and ^IXIC performance from 2025-01-01 to 2025-03-31.Common Index Symbols
常用指数代码
US Major Indices
美国主要指数
| Symbol | Index | Description |
|---|---|---|
| ^GSPC | S&P 500 | 500 large-cap US stocks |
| ^DJI | Dow Jones | 30 blue-chip stocks |
| ^IXIC | NASDAQ Composite | All NASDAQ stocks |
| ^NDX | NASDAQ 100 | 100 largest NASDAQ |
| ^RUT | Russell 2000 | 2000 small-cap stocks |
| 代码 | 指数 | 说明 |
|---|---|---|
| ^GSPC | 标普500 | 500只美国大盘股 |
| ^DJI | 道琼斯 | 30只蓝筹股 |
| ^IXIC | 纳斯达克综合指数 | 所有纳斯达克上市股票 |
| ^NDX | 纳斯达克100 | 100只最大的纳斯达克股票 |
| ^RUT | 罗素2000 | 2000只美国小盘股 |
Sector Indices
行业指数
| Symbol | Index | Description |
|---|---|---|
| ^XLK | Technology | Tech sector |
| ^XLF | Financials | Financial sector |
| ^XLV | Healthcare | Healthcare sector |
| ^XLE | Energy | Energy sector |
| ^XLI | Industrials | Industrial sector |
| 代码 | 指数 | 说明 |
|---|---|---|
| ^XLK | 科技行业指数 | 科技板块 |
| ^XLF | 金融行业指数 | 金融板块 |
| ^XLV | 医疗行业指数 | 医疗板块 |
| ^XLE | 能源行业指数 | 能源板块 |
| ^XLI | 工业行业指数 | 工业板块 |
Volatility Indices
波动率指数
| Symbol | Index | Description |
|---|---|---|
| ^VIX | VIX | Market volatility |
| ^VXN | VXN | NASDAQ volatility |
| 代码 | 指数 | 说明 |
|---|---|---|
| ^VIX | VIX指数 | 市场波动率 |
| ^VXN | VXN指数 | 纳斯达克波动率 |
Understanding Index Data
指数数据解读
Price Components
价格构成
| Field | Description |
|---|---|
| Open | First trade price of day |
| High | Highest price of day |
| Low | Lowest price of day |
| Close | Last trade price of day |
| Volume | Total shares traded |
| Change | Point change from prior close |
| Change % | Percentage change |
| VWAP | Volume-weighted average price |
| 字段 | 说明 |
|---|---|
| Open | 当日第一笔成交价 |
| High | 当日最高价 |
| Low | 当日最低价 |
| Close | 当日最后一笔成交价 |
| Volume | 总成交量 |
| Change | 较前一日收盘价的涨跌点数 |
| Change % | 涨跌幅百分比 |
| VWAP | 成交量加权平均价 |
Daily Range Analysis
每日区间分析
| Metric | Calculation |
|---|---|
| Daily Range | High - Low |
| Range % | (High - Low) / Open |
| Position in Range | (Close - Low) / (High - Low) |
| 指标 | 计算公式 |
|---|---|
| 当日区间 | 最高价 - 最低价 |
| 区间百分比 | (最高价 - 最低价) / 开盘价 |
| 收盘价区间位置 | (收盘价 - 最低价) / (最高价 - 最低价) |
Return Calculations
回报率计算
Period Returns
区间回报率
| Period | Formula |
|---|---|
| Daily | (Close - Prior Close) / Prior Close |
| Weekly | (Friday Close - Monday Open) / Monday Open |
| Monthly | (Month End - Month Start) / Month Start |
| YTD | (Current - Year Start) / Year Start |
| 周期 | 公式 |
|---|---|
| 单日 | (收盘价 - 前一日收盘价) / 前一日收盘价 |
| 周度 | (周五收盘价 - 周一开盘价) / 周一开盘价 |
| 月度 | (月末收盘价 - 月初开盘价) / 月初开盘价 |
| 年初至今 | (当前收盘价 - 年初开盘价) / 年初开盘价 |
Example
示例
From the data:
- Start (Jan 2): 5,868.56
- End (Apr 30): 5,569.07
- Return: (5,569.07 - 5,868.56) / 5,868.56 = -5.10%
根据数据:
- 起始(1月2日):5,868.56
- 结束(4月30日):5,569.07
- 回报率:(5,569.07 - 5,868.56) / 5,868.56 = -5.10%
Cumulative Returns
累计回报率
Cumulative = (1 + r1) × (1 + r2) × ... × (1 + rn) - 1Cumulative = (1 + r1) × (1 + r2) × ... × (1 + rn) - 1Volume Analysis
成交量分析
Volume Patterns
成交量形态
| Pattern | Interpretation |
|---|---|
| High volume + up | Strong buying |
| High volume + down | Strong selling |
| Low volume + up | Weak rally |
| Low volume + down | Lack of sellers |
| 形态 | 解读 |
|---|---|
| 高成交量 + 上涨 | 买盘强劲 |
| 高成交量 + 下跌 | 卖盘强劲 |
| 低成交量 + 上涨 | 反弹乏力 |
| 低成交量 + 下跌 | 卖盘不足 |
Volume Metrics
成交量指标
| Metric | Purpose |
|---|---|
| Average daily volume | Baseline |
| Volume spike | Unusual activity |
| Volume trend | Participation changes |
| 指标 | 用途 |
|---|---|
| 日均成交量 | 基准参考 |
| 成交量突增 | 异常活动 |
| 成交量趋势 | 参与度变化 |
Example
示例
From the data:
- Highest volume: 9.49B on 2025-04-09
- This coincided with +9.90% gain (major rally)
根据数据:
- 最高成交量:2025-04-09日的9.49B
- 当日同时出现+9.90%的涨幅(大幅反弹)
Trend Analysis
趋势分析
Trend Identification
趋势识别
| Pattern | Characteristics |
|---|---|
| Uptrend | Higher highs, higher lows |
| Downtrend | Lower highs, lower lows |
| Consolidation | Range-bound |
| Reversal | Trend change |
| 形态 | 特征 |
|---|---|
| 上升趋势 | 更高的高点,更高的低点 |
| 下降趋势 | 更低的高点,更低的低点 |
| 盘整 | 区间震荡 |
| 反转 | 趋势改变 |
Moving Averages
移动平均线
| MA | Use |
|---|---|
| 50-day | Short-term trend |
| 200-day | Long-term trend |
| Golden Cross | 50 > 200 (bullish) |
| Death Cross | 50 < 200 (bearish) |
| MA | 用途 |
|---|---|
| 50日均线 | 短期趋势判断 |
| 200日均线 | 长期趋势判断 |
| 黄金交叉 | 50日均线上穿200日均线(看涨) |
| 死亡交叉 | 50日均线下穿200日均线(看跌) |
Volatility Analysis
波动率分析
Measuring Volatility
波动率衡量
| Metric | Calculation |
|---|---|
| Daily Range % | (High - Low) / Close |
| Daily Change | Absolute daily change |
| Std Deviation | Dispersion of returns |
| 指标 | 计算公式 |
|---|---|
| 当日区间百分比 | (最高价 - 最低价) / 收盘价 |
| 当日涨跌 | 单日涨跌绝对值 |
| 标准差 | 回报率的离散程度 |
Volatility Context
波动率场景
| Daily Change % | Market Condition |
|---|---|
| <0.5% | Low volatility |
| 0.5-1% | Normal |
| 1-2% | Elevated |
| >2% | High volatility |
| >4% | Extreme |
| 单日涨跌幅% | 市场状态 |
|---|---|
| <0.5% | 低波动率 |
| 0.5-1% | 正常 |
| 1-2% | 较高波动率 |
| >2% | 高波动率 |
| >4% | 极端波动率 |
Example
示例
From the data:
- Largest gain: +9.90%
- Largest loss: -4.12%
- Range: 14.02%
- Interpretation: Period of elevated volatility
根据数据:
- 最大涨幅:+9.90%
- 最大跌幅:-4.12%
- 区间范围:14.02%
- 解读: 该时段波动率较高
Key Market Events
关键市场事件
Identifying Significant Days
识别关键交易日
| Criteria | Threshold |
|---|---|
| Big up day | >2% gain |
| Big down day | >2% loss |
| Volume spike | >2x average |
| Range expansion | >2x normal range |
| 标准 | 阈值 |
|---|---|
| 大幅上涨日 | 涨幅>2% |
| 大幅下跌日 | 跌幅>2% |
| 成交量突增 | 成交量>日均2倍 |
| 区间扩大 | 区间>正常区间2倍 |
Event Analysis
事件分析
| From Data | Event |
|---|---|
| +9.90% on Apr 9 | Major rally |
| -4.12% on Apr 4 | Significant selloff |
| 9.49B volume | Highest participation |
| 数据表现 | 事件 |
|---|---|
| 4月9日+9.90% | 大幅反弹 |
| 4月4日-4.12% | 显著抛售 |
| 9.49B成交量 | 市场参与度最高 |
Benchmarking Use
基准对比应用
Stock vs. Index
个股与指数对比
| Comparison | Formula |
|---|---|
| Alpha | Stock Return - Index Return |
| Beta | Stock Vol / Index Vol × Correlation |
| Relative Strength | Stock / Index |
| 对比项 | 公式 |
|---|---|
| Alpha(阿尔法) | 个股回报率 - 指数回报率 |
| Beta(贝塔) | 个股波动率 / 指数波动率 × 相关性 |
| 相对强度 | 个股价格 / 指数价格 |
Example Use
示例应用
- Your stock returned +15%
- S&P 500 returned -5.10%
- Alpha: +20.10% outperformance
- 你的个股回报率为+15%
- 标普500回报率为-5.10%
- Alpha:+20.10%(跑赢市场)
Common Use Cases
常见使用场景
Market Context
市场背景查询
What was the overall market doing when my stock fell?我的个股下跌时,整体市场表现如何?Return Comparison
回报率对比
How did the S&P 500 perform in Q1 2025?2025年第一季度标普500表现如何?Volatility Assessment
波动率评估
What were the biggest up and down days for the market in 2024?2024年市场最大的上涨和下跌交易日是哪几天?Trend Analysis
趋势分析
Is the market in an uptrend or downtrend?当前市场处于上升趋势还是下降趋势?Volume Analysis
成交量分析
What were the highest volume days for the S&P 500?标普500成交量最高的交易日是哪几天?Analysis Tips
分析技巧
-
Use for context: Index performance explains stock moves.
-
Calculate alpha: Your returns vs. market.
-
Watch volume: High volume days are significant.
-
Track extremes: Big up/down days signal sentiment.
-
Compare indices: Different indices, different signals.
-
Consider VIX: Volatility index for fear gauge.
-
用于背景参考: 指数表现可以解释个股波动。
-
计算Alpha: 你的回报率与市场回报率对比。
-
关注成交量: 高成交量交易日具有重要意义。
-
追踪极端情况: 大幅涨跌交易日反映市场情绪。
-
对比不同指数: 不同指数传递不同信号。
-
参考VIX: 波动率指数可作为市场恐慌指标。
Integration with Other Skills
与其他技能集成
| Skill | Combined Use |
|---|---|
| stock-performance | Stock vs. index comparison |
| sector-performance-snapshot | Sector vs. index |
| stock-quote | Current vs. historical |
| historical-market-cap | Market cap vs. index |
| 技能 | 组合用途 |
|---|---|
| stock-performance | 个股与指数对比 |
| sector-performance-snapshot | 行业与指数对比 |
| stock-quote | 当前价格与历史价格对比 |
| historical-market-cap | 市值与指数对比 |