mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-15 12:15:22 +08:00
ENH: Update can_trade to check exchange time
BarData now takes the trading calendar as a parameter. can_trade now checks if the asset’s exchange is open at the current or next market minute (defined by the given trading calendar).
This commit is contained in:
@@ -188,7 +188,9 @@ class TestAPIShim(WithDataPortal, WithSimParams, ZiplineTestCase):
|
||||
)[-1]
|
||||
bar_data = BarData(
|
||||
self.data_portal,
|
||||
lambda: test_end_minute, "minute"
|
||||
lambda: test_end_minute,
|
||||
"minute",
|
||||
self.trading_calendar
|
||||
)
|
||||
ohlcvp_fields = [
|
||||
"open",
|
||||
|
||||
Reference in New Issue
Block a user