ml4t-data 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/PKG-INFO +22 -7
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/README.md +2 -3
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/pyproject.toml +18 -6
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/scripts/verify_distribution.py +26 -2
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/_version.py +2 -2
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/batch.py +6 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/config/models.py +1 -0
- ml4t_data-0.4.0/src/ml4t/data/core/overlap.py +123 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/data_manager.py +1 -1
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/batch_manager.py +4 -4
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/provider_manager.py +9 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/storage_manager.py +26 -3
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/provider_updater.py +35 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/__init__.py +2 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/alpaca.py +224 -8
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/base.py +8 -2
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/binance_public.py +12 -3
- ml4t_data-0.4.0/src/ml4t/data/providers/coinmetrics.py +233 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/polymarket.py +100 -105
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/registry.py +9 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/yahoo.py +65 -17
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/update_manager.py +37 -0
- ml4t_data-0.4.0/tests/fixtures/coinmetrics_candles.json +33 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_yahoo.py +11 -0
- ml4t_data-0.4.0/tests/providers/fixtures/polymarket/data_api_v2_trades.json +304 -0
- ml4t_data-0.4.0/tests/providers/test_coinmetrics_acquisition.py +352 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/test_polymarket_history.py +55 -44
- ml4t_data-0.4.0/tests/providers/test_polymarket_v2.py +124 -0
- ml4t_data-0.4.0/tests/test_adjusted_history_update.py +69 -0
- ml4t_data-0.4.0/tests/test_alpaca_batch_contract.py +120 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_alpaca_provider.py +179 -0
- ml4t_data-0.4.0/tests/test_alpaca_sip_boundaries.py +90 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_async_rate_limit.py +31 -23
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_binance_public_provider.py +30 -0
- ml4t_data-0.4.0/tests/test_config_ohlc_update.py +51 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_data_manager_unit.py +11 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_distribution_verification.py +2 -1
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_incremental_update_system.py +4 -2
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_multi_asset.py +4 -3
- ml4t_data-0.4.0/tests/test_nasdaq_bars_example.py +135 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_package_metadata.py +7 -3
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_updater.py +3 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_release_pipeline.py +2 -2
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_release_workflows.py +1 -1
- ml4t_data-0.4.0/tests/test_storage_batch_date_bounds.py +48 -0
- ml4t_data-0.4.0/tests/test_update_adjustment_basis.py +339 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_update_manager.py +7 -3
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_yahoo_empty_download_reporting.py +130 -1
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_yahoo_provider.py +11 -4
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/.gitignore +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/LICENSE +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/scripts/verify_provider_contract_runs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/adjustments/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/adjustments/_history_factors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/adjustments/core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/adjustments/history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/adjustments/inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/anomaly/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/anomaly/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/anomaly/detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/anomaly/manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/asset_class.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/data/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/data/crypto_top100.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/data/forex_majors.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/data/nasdaq100.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/data/sp500.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/assets/validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/calendar/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/calendar/crypto.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/cot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/futures.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli/utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cli_interface.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/compat/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/compat/empyrical.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/compat/zipline.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/config/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/config/_serialization.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/config/loader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/config/validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/exceptions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/feeds.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/revisions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/core/schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cot/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cot/fetcher.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/cot/workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/crypto/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/crypto/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/etfs/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/etfs/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/formats/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/formats/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/formats/csv.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/formats/excel.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/formats/json.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/export/manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/adjustment.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/book_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/continuous.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/continuous_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/databento_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/definitions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/individual_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/roll.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/futures/schema.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/macro/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/macro/downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/async_batch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/bulk_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/config_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/fetch_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/managers/metadata_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/aqr.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/async_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/binance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/coingecko.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/databento.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/eodhd.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/fama_french.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/finnhub.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/forecastex.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/fred.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/fundamentals.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/fxmacrodata.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/kalshi.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/learned_synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/async_session.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/circuit_breaker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/session.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mixins/validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/mock.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/nasdaq_itch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/oanda.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/okx.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/polygon.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/polymarket_us.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/prediction_markets.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/protocols.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/tiingo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/twelve_data.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/providers/wiki_prices.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/py.typed +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/security/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/security/path_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/sessions/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/sessions/_cme_crypto.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/sessions/assigner.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/sessions/completer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/AGENTS.md +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/_temporal.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/async_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/backend.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/chunked.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/data_profile.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/flat.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/hive.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/keys.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/legacy_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/protocols.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/storage/snapshot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/synthetic/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/synthetic/ohlcv_utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/synthetic/registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/async_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/atomic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/conversion.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/format.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/gap_optimizer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/global_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/locking.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/utils/retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/cross_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/ohlcv.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/src/ml4t/data/validation/rules.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/_zipline_bundle_fixture.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/anomaly/test_base.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/anomaly/test_config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/anomaly/test_detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/anomaly/test_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/assets/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/assets/test_asset_class.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/assets/test_contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/assets/test_schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/assets/test_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/core/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/core/test_schemas.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/cot/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/cot/test_fetcher.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/cot/test_workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/F-F_Momentum_Factor_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/F-F_Momentum_Factor_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/F-F_Research_Data_5_Factors_2x3_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/F-F_Research_Data_Factors_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/F-F_Research_Data_Factors_daily_CSV.zip +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/famafrench-provider-response.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/fred-dgs3mo.csv +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/provenance.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/yahoo-adjustment-provider.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/fixtures/acquisition/yahoo-dst-provider.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_adjustment.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_book_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_continuous.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_databento_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_parser.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_prepared_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_roll.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/futures/test_scheduled_roll_workflow.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_alpaca.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_binance_public.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_coingecko.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_eodhd.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_factor_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_finnhub.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_forecastex.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_fred.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_fxmacrodata.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_kalshi.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_oanda.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_polygon.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_polymarket.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_polymarket_us.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_real_api_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_release_provider_contracts.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_tiingo.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_twelve_data.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/integration/test_wiki_prices.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/conftest.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/fixtures/polymarket/clob_prices_history.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/fixtures/polymarket/data_api_trades.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/fixtures/polymarket/gamma_keyset_active.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/fixtures/polymarket/gamma_keyset_closed.json +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/test_forecastex_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/test_kalshi_history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/test_nasdaq_itch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/providers/test_polymarket_us_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/storage/test_data_profile.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/storage/test_keys.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/storage/test_legacy_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/storage/test_metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/storage/test_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/synthetic/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/synthetic/test_learned_synthetic.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/synthetic/test_registry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_acquisition_atomic_flush.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_acquisition_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_acquisition_warning_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_action_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_adjusted_history.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_adjustments_core.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_anomaly/__init__.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_anomaly/test_detectors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_anomaly/test_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_aqr_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_aqr_provider_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_async_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_async_providers_extended.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_base_provider_enhanced.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_batch_load.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_batch_load_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_batch_load_performance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_binance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_binance_public_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_calendar_backfill_ranges.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_calendar_frame_bounds.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_chunked_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cli_batch.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cli_interface.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cme_crypto_cutover.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_coingecko_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config_basics.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config_loader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config_models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_config_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_configuration_authority.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_conversion.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_core_abstractions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_core_models.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_crypto_assets.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_crypto_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cryptocompare.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_cryptocompare_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_daily_session_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_daily_timestamp_declarations.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_data_manager.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_data_manager_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_data_manager_universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_databento_acceptance.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_databento_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_dated_inputs.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_eodhd_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_etf_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_exceptions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_export.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_fama_french_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_finnhub_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_fred_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_fundamentals_providers.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_fxmacrodata_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_gap_optimizer.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_global_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_global_rate_limiting.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_history_factors.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_history_identity.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_hive_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_import.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_ingestion_calendar_declarations.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_intraday_schedule_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_kalshi_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_locking.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_macro_downloader.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_market_input_handoff.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_metadata_tracker.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_mock_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_mock_provider_enhanced.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_oanda_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_offline_network_policy.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_okx_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_polygon_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_polymarket_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_portable_snapshot.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_portable_snapshot_example.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_preserve_market_absences.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_consistency.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_contract_verification.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_registration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_registry_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_provider_tls_trust.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_rate_limit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_regenerate_combined.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_retry.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_security.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_session_calendar_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_sessions.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_simple_utils.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_source_reference_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_storage.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_storage_backends.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_storage_config_authority.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_storage_migration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_storage_paths.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_stored_gap_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_synthetic_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_targeted_databento_acquisition.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_tiingo_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_twelve_data_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_universe.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_update_provider_reuse.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_utils_gaps.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation_calendar_contract.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation_rules.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation_simple.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_validation_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_wiki_prices_provider.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_yahoo_provider_edge_cases.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_yahoo_provider_unit.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/test_zipline_bundle_exchange.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/utils/test_format.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/utils/test_format_integration.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/validation/test_cross_validation.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/validation/test_ohlcv_validator.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/validation/test_report.py +0 -0
- {ml4t_data-0.3.0 → ml4t_data-0.4.0}/tests/validation/test_rules.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: ml4t-data
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Market data acquisition, storage, and update workflows for machine learning for trading.
|
|
5
5
|
Project-URL: Homepage, https://www.ml4trading.io/
|
|
6
6
|
Project-URL: Documentation, https://www.ml4trading.io/docs/data/
|
|
@@ -24,25 +24,29 @@ Classifier: Programming Language :: Python :: 3
|
|
|
24
24
|
Classifier: Programming Language :: Python :: 3.12
|
|
25
25
|
Classifier: Programming Language :: Python :: 3.13
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.14
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
27
28
|
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
28
29
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
29
30
|
Classifier: Typing :: Typed
|
|
30
|
-
Requires-Python: <3.
|
|
31
|
+
Requires-Python: <3.16,>=3.12
|
|
31
32
|
Requires-Dist: aiofiles>=23.0.0
|
|
32
33
|
Requires-Dist: certifi>=2026.10.19
|
|
33
34
|
Requires-Dist: click>=8.0.0
|
|
34
|
-
Requires-Dist: filelock>=
|
|
35
|
+
Requires-Dist: filelock>=4.2.1
|
|
35
36
|
Requires-Dist: httpx>=0.25.0
|
|
36
37
|
Requires-Dist: ml4t-specs>=0.2.0
|
|
37
38
|
Requires-Dist: numpy>=1.24.0
|
|
38
39
|
Requires-Dist: openpyxl>=3.1.5
|
|
39
|
-
Requires-Dist: pandas-market-calendars>=5.
|
|
40
|
+
Requires-Dist: pandas-market-calendars>=5.5.0
|
|
41
|
+
Requires-Dist: pandas-market-calendars>=5.6.0; python_version >= '3.15'
|
|
40
42
|
Requires-Dist: pandas>=2.0.0
|
|
41
43
|
Requires-Dist: platformdirs>=4.0.0
|
|
42
44
|
Requires-Dist: polars>=1.36.1
|
|
45
|
+
Requires-Dist: polars>=2.0.0; python_version >= '3.15'
|
|
43
46
|
Requires-Dist: pybreaker>=1.0.0
|
|
44
47
|
Requires-Dist: pydantic-settings>=2.0.0
|
|
45
48
|
Requires-Dist: pydantic<3,>=2.12
|
|
49
|
+
Requires-Dist: pydantic>=2.14.1; python_version >= '3.15'
|
|
46
50
|
Requires-Dist: python-dotenv>=1.0.0
|
|
47
51
|
Requires-Dist: pyyaml>=6.0
|
|
48
52
|
Requires-Dist: rich>=13.0.0
|
|
@@ -51,6 +55,7 @@ Requires-Dist: tenacity>=8.0.0
|
|
|
51
55
|
Provides-Extra: all
|
|
52
56
|
Requires-Dist: cot-reports>=0.1.0; extra == 'all'
|
|
53
57
|
Requires-Dist: databento>=0.38.0; extra == 'all'
|
|
58
|
+
Requires-Dist: databento>=0.90.0; (python_version >= '3.15') and extra == 'all'
|
|
54
59
|
Requires-Dist: hypothesis>=6.80.0; extra == 'all'
|
|
55
60
|
Requires-Dist: ipdb>=0.13.0; extra == 'all'
|
|
56
61
|
Requires-Dist: ipython>=8.14.0; extra == 'all'
|
|
@@ -61,6 +66,7 @@ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'all'
|
|
|
61
66
|
Requires-Dist: oandapyv20>=0.7.0; extra == 'all'
|
|
62
67
|
Requires-Dist: pre-commit>=3.3.0; extra == 'all'
|
|
63
68
|
Requires-Dist: pyarrow>=14.0.0; extra == 'all'
|
|
69
|
+
Requires-Dist: pyarrow>=26.0.0; (python_version >= '3.15') and extra == 'all'
|
|
64
70
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'all'
|
|
65
71
|
Requires-Dist: pytest-cov>=4.1.0; extra == 'all'
|
|
66
72
|
Requires-Dist: pytest-timeout>=2.1.0; extra == 'all'
|
|
@@ -68,21 +74,27 @@ Requires-Dist: pytest-xdist>=3.3.0; extra == 'all'
|
|
|
68
74
|
Requires-Dist: pytest>=7.4.0; extra == 'all'
|
|
69
75
|
Requires-Dist: requests>=2.32.0; extra == 'all'
|
|
70
76
|
Requires-Dist: ruff>=0.1.0; extra == 'all'
|
|
77
|
+
Requires-Dist: six>=1.17.0; extra == 'all'
|
|
71
78
|
Requires-Dist: ty; extra == 'all'
|
|
72
79
|
Requires-Dist: xlsxwriter>=3.1.0; extra == 'all'
|
|
73
80
|
Requires-Dist: yfinance>=1.5.2; extra == 'all'
|
|
74
81
|
Provides-Extra: all-providers
|
|
75
82
|
Requires-Dist: cot-reports>=0.1.0; extra == 'all-providers'
|
|
76
83
|
Requires-Dist: databento>=0.38.0; extra == 'all-providers'
|
|
84
|
+
Requires-Dist: databento>=0.90.0; (python_version >= '3.15') and extra == 'all-providers'
|
|
77
85
|
Requires-Dist: oandapyv20>=0.7.0; extra == 'all-providers'
|
|
78
86
|
Requires-Dist: pyarrow>=14.0.0; extra == 'all-providers'
|
|
87
|
+
Requires-Dist: pyarrow>=26.0.0; (python_version >= '3.15') and extra == 'all-providers'
|
|
79
88
|
Requires-Dist: requests>=2.32.0; extra == 'all-providers'
|
|
89
|
+
Requires-Dist: six>=1.17.0; extra == 'all-providers'
|
|
80
90
|
Requires-Dist: yfinance>=1.5.2; extra == 'all-providers'
|
|
81
91
|
Provides-Extra: cot
|
|
82
92
|
Requires-Dist: cot-reports>=0.1.0; extra == 'cot'
|
|
83
93
|
Provides-Extra: databento
|
|
84
94
|
Requires-Dist: databento>=0.38.0; extra == 'databento'
|
|
95
|
+
Requires-Dist: databento>=0.90.0; (python_version >= '3.15') and extra == 'databento'
|
|
85
96
|
Requires-Dist: pyarrow>=14.0.0; extra == 'databento'
|
|
97
|
+
Requires-Dist: pyarrow>=26.0.0; (python_version >= '3.15') and extra == 'databento'
|
|
86
98
|
Provides-Extra: dev
|
|
87
99
|
Requires-Dist: hypothesis>=6.80.0; extra == 'dev'
|
|
88
100
|
Requires-Dist: ipdb>=0.13.0; extra == 'dev'
|
|
@@ -95,6 +107,7 @@ Requires-Dist: pytest-timeout>=2.1.0; extra == 'dev'
|
|
|
95
107
|
Requires-Dist: pytest-xdist>=3.3.0; extra == 'dev'
|
|
96
108
|
Requires-Dist: pytest>=7.4.0; extra == 'dev'
|
|
97
109
|
Requires-Dist: ruff>=0.1.0; extra == 'dev'
|
|
110
|
+
Requires-Dist: six>=1.17.0; extra == 'dev'
|
|
98
111
|
Requires-Dist: ty; extra == 'dev'
|
|
99
112
|
Requires-Dist: xlsxwriter>=3.1.0; extra == 'dev'
|
|
100
113
|
Provides-Extra: docs
|
|
@@ -105,14 +118,17 @@ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == 'docs'
|
|
|
105
118
|
Provides-Extra: oanda
|
|
106
119
|
Requires-Dist: oandapyv20>=0.7.0; extra == 'oanda'
|
|
107
120
|
Requires-Dist: requests>=2.32.0; extra == 'oanda'
|
|
121
|
+
Requires-Dist: six>=1.17.0; extra == 'oanda'
|
|
108
122
|
Provides-Extra: yahoo
|
|
123
|
+
Requires-Dist: pyarrow>=14.0.0; extra == 'yahoo'
|
|
124
|
+
Requires-Dist: pyarrow>=26.0.0; (python_version >= '3.15') and extra == 'yahoo'
|
|
109
125
|
Requires-Dist: yfinance>=1.5.2; extra == 'yahoo'
|
|
110
126
|
Description-Content-Type: text/markdown
|
|
111
127
|
|
|
112
128
|
# ml4t-data
|
|
113
129
|
|
|
114
130
|
[](https://pypi.org/project/ml4t-data/)
|
|
115
|
-
[](https://www.python.org/downloads/)
|
|
116
132
|
[](LICENSE)
|
|
117
133
|
|
|
118
134
|
Market data acquisition, storage, and update workflows for machine learning for trading.
|
|
@@ -123,8 +139,7 @@ foreign exchange, crypto assets, macroeconomic series, factors, and prediction m
|
|
|
123
139
|
|
|
124
140
|
## Installation
|
|
125
141
|
|
|
126
|
-
`ml4t-data` supports CPython 3.12
|
|
127
|
-
temporarily excluded while upstream dependencies complete their compatibility work.
|
|
142
|
+
`ml4t-data` supports CPython 3.12 through 3.15 on Linux, macOS, and Windows.
|
|
128
143
|
|
|
129
144
|
```bash
|
|
130
145
|
pip install ml4t-data
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ml4t-data
|
|
2
2
|
|
|
3
3
|
[](https://pypi.org/project/ml4t-data/)
|
|
4
|
-
[](https://www.python.org/downloads/)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
7
|
Market data acquisition, storage, and update workflows for machine learning for trading.
|
|
@@ -12,8 +12,7 @@ foreign exchange, crypto assets, macroeconomic series, factors, and prediction m
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
-
`ml4t-data` supports CPython 3.12
|
|
16
|
-
temporarily excluded while upstream dependencies complete their compatibility work.
|
|
15
|
+
`ml4t-data` supports CPython 3.12 through 3.15 on Linux, macOS, and Windows.
|
|
17
16
|
|
|
18
17
|
```bash
|
|
19
18
|
pip install ml4t-data
|
|
@@ -69,17 +69,19 @@ classifiers = [
|
|
|
69
69
|
"Programming Language :: Python :: 3.12",
|
|
70
70
|
"Programming Language :: Python :: 3.13",
|
|
71
71
|
"Programming Language :: Python :: 3.14",
|
|
72
|
+
"Programming Language :: Python :: 3.15",
|
|
72
73
|
"Topic :: Office/Business :: Financial :: Investment",
|
|
73
74
|
"Topic :: Scientific/Engineering :: Information Analysis",
|
|
74
75
|
"Typing :: Typed",
|
|
75
76
|
]
|
|
76
|
-
requires-python = ">=3.12,<3.
|
|
77
|
+
requires-python = ">=3.12,<3.16"
|
|
77
78
|
|
|
78
79
|
# Core dependencies
|
|
79
80
|
dependencies = [
|
|
80
81
|
"ml4t-specs>=0.2.0",
|
|
81
82
|
# Data processing
|
|
82
83
|
"polars>=1.36.1",
|
|
84
|
+
"polars>=2.0.0; python_version >= '3.15'",
|
|
83
85
|
"pandas>=2.0.0",
|
|
84
86
|
"numpy>=1.24.0",
|
|
85
87
|
# HTTP and networking
|
|
@@ -93,14 +95,16 @@ dependencies = [
|
|
|
93
95
|
"python-dotenv>=1.0.0",
|
|
94
96
|
"pydantic-settings>=2.0.0",
|
|
95
97
|
"pydantic>=2.12,<3",
|
|
98
|
+
"pydantic>=2.14.1; python_version >= '3.15'",
|
|
96
99
|
# Utilities
|
|
97
100
|
"structlog>=23.0.0",
|
|
98
101
|
"platformdirs>=4.0.0",
|
|
99
|
-
"filelock>=
|
|
102
|
+
"filelock>=4.2.1",
|
|
100
103
|
"rich>=13.0.0",
|
|
101
104
|
"aiofiles>=23.0.0", # Async file I/O for async storage backends
|
|
102
105
|
# Exchange calendars for session-aware operations
|
|
103
|
-
"pandas-market-calendars>=5.
|
|
106
|
+
"pandas-market-calendars>=5.5.0",
|
|
107
|
+
"pandas-market-calendars>=5.6.0; python_version >= '3.15'",
|
|
104
108
|
"openpyxl>=3.1.5",
|
|
105
109
|
]
|
|
106
110
|
|
|
@@ -108,15 +112,20 @@ dependencies = [
|
|
|
108
112
|
# Provider-specific dependencies
|
|
109
113
|
yahoo = [
|
|
110
114
|
"yfinance>=1.5.2",
|
|
115
|
+
"pyarrow>=14.0.0",
|
|
116
|
+
"pyarrow>=26.0.0; python_version >= '3.15'",
|
|
111
117
|
]
|
|
112
118
|
databento = [
|
|
113
119
|
"databento>=0.38.0",
|
|
120
|
+
"databento>=0.90.0; python_version >= '3.15'",
|
|
114
121
|
"pyarrow>=14.0.0",
|
|
122
|
+
"pyarrow>=26.0.0; python_version >= '3.15'",
|
|
115
123
|
]
|
|
116
124
|
oanda = [
|
|
117
125
|
"oandapyV20>=0.7.0",
|
|
118
|
-
# oandapyV20 imports requests
|
|
126
|
+
# oandapyV20 imports requests and six without declaring them.
|
|
119
127
|
"requests>=2.32.0",
|
|
128
|
+
"six>=1.17.0",
|
|
120
129
|
]
|
|
121
130
|
cot = [
|
|
122
131
|
"cot-reports>=0.1.0", # CFTC Commitment of Traders data
|
|
@@ -141,6 +150,7 @@ dev = [
|
|
|
141
150
|
"pre-commit>=3.3.0",
|
|
142
151
|
"xlsxwriter>=3.1.0", # Excel export testing
|
|
143
152
|
"oandapyV20>=0.7.0", # OANDA provider tests/imports
|
|
153
|
+
"six>=1.17.0",
|
|
144
154
|
]
|
|
145
155
|
|
|
146
156
|
# Documentation dependencies (MkDocs Material with Picasso theme)
|
|
@@ -178,6 +188,10 @@ test = [
|
|
|
178
188
|
"xlsxwriter>=3.1.0",
|
|
179
189
|
"oandapyV20>=0.7.0",
|
|
180
190
|
"requests>=2.32.0",
|
|
191
|
+
"six>=1.17.0",
|
|
192
|
+
"databento>=0.38.0",
|
|
193
|
+
"databento>=0.90.0; python_version >= '3.15'",
|
|
194
|
+
"yfinance>=1.5.2",
|
|
181
195
|
]
|
|
182
196
|
dev = [
|
|
183
197
|
{ include-group = "test" },
|
|
@@ -185,8 +199,6 @@ dev = [
|
|
|
185
199
|
"pre-commit>=3.3.0",
|
|
186
200
|
"twine>=6.0.0",
|
|
187
201
|
"pip-audit>=2.10.1",
|
|
188
|
-
"databento>=0.38.0",
|
|
189
|
-
"yfinance>=1.5.2",
|
|
190
202
|
]
|
|
191
203
|
|
|
192
204
|
[tool.uv]
|
|
@@ -102,8 +102,8 @@ def validate_distributions(
|
|
|
102
102
|
for field, expected in expected_scalars.items():
|
|
103
103
|
if item[field] != expected:
|
|
104
104
|
raise ValueError(f"{field} is {item[field]!r}, expected {expected!r}")
|
|
105
|
-
if SpecifierSet(str(item["Requires-Python"])) != SpecifierSet(">=3.12,<3.
|
|
106
|
-
raise ValueError("Requires-Python differs from >=3.12,<3.
|
|
105
|
+
if SpecifierSet(str(item["Requires-Python"])) != SpecifierSet(">=3.12,<3.16"):
|
|
106
|
+
raise ValueError("Requires-Python differs from >=3.12,<3.16")
|
|
107
107
|
project_urls = {}
|
|
108
108
|
for value in item.get_all("Project-URL", []):
|
|
109
109
|
label, separator, url = value.partition(", ")
|
|
@@ -176,6 +176,30 @@ def verify_install(archive: Path, version: str) -> None:
|
|
|
176
176
|
subprocess.run(
|
|
177
177
|
[str(python), str(Path(__file__).with_name("run_readme_quickstart.py"))], check=True
|
|
178
178
|
)
|
|
179
|
+
subprocess.run(
|
|
180
|
+
[
|
|
181
|
+
"uv",
|
|
182
|
+
"run",
|
|
183
|
+
"--isolated",
|
|
184
|
+
"--no-project",
|
|
185
|
+
"--python",
|
|
186
|
+
sys.executable,
|
|
187
|
+
"--with",
|
|
188
|
+
f"{archive}[yahoo]",
|
|
189
|
+
"python",
|
|
190
|
+
"-I",
|
|
191
|
+
str(Path(__file__).with_name("verify_yahoo_quickstart.py")),
|
|
192
|
+
],
|
|
193
|
+
check=True,
|
|
194
|
+
)
|
|
195
|
+
subprocess.run(
|
|
196
|
+
["uv", "pip", "install", "--python", str(python), f"{archive}[oanda]"],
|
|
197
|
+
check=True,
|
|
198
|
+
)
|
|
199
|
+
subprocess.run(
|
|
200
|
+
[str(python), "-I", "-c", "from ml4t.data.providers.oanda import OandaProvider"],
|
|
201
|
+
check=True,
|
|
202
|
+
)
|
|
179
203
|
|
|
180
204
|
|
|
181
205
|
def main() -> None:
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.4.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 4, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -114,6 +114,7 @@ def update_all(ctx, config, dataset, dry_run):
|
|
|
114
114
|
datasets = {dataset: datasets[dataset]}
|
|
115
115
|
|
|
116
116
|
console.print(f"\n[bold]Updating {len(datasets)} dataset(s)[/bold]\n")
|
|
117
|
+
failures = 0
|
|
117
118
|
|
|
118
119
|
# Update each dataset
|
|
119
120
|
for ds_name, ds_config in datasets.items():
|
|
@@ -132,6 +133,7 @@ def update_all(ctx, config, dataset, dry_run):
|
|
|
132
133
|
console.print(f"Loaded {len(symbols)} symbols")
|
|
133
134
|
except FileNotFoundError as e:
|
|
134
135
|
console.print(f"[red]Error: {e}[/red]")
|
|
136
|
+
failures += 1
|
|
135
137
|
continue
|
|
136
138
|
elif ds_config.universe:
|
|
137
139
|
universe = cfg.get_universe(ds_config.universe)
|
|
@@ -144,6 +146,7 @@ def update_all(ctx, config, dataset, dry_run):
|
|
|
144
146
|
console.print(
|
|
145
147
|
f"[red]Dataset '{ds_name}' must have 'symbols' or 'symbols_file'[/red]"
|
|
146
148
|
)
|
|
149
|
+
failures += 1
|
|
147
150
|
continue
|
|
148
151
|
|
|
149
152
|
console.print(f"Provider: {provider}")
|
|
@@ -188,11 +191,14 @@ def update_all(ctx, config, dataset, dry_run):
|
|
|
188
191
|
|
|
189
192
|
except Exception as e:
|
|
190
193
|
console.print(f"[red]FAIL {e}[/red]")
|
|
194
|
+
failures += 1
|
|
191
195
|
if verbose:
|
|
192
196
|
console.print(f"[dim]{e}[/dim]")
|
|
193
197
|
|
|
194
198
|
console.print()
|
|
195
199
|
|
|
200
|
+
if failures:
|
|
201
|
+
raise click.ClickException(f"Update finished with {failures} failure(s)")
|
|
196
202
|
console.print("[bold green]OK Update complete![/bold green]")
|
|
197
203
|
|
|
198
204
|
except FileNotFoundError:
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"""Detect a refetch whose overlapping rows no longer match the stored rows.
|
|
2
|
+
|
|
3
|
+
Providers that serve adjusted prices restate every earlier price after a dividend or split.
|
|
4
|
+
Splicing such a refetch onto stored history puts the rows before the overlap on the old basis
|
|
5
|
+
and the rest on the new one, with a spurious return where they meet. Update paths compare the
|
|
6
|
+
overlap first and rewrite the whole stored range when it changed.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
from dataclasses import dataclass
|
|
12
|
+
from datetime import datetime
|
|
13
|
+
from typing import Any
|
|
14
|
+
|
|
15
|
+
import polars as pl
|
|
16
|
+
|
|
17
|
+
from ml4t.data.core.schemas import align_frames_for_concat
|
|
18
|
+
|
|
19
|
+
#: Relative change in an overlapping close above which the provider counts as having restated
|
|
20
|
+
#: the row. Repeated Yahoo retrievals of the same adjusted close differ by up to about 1.6e-6
|
|
21
|
+
#: relative; a dividend of 0.1% of the price changes every earlier close by 1e-3.
|
|
22
|
+
OVERLAP_RTOL = 1e-5
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def covers_timestamps(candidate: pl.DataFrame, expected: pl.DataFrame) -> bool:
|
|
26
|
+
"""Whether every observed timestamp is present in the replacement response."""
|
|
27
|
+
if expected.is_empty():
|
|
28
|
+
return True
|
|
29
|
+
if candidate.is_empty():
|
|
30
|
+
return False
|
|
31
|
+
left, right = align_frames_for_concat(
|
|
32
|
+
expected.select("timestamp"), candidate.select("timestamp")
|
|
33
|
+
)
|
|
34
|
+
return left.join(right, on="timestamp", how="anti").is_empty()
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass(frozen=True)
|
|
38
|
+
class OverlapRevision:
|
|
39
|
+
"""Stored rows that a refetch of the same timestamps no longer reproduces."""
|
|
40
|
+
|
|
41
|
+
rows_compared: int
|
|
42
|
+
rows_revised: int
|
|
43
|
+
max_relative_change: float
|
|
44
|
+
first_revised: datetime
|
|
45
|
+
last_revised: datetime
|
|
46
|
+
|
|
47
|
+
def log_fields(self) -> dict[str, Any]:
|
|
48
|
+
"""Return the revision as structured-log fields."""
|
|
49
|
+
return {
|
|
50
|
+
"rows_compared": self.rows_compared,
|
|
51
|
+
"rows_revised": self.rows_revised,
|
|
52
|
+
"max_relative_change": self.max_relative_change,
|
|
53
|
+
"first_revised": self.first_revised.isoformat(),
|
|
54
|
+
"last_revised": self.last_revised.isoformat(),
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def describe(self) -> str:
|
|
58
|
+
"""Return a one-line description for error messages."""
|
|
59
|
+
return (
|
|
60
|
+
f"{self.rows_revised} of {self.rows_compared} overlapping rows changed, "
|
|
61
|
+
f"by up to {self.max_relative_change:.3e} relative in close, "
|
|
62
|
+
f"between {self.first_revised.isoformat()} and {self.last_revised.isoformat()}"
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def find_overlap_revision(
|
|
67
|
+
stored: pl.DataFrame,
|
|
68
|
+
refetched: pl.DataFrame,
|
|
69
|
+
*,
|
|
70
|
+
column: str = "close",
|
|
71
|
+
rtol: float = OVERLAP_RTOL,
|
|
72
|
+
) -> OverlapRevision | None:
|
|
73
|
+
"""Compare a refetch with the stored rows that share its timestamps.
|
|
74
|
+
|
|
75
|
+
Args:
|
|
76
|
+
stored: Rows already in storage for one instrument.
|
|
77
|
+
refetched: Rows the provider returned now for the same instrument.
|
|
78
|
+
column: Price column to compare.
|
|
79
|
+
rtol: Relative change above which a row counts as revised.
|
|
80
|
+
|
|
81
|
+
Returns:
|
|
82
|
+
The revision when any overlapping row changed by more than ``rtol``, else None.
|
|
83
|
+
Rows where either value is null are not compared. A change confined to the last
|
|
84
|
+
stored row is not a revision when earlier overlapping rows match: that row may have
|
|
85
|
+
been a bar still forming when it was stored, and a restatement changes every row
|
|
86
|
+
before the corporate action, not one.
|
|
87
|
+
"""
|
|
88
|
+
if column not in stored.columns or column not in refetched.columns:
|
|
89
|
+
return None
|
|
90
|
+
if stored.is_empty() or refetched.is_empty():
|
|
91
|
+
return None
|
|
92
|
+
left, right = align_frames_for_concat(
|
|
93
|
+
stored.select("timestamp", column), refetched.select("timestamp", column)
|
|
94
|
+
)
|
|
95
|
+
joined = (
|
|
96
|
+
left.unique(subset=["timestamp"], keep="last")
|
|
97
|
+
.join(
|
|
98
|
+
right.unique(subset=["timestamp"], keep="last"),
|
|
99
|
+
on="timestamp",
|
|
100
|
+
suffix="_refetched",
|
|
101
|
+
)
|
|
102
|
+
.drop_nulls()
|
|
103
|
+
)
|
|
104
|
+
if joined.is_empty():
|
|
105
|
+
return None
|
|
106
|
+
before = pl.col(column).cast(pl.Float64)
|
|
107
|
+
after = pl.col(f"{column}_refetched").cast(pl.Float64)
|
|
108
|
+
change = (after - before).abs()
|
|
109
|
+
relative = pl.when(before != 0).then(change / before.abs()).otherwise(change)
|
|
110
|
+
compared = joined.with_columns(relative.alias("relative_change"))
|
|
111
|
+
revised = compared.filter(pl.col("relative_change") > rtol).sort("timestamp")
|
|
112
|
+
if revised.is_empty():
|
|
113
|
+
return None
|
|
114
|
+
last_stored = left["timestamp"].max()
|
|
115
|
+
if compared.height > 1 and revised["timestamp"].to_list() == [last_stored]:
|
|
116
|
+
return None
|
|
117
|
+
return OverlapRevision(
|
|
118
|
+
rows_compared=compared.height,
|
|
119
|
+
rows_revised=revised.height,
|
|
120
|
+
max_relative_change=float(revised["relative_change"].abs().max() or 0.0),
|
|
121
|
+
first_revised=revised["timestamp"][0],
|
|
122
|
+
last_revised=revised["timestamp"][-1],
|
|
123
|
+
)
|
|
@@ -311,7 +311,7 @@ class DataManager:
|
|
|
311
311
|
max_workers: int = 4,
|
|
312
312
|
**kwargs,
|
|
313
313
|
) -> pl.DataFrame:
|
|
314
|
-
"""Load multiple symbols
|
|
314
|
+
"""Load multiple symbols with optional fetch fallback and inclusive UTC date bounds."""
|
|
315
315
|
return self._batch_manager.batch_load_from_storage(
|
|
316
316
|
symbols,
|
|
317
317
|
start,
|
|
@@ -9,7 +9,7 @@ This module handles parallel batch loading operations including:
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
11
11
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
12
|
-
from datetime import UTC, datetime
|
|
12
|
+
from datetime import UTC, datetime, timedelta
|
|
13
13
|
from typing import TYPE_CHECKING, Any
|
|
14
14
|
|
|
15
15
|
import polars as pl
|
|
@@ -253,8 +253,8 @@ class BatchManager:
|
|
|
253
253
|
|
|
254
254
|
Args:
|
|
255
255
|
symbols: List of symbols to load
|
|
256
|
-
start: Start date (YYYY-MM-DD)
|
|
257
|
-
end: End date (YYYY-MM-DD)
|
|
256
|
+
start: Start date (YYYY-MM-DD), inclusive
|
|
257
|
+
end: End date (YYYY-MM-DD), inclusive through the entire UTC date
|
|
258
258
|
frequency: Data frequency
|
|
259
259
|
asset_class: Asset class for storage path
|
|
260
260
|
provider: Provider for missing symbols
|
|
@@ -279,7 +279,7 @@ class BatchManager:
|
|
|
279
279
|
self.fetch_manager.validate_dates(start, end)
|
|
280
280
|
|
|
281
281
|
start_dt = datetime.strptime(start, "%Y-%m-%d").replace(tzinfo=UTC)
|
|
282
|
-
end_dt = datetime.strptime(end, "%Y-%m-%d").replace(tzinfo=UTC)
|
|
282
|
+
end_dt = datetime.strptime(end, "%Y-%m-%d").replace(tzinfo=UTC) + timedelta(days=1)
|
|
283
283
|
|
|
284
284
|
logger.info(
|
|
285
285
|
f"Starting batch load from storage for {len(symbols)} symbols",
|
|
@@ -295,10 +295,19 @@ class ProviderManager:
|
|
|
295
295
|
extra = provider_config.pop("extra", None)
|
|
296
296
|
if isinstance(extra, dict):
|
|
297
297
|
provider_config = {**extra, **provider_config}
|
|
298
|
+
# How OHLC violations are handled is the validation mixin's setting, not a constructor
|
|
299
|
+
# argument: adjusted bars can break high >= close by a rounding error.
|
|
300
|
+
ohlc_mode = provider_config.pop("ohlc_mode", None)
|
|
301
|
+
if ohlc_mode not in (None, "strict", "drop", "warn"):
|
|
302
|
+
raise ValueError(
|
|
303
|
+
f"Provider '{provider_name}': ohlc_mode must be strict, drop or warn, not {ohlc_mode!r}"
|
|
304
|
+
)
|
|
298
305
|
|
|
299
306
|
# Create provider instance
|
|
300
307
|
try:
|
|
301
308
|
provider = provider_class(**provider_config)
|
|
309
|
+
if ohlc_mode is not None:
|
|
310
|
+
provider.ohlc_mode = ohlc_mode
|
|
302
311
|
self.providers[provider_name] = provider
|
|
303
312
|
logger.info(f"Initialized {provider_name} provider")
|
|
304
313
|
return provider
|
|
@@ -18,6 +18,7 @@ import structlog
|
|
|
18
18
|
from pydantic import ValidationError
|
|
19
19
|
from tenacity import RetryError
|
|
20
20
|
|
|
21
|
+
from ml4t.data.core.overlap import covers_timestamps, find_overlap_revision
|
|
21
22
|
from ml4t.data.core.schemas import align_frames_for_concat, timestamp_bounds
|
|
22
23
|
from ml4t.data.sessions.assigner import SessionAssigner
|
|
23
24
|
from ml4t.data.storage.backend import normalize_storage_metadata
|
|
@@ -598,7 +599,7 @@ class StorageManager:
|
|
|
598
599
|
provider = existing_provider
|
|
599
600
|
|
|
600
601
|
# Get the date range from existing data
|
|
601
|
-
|
|
602
|
+
first_timestamp, last_timestamp = timestamp_bounds(existing_df)
|
|
602
603
|
if last_timestamp.tzinfo is None:
|
|
603
604
|
last_timestamp = last_timestamp.replace(tzinfo=UTC)
|
|
604
605
|
else:
|
|
@@ -646,8 +647,30 @@ class StorageManager:
|
|
|
646
647
|
logger.info(f"Fetched {len(new_df)} rows of new data")
|
|
647
648
|
self._report_progress(f"Merging data for {symbol}", 0.5)
|
|
648
649
|
|
|
649
|
-
# Merge data
|
|
650
650
|
merged_df = self._merge_data(existing_df, new_df)
|
|
651
|
+
source = self.fetch_manager.router.get_provider(symbol, override=provider)
|
|
652
|
+
# Synthetic draws depend on the requested start, so an overlap cannot indicate a revision.
|
|
653
|
+
full_refresh = (
|
|
654
|
+
source != "synthetic"
|
|
655
|
+
and merged_df.height > new_df["timestamp"].n_unique()
|
|
656
|
+
and find_overlap_revision(existing_df, new_df) is not None
|
|
657
|
+
)
|
|
658
|
+
if full_refresh:
|
|
659
|
+
# A dividend or split can revise every bar before the overlap.
|
|
660
|
+
logger.info("Refetching history after revised overlap prices", symbol=symbol)
|
|
661
|
+
refreshed = self.fetch_manager.fetch_raw(
|
|
662
|
+
symbol=symbol,
|
|
663
|
+
start=first_timestamp.strftime("%Y-%m-%d"),
|
|
664
|
+
end=fetch_end.strftime("%Y-%m-%d"),
|
|
665
|
+
frequency=frequency,
|
|
666
|
+
provider=provider,
|
|
667
|
+
)
|
|
668
|
+
if not covers_timestamps(refreshed, merged_df):
|
|
669
|
+
raise ValueError(
|
|
670
|
+
f"Full refresh of restated history for {symbol} omitted previously observed "
|
|
671
|
+
"timestamps; stored history was preserved"
|
|
672
|
+
)
|
|
673
|
+
merged_df = refreshed.sort("timestamp")
|
|
651
674
|
|
|
652
675
|
logger.info(
|
|
653
676
|
"Merged data",
|
|
@@ -699,7 +722,7 @@ class StorageManager:
|
|
|
699
722
|
{
|
|
700
723
|
# BulkManager compares this legacy field with naive local cutoffs.
|
|
701
724
|
"last_update": updated_at.astimezone().replace(tzinfo=None).isoformat(),
|
|
702
|
-
"update_type": "incremental",
|
|
725
|
+
"update_type": "full_refresh" if full_refresh else "incremental",
|
|
703
726
|
"gaps_filled": False,
|
|
704
727
|
"gap_check_performed": gap_check_performed,
|
|
705
728
|
"gap_count": len(gaps) if gap_check_performed else None,
|
|
@@ -12,6 +12,7 @@ from typing import Any
|
|
|
12
12
|
import polars as pl
|
|
13
13
|
import structlog
|
|
14
14
|
|
|
15
|
+
from ml4t.data.core.overlap import covers_timestamps, find_overlap_revision
|
|
15
16
|
from ml4t.data.storage.protocols import IncrementalStorageBackend
|
|
16
17
|
|
|
17
18
|
logger = structlog.get_logger(__name__)
|
|
@@ -149,6 +150,26 @@ class ProviderUpdater(ABC):
|
|
|
149
150
|
|
|
150
151
|
# Step 4: Save data
|
|
151
152
|
if not dry_run:
|
|
153
|
+
stored = self.storage.read_data(symbol, self.provider_name)
|
|
154
|
+
if (
|
|
155
|
+
self.provider_name != "synthetic"
|
|
156
|
+
and find_overlap_revision(stored, transformed) is not None
|
|
157
|
+
and not covers_timestamps(transformed, stored)
|
|
158
|
+
):
|
|
159
|
+
first = stored["timestamp"].min()
|
|
160
|
+
if not isinstance(first, datetime):
|
|
161
|
+
raise ValueError("Stored history has no valid start timestamp")
|
|
162
|
+
refreshed = self._refetch_stored_range(symbol, first, end_time, **kwargs)
|
|
163
|
+
if not covers_timestamps(refreshed, stored) or not covers_timestamps(
|
|
164
|
+
refreshed, transformed
|
|
165
|
+
):
|
|
166
|
+
raise ValueError(
|
|
167
|
+
"Full refresh omitted observed timestamps; storage is unchanged"
|
|
168
|
+
)
|
|
169
|
+
start_time, transformed = first, refreshed
|
|
170
|
+
stats.update(
|
|
171
|
+
start_time=first, records_fetched=len(refreshed), full_refresh=True
|
|
172
|
+
)
|
|
152
173
|
records_added = self._save_data(transformed, symbol, start_time, end_time)
|
|
153
174
|
stats["records_added"] = records_added
|
|
154
175
|
|
|
@@ -348,6 +369,20 @@ class ProviderUpdater(ABC):
|
|
|
348
369
|
|
|
349
370
|
return start_time, end_time
|
|
350
371
|
|
|
372
|
+
def _refetch_stored_range(
|
|
373
|
+
self, symbol: str, start_time: datetime, end_time: datetime, **kwargs: Any
|
|
374
|
+
) -> pl.DataFrame:
|
|
375
|
+
"""Fetch and transform the full stored range, refusing a refetch that falls short."""
|
|
376
|
+
raw = self._fetch_data(symbol, start_time, end_time, **kwargs)
|
|
377
|
+
data = self._transform_data(raw, symbol, **kwargs) if raw is not None and len(raw) else None
|
|
378
|
+
if data is None or data.is_empty() or data["timestamp"].min() > start_time:
|
|
379
|
+
raise ValueError(
|
|
380
|
+
f"{self.provider_name} restated stored history for {symbol}, and the refetch "
|
|
381
|
+
f"from {start_time} does not reach the first stored row. Merging it would mix "
|
|
382
|
+
"two price bases; storage is unchanged. Reload the symbol with incremental=False."
|
|
383
|
+
)
|
|
384
|
+
return data
|
|
385
|
+
|
|
351
386
|
def _save_data(
|
|
352
387
|
self,
|
|
353
388
|
data: pl.DataFrame,
|
|
@@ -86,6 +86,7 @@ except ImportError:
|
|
|
86
86
|
|
|
87
87
|
# Crypto providers
|
|
88
88
|
from ml4t.data.providers.coingecko import CoinGeckoProvider
|
|
89
|
+
from ml4t.data.providers.coinmetrics import CoinMetricsProvider
|
|
89
90
|
|
|
90
91
|
try:
|
|
91
92
|
from ml4t.data.providers.binance import BinanceProvider
|
|
@@ -165,6 +166,7 @@ __all__ = [
|
|
|
165
166
|
"ForecastExProvider",
|
|
166
167
|
# Crypto providers
|
|
167
168
|
"CoinGeckoProvider",
|
|
169
|
+
"CoinMetricsProvider",
|
|
168
170
|
"BinanceProvider",
|
|
169
171
|
"BinancePublicProvider",
|
|
170
172
|
"OKXProvider",
|