QuantConnect / QuantConnect/Lean

Add FXMacroData macro custom data example

Open
#9,603 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Expected Behavior

LEAN should include a Python custom data example showing how to import public FXMacroData macroeconomic data without requiring credentials.

The example should demonstrate:

  • USD macro indicator history from FXMacroData announcements
  • USD release calendar rows with consensus, forecast, and source metadata
  • human-readable announcement datetimes for point-in-time backtests
  • parser coverage through fixture-based unit tests so CI does not depend on live network calls
Actual Behavior

LEAN has general Python custom data examples, but no FXMacroData example for macroeconomic indicators or official release-calendar data.

Potential Solution

Add a Python algorithm example with PythonData classes for FXMacroData public USD macro data:

  • FXMacroDataMacroIndicator for /v1/announcements/usd/{indicator}
  • FXMacroDataReleaseCalendar for /v1/calendar/usd

The first contribution would intentionally use public USD/no-key endpoints so maintainers and users can run the example without secrets. Authenticated FX spot history, COT positioning, commodities, broader currency coverage, market sessions, and seasonality can be considered as follow-up examples if this public baseline is accepted.

Checklist
  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Python custom-data examples and PythonData entry points, then review the public /v1/announcements/usd/{indicator} and /v1/calendar/usd endpoints described in the issue. Implement the two named data classes and fixture-based parser tests, covering indicator history, release-calendar metadata, and human-readable announcement datetimes without live network calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.