Fixed an issue with daily chunks end date

This commit is contained in:
fredfortier
2017-10-26 13:52:37 -04:00
parent fdc5a30060
commit 2f660db511
+4 -4
View File
@@ -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(