Loading...
Loading...
Compare original and translation side by side
!`python3 -c "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "YFINANCE_NOT_INSTALLED"`YFINANCE_NOT_INSTALLEDimport subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])!`python3 -c "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "YFINANCE_NOT_INSTALLED"`YFINANCE_NOT_INSTALLEDimport subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])import yfinance as yf
import pandas as pd
from datetime import datetime, timedelta
ticker = yf.Ticker("AAPL") # replace with actual tickerimport yfinance as yf
import pandas as pd
from datetime import datetime, timedelta
ticker = yf.Ticker("AAPL") # 替换为实际股票代码undefinedundefined| Data Source | Key Fields | Purpose |
|---|---|---|
| epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss result |
| TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS | Actual financials |
| Close prices around earnings date | Stock price reaction |
| currentPrice, marketCap, forwardPE | Current context |
| Recent headlines | Earnings-related news |
| 数据源 | 关键字段 | 用途 |
|---|---|---|
| epsEstimate, epsActual, epsDifference, surprisePercent | 业绩超出/低于预期结果 |
| TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS | 实际财务数据 |
| 财报日期前后的收盘价 | 股价反应 |
| currentPrice, marketCap, forwardPE | 当前市场背景 |
| 近期头条 | 财报相关新闻 |
earnings_historyearnings_historyimport numpy as npimport numpy as np
**Note**: The exact reaction window depends on when the company reported (before market open vs after close). The price data will reflect this — look for the biggest gap between consecutive closes near the earnings date.
---
**注意**:具体的反应窗口取决于公司财报的发布时间(盘前 vs 盘后),价格数据会反映这一点——请在财报日期附近寻找连续收盘价之间的最大缺口。
---| Metric | Estimate | Actual | Surprise |
|---|---|---|---|
| EPS | $1.35 | $1.40 | +$0.05 (+3.7%) |
earnings_history| 指标 | 预期 | 实际 | 超预期幅度 |
|---|---|---|---|
| EPS | $1.35 | $1.40 | +$0.05 (+3.7%) |
earnings_historyquarterly_income_stmt| Quarter | Revenue | YoY Growth | Gross Margin | Operating Margin | EPS |
|---|---|---|---|---|---|
| Q3 2024 | $94.3B | +5.4% | 46.2% | 30.1% | $1.40 |
| Q2 2024 | $85.8B | +4.9% | 46.0% | 29.8% | $1.33 |
| Q1 2024 | $119.6B | +2.1% | 45.9% | 33.5% | $2.18 |
| Q4 2023 | $89.5B | -0.3% | 45.2% | 29.2% | $1.26 |
quarterly_income_stmt| 季度 | 营收 | 同比增速 | 毛利率 | 运营利润率 | EPS |
|---|---|---|---|---|---|
| Q3 2024 | $94.3B | +5.4% | 46.2% | 30.1% | $1.40 |
| Q2 2024 | $85.8B | +4.9% | 46.0% | 29.8% | $1.33 |
| Q1 2024 | $119.6B | +2.1% | 45.9% | 33.5% | $2.18 |
| Q4 2023 | $89.5B | -0.3% | 45.2% | 29.2% | $1.26 |
earnings_historyearnings_historyearnings_historyrecommendationsearnings_historyrecommendationsreferences/api_reference.mdreferences/api_reference.md