Repository navigation
Conversation
The futures options settlement file prints CAB in the price column for cabinet trades. The column then reads as text and the row fails float validation, so the whole options request failed. Settlement prices are coerced to numbers, and a non-numeric price becomes null; the row is kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
derivatives.futures.settlementswithoptions=True(providercboe) fails on any day when the options settlement file has a cabinet trade. Those rows printCABin the price column, so the price doesn't validate:One such row fails the whole request.
Change
_get_settlement_csvcoerces thepricecolumn withto_numeric(errors="coerce"). A non-numeric price becomes null, and the row is kept with its symbol and expiration. The existing NaN-to-None purge inaextract_datahandles the rest.Tests
New
tests/test_models.py::TestFuturesSettlements::test_non_numeric_price_is_null. It serves a two-row options CSV, one row with priceCAB, throughget_cboe_data, then checks the fetcher returns prices[0.7389, None].The test fails without the change with the error above, and passes with it. The CBOE suite has no new failures. The 32 tests that fail in our environment, in
test_options_analysis.pyandtest_cboe_router.py, fail ondeveloptoo.Results from a deployment
We run this as an overlay on the 2.0.0 wheel in OpenBQ's Docker image. Before the change, a sweep of every widget failed the futures options settlements widget on the
CABprice. With it, the widget returned 888 rows, 45 of them with a null price.Not included
Nothing else.
🤖 Generated with Claude Code