mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-07 09:34:32 +08:00
Minor fixes
This commit is contained in:
@@ -7,7 +7,7 @@ from catalyst.api import symbol
|
||||
|
||||
def initialize(context):
|
||||
print('initializing')
|
||||
context.asset = symbol('btc_usdt')
|
||||
context.asset = symbol('xrp_btc')
|
||||
|
||||
|
||||
def handle_data(context, data):
|
||||
@@ -29,7 +29,7 @@ def handle_data(context, data):
|
||||
|
||||
# run_algorithm(
|
||||
# capital_base=250,
|
||||
# start=pd.to_datetime('2017-08-01', utc=True),
|
||||
# start=pd.to_datetime('2015-08-01', utc=True),
|
||||
# end=pd.to_datetime('2017-9-30', utc=True),
|
||||
# data_frequency='daily',
|
||||
# initialize=initialize,
|
||||
@@ -43,7 +43,7 @@ run_algorithm(
|
||||
initialize=initialize,
|
||||
handle_data=handle_data,
|
||||
analyze=None,
|
||||
exchange_name='poloniex',
|
||||
exchange_name='bitfinex',
|
||||
live=True,
|
||||
algo_namespace='simple_loop',
|
||||
base_currency='eth',
|
||||
|
||||
@@ -11,8 +11,7 @@ from logbook import Logger
|
||||
|
||||
from catalyst.data.data_portal import BASE_FIELDS
|
||||
from catalyst.exchange.bundle_utils import get_start_dt, \
|
||||
get_delta, get_trailing_candles_dt, get_periods, get_adj_dates, \
|
||||
get_df_from_candles
|
||||
get_delta, get_periods, get_adj_dates
|
||||
from catalyst.exchange.exchange_bundle import ExchangeBundle
|
||||
from catalyst.exchange.exchange_errors import MismatchingBaseCurrencies, \
|
||||
InvalidOrderStyle, BaseCurrencyNotFoundError, SymbolNotFoundOnExchange, \
|
||||
@@ -405,7 +404,7 @@ class Exchange:
|
||||
series[asset] = value_series
|
||||
|
||||
except Exception as e:
|
||||
log.debug('unable to retreive from bundle: {}'.format(e))
|
||||
log.debug('unable to retrieve from bundle: {}'.format(e))
|
||||
|
||||
return series
|
||||
|
||||
|
||||
@@ -78,12 +78,12 @@ class ExchangeBundleTestCase:
|
||||
# data_frequency = 'daily'
|
||||
# include_symbols = 'neo_btc,bch_btc,eth_btc'
|
||||
|
||||
exchange_name = 'poloniex'
|
||||
exchange_name = 'bitfinex'
|
||||
data_frequency = 'daily'
|
||||
include_symbols = 'btc_usdt'
|
||||
include_symbols = 'etc_btc'
|
||||
|
||||
start = pd.to_datetime('2015-01-01', utc=True)
|
||||
end = pd.to_datetime('2015-12-31', utc=True)
|
||||
start = pd.to_datetime('2016-11-01', utc=True)
|
||||
end = pd.to_datetime('2017-10-16', utc=True)
|
||||
|
||||
exchange = get_exchange(exchange_name)
|
||||
exchange_bundle = ExchangeBundle(exchange)
|
||||
|
||||
Reference in New Issue
Block a user