ThetaData cache diagnostics #881
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE – ThetaData cache diagnostics
Summary
[THETA][DEBUG]logging used for cache validationEvidence
logs/WeeklyMomentumOptionsStrategy_2025-10-28_22-25_gYiGRT_logs.csv,logs/WeeklyMomentumOptionsStrategy_2025-10-28_22-27_lhcW2o_logs.csvrun_cache_validation.sh→logs/pandas_verification_results.jsonpython3 scripts/compare_option_data_coverage.pypytest -s tests/backtest/test_thetadata_vs_polygon.py -k "stock_price_comparison or option_price_comparison"Test Status (2025-10-28 @ 23:30 EDT)
python3 -m pytest(local) → FAILED after 24m03stests/backtest/test_backtesting_broker_processing.py(market & trailing-stop fills now using different bar values)tests/test_backtesting_data_source_env.py(log expectations not met when suite runs end-to-end)tests/backtest/test_polygon.py::TestPolygonBacktestFull::test_polygon_restclient) – option fill price now 6.30 vs expected 6.10Outstanding
[THETA][DEBUG]instrumentation and prune investigative artefactsDescription by Korbit AI
What change is being made?
Introduce and wire in the new ThetaData pandas-based backtesting path, enhance cache/parity diagnostics, and broaden internal utilities to support richer time-shift and data-caching behavior across backtesting.
Why are these changes being made?
Enable pandas-only ThetaData backtesting with improved cache validation, richer diagnostics, and better handling of time shifts and asset lookups to improve parity with other data feeds and aid troubleshooting. This work lays groundwork for Polars parity later, and adds instrumentation to surface cache coverage, data availability, and ordering behavior during backtests.