From b4faf9158d2006868f35a2df204d69e210d83493 Mon Sep 17 00:00:00 2001 From: wassname Date: Sat, 31 Mar 2018 10:44:32 +0800 Subject: [PATCH] fix typos --- catalyst/utils/factory.py | 12 ++++++------ catalyst/utils/run_algo.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/catalyst/utils/factory.py b/catalyst/utils/factory.py index 9b467cc8..e69aba21 100644 --- a/catalyst/utils/factory.py +++ b/catalyst/utils/factory.py @@ -117,9 +117,9 @@ def create_dividend(sid, payment, declared_date, ex_date, pay_date): 'net_amount': payment, 'payment_sid': None, 'ratio': None, - 'declared_date': pd.tslib.declared_date.normalize(), - 'ex_date': pd.tslib.ex_date.normalize(), - 'pay_date': pd.tslib.pay_date.normalize(), + 'declared_date': declared_date.normalize(), + 'ex_date': ex_date.normalize(), + 'pay_date': pay_date.normalize(), 'type': DATASOURCE_TYPE.DIVIDEND, 'source_id': 'MockDividendSource' }) @@ -134,9 +134,9 @@ def create_stock_dividend(sid, payment_sid, ratio, declared_date, 'ratio': ratio, 'net_amount': None, 'gross_amount': None, - 'dt': pd.tslib.declared_date.normalize(), - 'ex_date': pd.tslib.ex_date.normalize(), - 'pay_date': pd.tslib.pay_date.normalize(), + 'dt': declared_date.normalize(), + 'ex_date': ex_date.normalize(), + 'pay_date': pay_date.normalize(), 'type': DATASOURCE_TYPE.DIVIDEND, 'source_id': 'MockDividendSource' }) diff --git a/catalyst/utils/run_algo.py b/catalyst/utils/run_algo.py index 38d76daa..ff7bad3e 100644 --- a/catalyst/utils/run_algo.py +++ b/catalyst/utils/run_algo.py @@ -263,9 +263,9 @@ def _run(handle_data, # We still need to support bundles for other misc data, but we # can handle this later. - if start != pd.tslib.start.normalize() or \ - end != pd.tslib.end.normalize(): - # todo: add to Sim_Params the option to start & end at specific times + if start != pd.Timestamp(start).normalize() or \ + end != pd.Timestamp(end).normalize(): + # todo: add to Sim_Params the option to start & end at specific times log.warn( "Catalyst currently starts and ends on the start and " "end of the dates specified, respectively. We hope to "