Add DataFrame entry points and replace apply_signal with signal_dates#232
Merged
michaelchu merged 1 commit intomainfrom Feb 27, 2026
Merged
Add DataFrame entry points and replace apply_signal with signal_dates#232michaelchu merged 1 commit intomainfrom
michaelchu merged 1 commit intomainfrom
Conversation
…es; remove apply_signal Adds DataFrame-based entry points to bridge the data package and core library: - options_data(df) validates/normalizes an existing DataFrame for strategies - load_cached_options(symbol) reads from the parquet cache into the strategy pipeline - load_cached_stocks(symbol) reads cached stock OHLCV data for signal building Replaces apply_signal with signal_dates(stock_data, signal_func) which cleanly separates concerns: signals are computed on stock data only, then dates are passed to strategies via entry_dates/exit_dates. This removes the confusing coupling where apply_signal required options data to build stock-based signals. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
options_data(df)— validates/normalizes an existing DataFrame for use with strategies (no CSV or column-index mapping needed)load_cached_options(symbol)— reads options data from the parquet cache (produced byoptopsy-data download) into the strategy pipelineload_cached_stocks(symbol)— reads cached stock OHLCV data for signal buildingsignal_dates(stock_data, signal_func)— replacesapply_signalas the single way to generate entry/exit dates from signalsRemoves
apply_signalwhich confusingly required options data to build stock-based signals.signal_datescleanly separates concerns: signals run on stock data, strategies run on options data.New user flow
Test plan
apply_signalin codebase🤖 Generated with Claude Code