mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-15 11:22:18 +08:00
MAINT: Rebase fixes
This commit is contained in:
@@ -1357,6 +1357,7 @@ class TestAlgoScript(WithLogger,
|
||||
ZiplineTestCase):
|
||||
START_DATE = pd.Timestamp('2006-01-03', tz='utc')
|
||||
END_DATE = pd.Timestamp('2006-12-31', tz='utc')
|
||||
DATA_PORTAL_USE_MINUTE_DATA = False
|
||||
BCOLZ_DAILY_BAR_LOOKBACK_DAYS = 5 # max history window length
|
||||
|
||||
ARG_TYPE_TEST_CASES = (
|
||||
|
||||
@@ -487,17 +487,17 @@ class MinuteEquityHistoryTestCase(WithHistory, ZiplineTestCase):
|
||||
# the thousands place.
|
||||
data[cls.MERGER_ASSET_SID] = data[cls.SPLIT_ASSET_SID] = pd.concat((
|
||||
create_minute_df_for_asset(
|
||||
cls.env,
|
||||
cls.trading_schedule,
|
||||
pd.Timestamp('2015-01-05', tz='UTC'),
|
||||
pd.Timestamp('2015-01-05', tz='UTC'),
|
||||
start_val=8000),
|
||||
create_minute_df_for_asset(
|
||||
cls.env,
|
||||
cls.trading_schedule,
|
||||
pd.Timestamp('2015-01-06', tz='UTC'),
|
||||
pd.Timestamp('2015-01-06', tz='UTC'),
|
||||
start_val=2000),
|
||||
create_minute_df_for_asset(
|
||||
cls.env,
|
||||
cls.trading_schedule,
|
||||
pd.Timestamp('2015-01-07', tz='UTC'),
|
||||
pd.Timestamp('2015-01-07', tz='UTC'),
|
||||
start_val=1000),
|
||||
|
||||
@@ -637,7 +637,7 @@ class TradingAlgorithm(object):
|
||||
)
|
||||
)
|
||||
equity_daily_reader = PanelDailyBarReader(
|
||||
self.trading_environment.trading_days,
|
||||
self.trading_schedule.all_execution_days,
|
||||
copy_panel,
|
||||
)
|
||||
self.data_portal = DataPortal(
|
||||
|
||||
@@ -663,9 +663,9 @@ class WithBcolzDailyBarReader(WithTradingEnvironment, WithTmpDir):
|
||||
# source from minute logic.
|
||||
'volume': 'last'
|
||||
}
|
||||
mm = cls.env.market_minutes
|
||||
m_opens = cls.env.open_and_closes.market_open
|
||||
m_closes = cls.env.open_and_closes.market_close
|
||||
mm = cls.trading_schedule.all_execution_minutes
|
||||
m_opens = cls.trading_schedule.schedule.market_open
|
||||
m_closes = cls.trading_schedule.schedule.market_close
|
||||
|
||||
for asset in assets:
|
||||
first_minute = m_opens.loc[asset.start_date]
|
||||
|
||||
Reference in New Issue
Block a user