Working on adjusted the DataPortal class (unstable)

This commit is contained in:
fredfortier
2017-09-18 14:51:01 -04:00
parent 1d6336afda
commit 555b7e95b5
4 changed files with 66 additions and 7 deletions
+8 -4
View File
@@ -96,11 +96,15 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
if self._symbol_lookup_date is not None \
else self.sim_params.end_session
exchange = self.exchanges[exchange_name]
if exchange_name is None:
exchange = self.exchanges.values()[0]
else:
exchange = self.exchanges[exchange_name]
return self.asset_finder.lookup_symbol(
symbol_str,
as_of_date=_lookup_date,
exchange=exchange
symbol=symbol_str,
exchange=exchange,
as_of_date=_lookup_date
)
+2 -2
View File
@@ -38,7 +38,7 @@ from catalyst.utils.factory import create_simulation_parameters
import catalyst.utils.paths as pth
from catalyst.exchange.algorithm_exchange import ExchangeTradingAlgorithm
from catalyst.exchange.data_portal_exchange import DataPortalExchange
from catalyst.exchange.data_portal_exchange import DataPortalExchangeLive
from catalyst.exchange.bitfinex.bitfinex import Bitfinex
from catalyst.exchange.asset_finder_exchange import AssetFinderExchange
from catalyst.exchange.exchange_portfolio import ExchangePortfolio
@@ -209,7 +209,7 @@ def _run(handle_data,
)
env.asset_finder = AssetFinderExchange()
data = DataPortalExchange(
data = DataPortalExchangeLive(
exchanges=exchanges,
asset_finder=env.asset_finder,
trading_calendar=open_calendar,