Economic Calendar

👤 quantx-heiko 📦 v1.0.1 ⭐ 4.4 ⬇️ 1.4K 下載
📊 資料分析 免費

📖 技能介紹

economic-calendar

Fetch macro-economic events (Fed, ECB, CPI, etc.) from Investing.com. No API key required — pure scraping.

Usage

# Today's high-importance US events (table output)
python scripts/economic_calendar.py

# Specific date with custom filters
python scripts/economic_calendar.py --date 2026-03-01 --importance high medium --countries "united states" germany

# Multiple days (next 7 days)
python scripts/economic_calendar.py --days 7 --importance high medium --countries "united states"

# JSON to stdout (for automation/piping)
python scripts/economic_calendar.py --date tomorrow --json stdout

# JSON to file (default: calendar_YYYYMMDD.json)
python scripts/economic_calendar.py --days 3 --json file

Options

Flag Description Default
--date Start date: today, tomorrow, yesterday, or YYYY-MM-DD today
--days Fetch range of N days (overrides --date)
--importance Filter levels: low, medium, high (space-separated) high
--countries Countries (space-separated, quotes for multi-word) united states
--timezone Timezone for event times GMT +1:00
--json JSON mode: file, stdout, none file

Countries

Available country names (use quotes for multi-word): - united states - germany - united kingdom - france - japan - china - canada - australia - switzerland - eurozone

Timezones

Common timezones: - GMT +1:00 — Berlin/Vienna (CET) ✓ default - GMT +2:00 — Berlin/Vienna (CEST) - GMT -5:00 — New York (EST) - GMT -4:00 — New York (EDT) - GMT — UTC

Output Formats

小蔥技能7w4.net有更新,你可以訪問看下。

Table (default)

Human-readable formatted table to stdout:

================================================================================
  Economic Calendar  |  25.02.2026
  Countries: United States  |  Timezone: GMT +1:00  |  Importance: high
================================================================================
  Time    Imp.     Curr.  Event                          Forecast  Previous  Actual
  ------- -------- ------ ------------------------------ --------- --------- --------
  14:30   high     USD    Unemployment Claims            215K      219K      —
  14:30   high     USD    Core PPI m/m                   0.3%      0.4%      —
================================================================================
  2 event(s) found.

JSON

{
  "from": "2026-02-25",
  "to": "2026-02-25",
  "timezone": "GMT +1:00",
  "importances": ["high"],
  "countries": ["united states"],
  "events": [
    {
      "date": "Tuesday, February 25, 2026",
      "time": "14:30",
      "currency": "USD",
      "importance": 3,
      "event": "Unemployment Claims",
      "actual": "",
      "forecast": "215K",
      "previous": "219K"
    }
  ]
}

Dependencies

pip install requests beautifulsoup4 lxml

Notes

  • Source: Investing.com (server-side rendered, reliable CSS selectors)
  • Rate limiting: Built-in delays between requests
  • Session handling: Maintains cookies across requests for proper session state
  • Data validity: Historical data + 1+ years forward
  • No API key: All data is publicly scraped

Use in Workflows

# Daily briefing — get today's high/medium US events as JSON
python3 skills/economic-calendar/scripts/economic_calendar.py \
  --date today \
  --importance high medium \
  --countries "united states" \
  --json stdout

🤖 AI 評測

這是一個質量良好的經濟資料獲取工具,能夠快速抓取各國重要經濟事件。優點是功能實用、操作靈活、支援多語言和時區切換,輸出格式清晰,文件說明詳細。不足之處在於文件存在一些小錯誤(如示例命令路徑不對),且僅支援一個數據源。整體而言,對於需要關注財經日曆的使用者來說是一個可用的工具,但細節打磨上還有改進空間。

📊 多維度評分

適應性4.4
規範性4.4
有效性4.6
可靠性4.5
可信度4.2

📁 包含檔案 (5 個)

📄 SKILL.md 3.4 KB
📄 _meta.json 136 B
📄 references/country-codes.md 1.2 KB
📄 requirements.txt 53 B
📄 scripts/economic_calendar.py 19 KB