Skip to content

Commit

Permalink
STY: removed unused variables from exchange_algorithm (pep8)
Browse files Browse the repository at this point in the history
  • Loading branch information
AvishaiW committed May 14, 2018
1 parent 3f9b62e commit 4f4b83c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
10 changes: 6 additions & 4 deletions catalyst/exchange/exchange_algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,9 +974,9 @@ def _process_stats(self, data):
)
))

# Saving the daily stats in a format usable for performance
# analysis.
daily_stats = self.prepare_period_stats(
# Since live mode does not use daily frequency,
# there is no need to save the output of this method.
self.prepare_period_stats(
start_dt=today,
end_dt=data.current_dt
)
Expand Down Expand Up @@ -1044,7 +1044,9 @@ def analyze(self, perf):

def run(self, data=None, overwrite_sim_params=True):
data.attempts = self.attempts
perf = super(ExchangeTradingAlgorithmLive, self).run(
# Since live mode does not use daily frequency,
# there is no need to save the output of this method.
super(ExchangeTradingAlgorithmLive, self).run(
data, overwrite_sim_params
)
# Rebuilding the stats to support minute data
Expand Down
11 changes: 4 additions & 7 deletions catalyst/support/buy_and_sell_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@


def initialize(context):
# context.asset = symbol('btc_usdt')
context.asset = symbol('etc_btc')
context.asset = symbol('btc_usdt')
# context.asset = symbol('etc_btc')
context.i = 0
# context.set_commission(maker=0.4,taker=0.3)

Expand Down Expand Up @@ -72,9 +72,9 @@ def handle_data(context, data):
algo_namespace='buy_btc_simple',
quote_currency='btc',
live=True,
simulate_orders=False,
# simulate_orders=False,
# start=pd.to_datetime('2018-05-01 17:18', utc=True),
# end=pd.to_datetime('2017-10-31', utc=True),
end=pd.to_datetime('2018-05-14 08:28', utc=True),
)
else:
run_algorithm(
Expand All @@ -85,9 +85,6 @@ def handle_data(context, data):
exchange_name='poloniex',
algo_namespace='buy_btc_simple',
quote_currency='usdt',
# live=True,
# simulate_orders=False,
start=pd.to_datetime('2016-01-01', utc=True),
end=pd.to_datetime('2016-01-03', utc=True),
# end=pd.to_datetime('2018-05-02 18:42', utc=True),
)

0 comments on commit 4f4b83c

Please sign in to comment.