mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-21 12:30:16 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4faf9158d | ||
|
|
dfb1bf51bd | ||
|
|
f946062265 |
@@ -7,7 +7,7 @@ from pandas.tseries.holiday import (
|
||||
USLaborDay,
|
||||
USThanksgivingDay
|
||||
)
|
||||
from pandas.tslib import Timestamp
|
||||
from pandas import Timestamp
|
||||
from pytz import timezone
|
||||
|
||||
from catalyst.utils.calendars import TradingCalendar
|
||||
|
||||
@@ -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'
|
||||
})
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -43,7 +43,7 @@ dependencies:
|
||||
- multipledispatch==0.4.9
|
||||
- networkx==2.0
|
||||
- numexpr==2.6.4
|
||||
- pandas==0.19.2
|
||||
- pandas==0.22.0
|
||||
- pandas-datareader==0.5.0
|
||||
- patsy==0.4.1
|
||||
- pyparsing==2.2.0
|
||||
|
||||
@@ -62,7 +62,7 @@ dependencies:
|
||||
- multipledispatch==0.4.9
|
||||
- networkx==2.1
|
||||
- numexpr==2.6.4
|
||||
- pandas==0.19.2
|
||||
- pandas==0.22.0
|
||||
- pandas-datareader==0.6.0
|
||||
- patsy==0.5.0
|
||||
- pycares==2.3.0
|
||||
|
||||
@@ -19,7 +19,7 @@ requests-file==1.4.1
|
||||
# scipy and pandas are required for statsmodels,
|
||||
# statsmodels in turn is required for some pandas packages
|
||||
scipy==0.17.1
|
||||
pandas==0.19.2
|
||||
pandas==0.22.0
|
||||
pandas-datareader==0.2.1
|
||||
# Needed for parts of pandas.stats
|
||||
patsy==0.4.0
|
||||
|
||||
@@ -24,7 +24,7 @@ import numpy as np
|
||||
import pandas as pd
|
||||
from nose_parameterized import parameterized
|
||||
from pandas import read_csv
|
||||
from pandas.tslib import Timedelta
|
||||
from pandas import Timedelta
|
||||
from pandas.util.testing import assert_index_equal
|
||||
from pytz import timezone
|
||||
from toolz import concat
|
||||
|
||||
@@ -17,7 +17,7 @@ from collections import OrderedDict
|
||||
from numpy import array, append, nan, full
|
||||
from numpy.testing import assert_almost_equal
|
||||
import pandas as pd
|
||||
from pandas.tslib import Timedelta
|
||||
from pandas import Timedelta
|
||||
|
||||
from catalyst.assets import Equity, Future
|
||||
from catalyst.data.data_portal import HISTORY_FREQUENCIES, OHLCV_FIELDS
|
||||
|
||||
Reference in New Issue
Block a user