-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Polygon day fix #446
Open
Canx
wants to merge
85
commits into
dev
Choose a base branch
from
polygon_day_fix
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Polygon day fix #446
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
54aa55a
Fixed day polygon backtesting
Canx 31032c9
get timestep from data source if not available
Canx bce22b4
Use get_timestep() instead of MIN_TIMESTEP
Canx 1d75d65
timestep should be mandatory in get_historical_prices
Canx 7313808
make timestep mandatory in _pull_source_symbol_bars
Canx 2ae2410
Fail fast if timestep not specified in polygon data source
Canx 9786405
Do not ask for timestep, minute is safer
Canx aee1c64
This must be a typo!
Canx b2674ad
Was not starting from the first date in 'day' timestep
Canx 04c497e
In 'day' timestep we need to add one more day
Canx cd6ccd6
check correctly empty bars
Canx 9be2df5
add case where timestep and self.timestep is 'day'
Canx 95fdc8d
remove UTC as is added by default and set to LUMIBOT_DEFAULT_PYTZ if …
Canx 01ba540
Added data logs and changed UTC to LUMIBOT_DEFAULT_PYTZ on fetched po…
Canx 5483aa7
Was breaking things
Canx 9688d7d
Added full backtesting tests with fixtures
Canx bb82868
Removed comments
Canx cd63579
populate avg_fill_price
38b71e2
orders can have zero or negative values
grzesir 6a0fc1e
deploy 3.4.0
grzesir 64f519a
fix empty tearsheet_file for trader.run_all
minfawang 5509f6a
generate test data with decimals
Canx b004cf2
Raise exception if data generation for options is asked
Canx 2f3d836
Reduce test length and exception message
Canx e94b874
better TestStrategy class
Canx 511adb4
Improved tests
Canx b20f7df
added is_holiday and no special case for day timestep for waiting mar…
Canx c5ffaaf
Make sure timestep is correct
Canx 86a5572
is_holiday should be implemented by all brokers
Canx 0e4a9d6
No need for special case, added complexity having different timesteps
Canx ed5be6c
Wait till open only if it's not is holiday
Canx 5fad217
Moved is_holiday to Broker class
Canx 60e7620
Checking positions before checking orders
Canx f83d481
Removed exception when no timestep specified, just for tests to pass
Canx eca260b
Undoing change in localize
Canx a80c9bc
We should end before datetime_end
Canx 87f190b
Added datetime asserts
Canx ab35a10
Added intraday 30m polygon test
Canx 5351e6b
added ability to backtest index options
grzesir 8ac3b97
Cleaned tests
Canx a89cb7e
Renamed strategy class, was giving a warning in pytest
Canx 5123d12
Make sure we return a datetime object
Canx 4e7ae61
Use datetime broker property
Canx 6ae517b
Undoing zoneinfo
Canx 8ad6b9a
Added get_historical_prices call in tests
Canx 1e7f3c9
Give more historic data to cache as get_historical_prices is called
Canx d07b427
options have the same dataframe data
Canx 071a780
Undo ohlc empty test
Canx 5212ac6
Undo removing UTC
Canx 78518d6
Refactored for testing
Canx 5f3ab12
fixed cache mock
Canx 2387336
Undo timestep raise exception
Canx aed7f15
Renaming is_holiday to is_market_day and inverting logic
Canx 6ac70fb
Undoing timestep parameter
Canx 09b405d
Add market option, still not implemented
Canx 0cfb309
Fixed day polygon backtesting
Canx 2044d4c
Add portfolio value assert
Canx 000f46a
Improved tests to check positions
Canx 65758a7
Same values for tests
Canx 3fdb43b
Remove UTC timezone
Canx f8dcb4e
Undo timezone condition
Canx e080b07
generate asset data with multiplier, for bigger test numbers
Canx 854a47c
Undo UTC removal
Canx 180538b
Modified test values
Canx 4f2e220
Update cicd.yaml
grzesir a43d9a8
Fixed indentation
Canx d1adc69
Remove spanish comments
Canx 6b05586
Merged from dev
Canx d7017ed
Merge branch 'dev' into polygon_day_fix
Canx e402fe3
Undoing datetime casting
Canx f3781ea
remove timestep parameter and fix tab
Canx 4278330
One more test: test_polygon_1D_minute_stock
Canx ab9cbe0
Add new test
Canx 023284b
also await market close in day backtesting
Canx ca0e01e
only process trade iteration if it's market day in day backtesting
Canx f00fa9a
Added test_polygon_1M_day_stock
Canx 8e2d3ea
Added test_polygon_1M_minute_stock
Canx 1397507
Merge branch 'dev' into polygon_day_fix
Canx e6a78ea
Suboptimal fix in is_market_day due to index change in _trading_days …
Canx 6e335e5
Merge branch 'dev' into polygon_day_fix
Canx a558513
Merge branch 'dev' into polygon_day_fix
Canx df62b1a
Integrated day with intraday logic
Canx 1b94e74
Improved market hours checks
Canx 05ba56e
Merge branch 'dev' into polygon_day_fix
Canx 0c3ce73
fixed log message
Canx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that you're using 'dict' as a variable name in the '_get_bars_dict', '_get_bars_between_dates_dict', 'get_bars', and 'get_bars_between_dates' methods. This can lead to confusion as 'dict' is a built-in Python function name. Please consider renaming this variable to something more descriptive and not a built-in function name.