mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 21:51:37 +08:00
Fixed an issue with daily chunks end date
This commit is contained in:
@@ -11,7 +11,7 @@ from catalyst.data.minute_bars import BcolzMinuteOverlappingData, \
|
||||
BcolzMinuteBarMetadata
|
||||
from catalyst.exchange.bundle_utils import range_in_bundle, \
|
||||
get_bcolz_chunk, get_delta, get_month_start_end, \
|
||||
get_year_start_end, get_periods_range, get_df_from_arrays, get_start_dt
|
||||
get_year_start_end, get_df_from_arrays, get_start_dt
|
||||
from catalyst.exchange.exchange_bcolz import BcolzExchangeBarReader, \
|
||||
BcolzExchangeBarWriter
|
||||
from catalyst.exchange.exchange_errors import EmptyValuesInBundleError, \
|
||||
@@ -442,11 +442,11 @@ class ExchangeBundle:
|
||||
period_start = first_trading_dt
|
||||
|
||||
_, asset_end_year = get_year_start_end(
|
||||
asset.end_minute
|
||||
asset.end_daily
|
||||
)
|
||||
if asset_end_year == period_end \
|
||||
and period_end > asset.end_minute:
|
||||
period_end = asset.end_minute
|
||||
and period_end > asset.end_daily:
|
||||
period_end = asset.end_daily
|
||||
|
||||
else:
|
||||
raise InvalidHistoryFrequencyError(
|
||||
|
||||
Reference in New Issue
Block a user