diff --git a/catalyst/algorithm.py b/catalyst/algorithm.py index 83855f83..a6fdcebf 100644 --- a/catalyst/algorithm.py +++ b/catalyst/algorithm.py @@ -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) diff --git a/catalyst/data/bundles/poloniex.py b/catalyst/data/bundles/poloniex.py index 26344b22..7a3dffe2 100644 --- a/catalyst/data/bundles/poloniex.py +++ b/catalyst/data/bundles/poloniex.py @@ -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") diff --git a/catalyst/examples/buy_and_hold.py b/catalyst/examples/buy_and_hold.py index 7cc299a3..8b693e66 100644 --- a/catalyst/examples/buy_and_hold.py +++ b/catalyst/examples/buy_and_hold.py @@ -15,7 +15,7 @@ # limitations under the License. from catalyst.api import order, symbol -stocks = ['AAPL', 'MSFT'] +stocks = ['USDT_BTC'] def initialize(context): diff --git a/catalyst/pipeline/loaders/crypto_pricing_loader.py b/catalyst/pipeline/loaders/crypto_pricing_loader.py index 32fa3c14..f8676cce 100644 --- a/catalyst/pipeline/loaders/crypto_pricing_loader.py +++ b/catalyst/pipeline/loaders/crypto_pricing_loader.py @@ -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 diff --git a/catalyst/utils/run_algo.py b/catalyst/utils/run_algo.py index 696b8245..ff93bb87 100644 --- a/catalyst/utils/run_algo.py +++ b/catalyst/utils/run_algo.py @@ -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,