Skip to content

Add FXMacroData price and macro feature collectors#2293

Draft
roberttidball wants to merge 4 commits into
microsoft:mainfrom
roberttidball:agent/fxmacrodata-collector
Draft

Add FXMacroData price and macro feature collectors#2293
roberttidball wants to merge 4 commits into
microsoft:mainfrom
roberttidball:agent/fxmacrodata-collector

Conversation

@roberttidball

@roberttidball roberttidball commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • keep the existing FXMacroData daily FX spot-rate collector
  • add download_macro_data for FXMacroData announcements, release calendars, and prediction groups
  • add download_catalogue so qlib users can discover currency/indicator coverage before building macro feature sets
  • add macro normalization for qlib numeric feature tables
  • document canonical API usage, API-key access, subscribed multi-currency workflows, and point-in-time backtest guidance
  • add focused mocked tests for macro flattening, catalogue metadata, canonical URLs, and subscription-oriented auth errors

Notes

Macro datasets use symbols such as usd_inflation and include numeric features such as value, actual, consensus, forecast, surprise, prediction, prediction_count, announcement_datetime, and is_future. This makes FXMacroData usable for macro-event features, not only OHLCV-shaped FX spot rates.

The collector defaults to https://api.fxmacrodata.com/v1. Users can use public catalogue/calendar/evaluation endpoints without a key, then subscribe at https://fxmacrodata.com/subscribe when they need broader history, higher request budgets, non-USD announcement history, COT, commodities, or other protected datasets.

Validation

  • python -m py_compile scripts\data_collector\fxmacrodata\collector.py tests\misc\test_fxmacrodata_collector.py
  • python -m pytest tests\misc\test_fxmacrodata_collector.py -q (5 passed)
  • python -m black --check -l 120 scripts\data_collector\fxmacrodata\collector.py tests\misc\test_fxmacrodata_collector.py
  • python -m flake8 --ignore=E501,F541,E266,E402,W503,E731,E203 scripts\data_collector\fxmacrodata\collector.py tests\misc\test_fxmacrodata_collector.py (isolated temp install)
  • git diff --check
  • Live smoke: download_catalogue --currencies usd --include_coverage true returned USD indicator rows with coverage metadata

@roberttidball roberttidball changed the title Add FXMacroData data collector Add FXMacroData price and macro feature collectors Jul 8, 2026
@roberttidball

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree company="FXMacroData"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant