$npx -y skills add mphinance/alpha-skills --skill economic-calendar-fetcherFetch upcoming economic events and data releases using FMP API. Retrieve scheduled central bank decisions, employment reports, inflation data, GDP releases, and other market-moving economic indicators for specified date ranges (default: next 7 days). The script outputs raw JSON o
| 1 | # Economic Calendar Fetcher |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Retrieve upcoming economic events and data releases from the Financial Modeling Prep (FMP) Economic Calendar API. This skill fetches scheduled economic indicators including central bank monetary policy decisions, employment reports, inflation data (CPI/PPI), GDP releases, retail sales, manufacturing data, and other market-moving events that impact financial markets. |
| 6 | |
| 7 | The skill uses a Python script to query the FMP API and returns raw JSON or text output. The assistant then filters events, assesses market impact, and generates a chronological Markdown report for each scheduled event. No files are generated automatically. |
| 8 | |
| 9 | **Key Capabilities:** |
| 10 | - Fetch economic events for specified date ranges (max 90 days) |
| 11 | - Support flexible API key provision (environment variable or CLI argument) |
| 12 | - Filter by impact level, country, or event type (filtering performed by the assistant) |
| 13 | - Present filtered results as structured Markdown reports with impact analysis (assistant-generated, not script-generated) |
| 14 | - Default to next 7 days for quick market outlook |
| 15 | |
| 16 | **Data Source:** |
| 17 | - FMP Economic Calendar API: `https://financialmodelingprep.com/api/v3/economic_calendar` |
| 18 | - Covers major economies: US, EU, UK, Japan, China, Canada, Australia |
| 19 | - Event types: Central bank decisions, employment, inflation, GDP, trade, housing, surveys |
| 20 | |
| 21 | ## When to Use This Skill |
| 22 | |
| 23 | Use this skill when the user requests: |
| 24 | |
| 25 | 1. **Economic Calendar Queries:** |
| 26 | - "What economic events are coming up this week?" |
| 27 | - "Show me the economic calendar for the next two weeks" |
| 28 | - "When is the next FOMC meeting?" |
| 29 | - "What major economic data is being released next month?" |
| 30 | |
| 31 | 2. **Market Event Planning:** |
| 32 | - "What should I watch for in the markets this week?" |
| 33 | - "Are there any high-impact economic releases coming?" |
| 34 | - "When is the next jobs report / CPI release / GDP report?" |
| 35 | |
| 36 | 3. **Specific Date Range Requests:** |
| 37 | - "Get economic events from January 1 to January 31" |
| 38 | - "What's on the economic calendar for Q1 2025?" |
| 39 | |
| 40 | 4. **Country-Specific Queries:** |
| 41 | - "Show me US economic data releases next week" |
| 42 | - "What ECB events are scheduled?" |
| 43 | - "When is Japan releasing their inflation data?" |
| 44 | |
| 45 | **DO NOT use this skill for:** |
| 46 | - Past economic events (use market-news-analyst for historical analysis) |
| 47 | - Corporate earnings calendars (this skill excludes earnings) |
| 48 | - Real-time market data or live quotes |
| 49 | - Technical analysis or chart interpretation |
| 50 | |
| 51 | ## Prerequisites |
| 52 | |
| 53 | - **FMP API Key** (required): Sign up at https://financialmodelingprep.com for a free key (250 requests/day). Set via `FMP_API_KEY` environment variable or pass `--api-key` to the script. |
| 54 | - **Python 3.10+**: Required to run `skills/economic-calendar-fetcher/scripts/get_economic_calendar.py`. |
| 55 | - **No third-party packages**: The script uses only the Python standard library. |
| 56 | |
| 57 | ## Workflow |
| 58 | |
| 59 | Follow these steps to fetch and analyze the economic calendar: |
| 60 | |
| 61 | ### Step 1: Obtain FMP API Key |
| 62 | |
| 63 | **Check for API key availability (in priority order):** |
| 64 | |
| 65 | 1. **Recommended:** Check if `FMP_API_KEY` environment variable is set — this keeps the key out of session logs |
| 66 | 2. **Acceptable:** Use `--api-key` CLI argument for one-off runs |
| 67 | 3. **Not recommended:** Asking the user to paste the key into chat — session logs may retain it |
| 68 | 4. If user doesn't have an API key, provide instructions: |
| 69 | - Visit https://financialmodelingprep.com |
| 70 | - Sign up for free account (250 requests/day limit) |
| 71 | - Navigate to API dashboard to obtain key |
| 72 | |
| 73 | **Example user interaction:** |
| 74 | ``` |
| 75 | User: "Show me economic events for next week" |
| 76 | Assistant: "I'll fetch the economic calendar. I'll use the FMP_API_KEY environment variable if it's set. Otherwise, please pass the key via --api-key when running the script." |
| 77 | ``` |
| 78 | |
| 79 | ### Step 2: Determine Date Range |
| 80 | |
| 81 | **Set appropriate date range based on user request:** |
| 82 | |
| 83 | **Default (no specific dates):** Today + 7 days |
| 84 | **User specifies period:** Use exact dates (validate format: YYYY-MM-DD) |
| 85 | **Maximum range:** 90 days (FMP API limitation) |
| 86 | |
| 87 | **Examples:** |
| 88 | - "Next week" → Today to +7 days |
| 89 | - "Next two weeks" → Today to +14 days |
| 90 | - "January 2025" → 2025-01-01 to 2025-01-31 |
| 91 | - "Q1 2025" → 2025-01-01 to 2025-03-31 |
| 92 | |
| 93 | **Validate date range:** |
| 94 | - Ensure start date ≤ end date |
| 95 | - Ensure range ≤ 90 days |
| 96 | - Warn if querying past dates |
| 97 | |
| 98 | ### Step 3: Execute API Fetch Script |
| 99 | |
| 100 | **Run the get_economic_calendar.py script with appropriate parameters:** |
| 101 | |
| 102 | **Basic usage (default 7 days):** |
| 103 | ```bash |
| 104 | python3 skills/economic-calendar-fetcher/scripts/get_economic_calendar.py --api-key YOUR_KEY |
| 105 | ``` |
| 106 | |
| 107 | **With specific date range:* |