NYSE -> OPEN calendar for (most) default calendars

* Added extra bundle parameters for catalyst/poloniex bundles
This commit is contained in:
Conner Fromknecht
2017-06-20 14:18:15 -07:00
parent 3b6a293019
commit cd3d996892
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -289,7 +289,7 @@ class TradingAlgorithm(object):
# If a schedule has been provided, pop it. Otherwise, use NYSE.
self.trading_calendar = kwargs.pop(
'trading_calendar',
get_calendar('NYSE')
get_calendar('OPEN')
)
self.sim_params = kwargs.pop('sim_params', None)
+3 -3
View File
@@ -167,7 +167,7 @@ def poloniex_cryptoassets(symbols, start=None, end=None):
# Hardcode the exchange to "POLONIEX" for all assets and (elsewhere)
# register "YAHOO" to resolve to the OPEN calendar, because these are
# all cryptoassets and thus use the OPEN calendar.
metadata['exchange'] = "POLONIEX"
metadata['exchange'] = 'POLO'
asset_db_writer.write(equities=metadata)
return ingest
@@ -185,6 +185,6 @@ register(
pd.Timestamp('2010-01-01', tz='utc'),
pd.Timestamp('2015-01-01', tz='utc'),
),
calendar_name='OPEN',
minutes_per_day=1440,
)
register_calendar_alias("POLONIEX", "OPEN")
+1 -1
View File
@@ -15,7 +15,7 @@
# limitations under the License.
from catalyst.api import order, symbol
stocks = ['AAPL', 'MSFT']
stocks = ['USDT_BTC']
def initialize(context):
@@ -37,7 +37,7 @@ class CryptoPricingLoader(PipelineLoader):
self.raw_price_loader = raw_price_loader
self._columns = dataset.columns
cal = get_calendar('NYSE')
cal = get_calendar('OPEN')
self._all_sessions = cal.all_sessions
+1 -1
View File
@@ -148,7 +148,7 @@ def _run(handle_data,
bundle_data.equity_minute_bar_reader.first_trading_day
data = DataPortal(
env.asset_finder,
get_calendar('NYSE'),
get_calendar('OPEN'),
first_trading_day=first_trading_day,
equity_minute_reader=bundle_data.equity_minute_bar_reader,
equity_daily_reader=bundle_data.equity_daily_bar_reader,