mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
flake8 fix
This commit is contained in:
parent
4812bcc28b
commit
dcc3ef1309
|
@ -535,12 +535,13 @@ class RPC:
|
|||
# winrate,
|
||||
# loserate)
|
||||
|
||||
expectancy = calculate_expectancy(trades)
|
||||
expectancy_ratio = calculate_expectancy_ratio(trades)
|
||||
|
||||
trades_df = DataFrame([{'close_date': trade.close_date.strftime(DATETIME_PRINT_FORMAT),
|
||||
'profit_abs': trade.close_profit_abs}
|
||||
for trade in trades if not trade.is_open and trade.close_date])
|
||||
|
||||
expectancy = calculate_expectancy(trades_df)
|
||||
expectancy_ratio = calculate_expectancy_ratio(trades_df)
|
||||
|
||||
max_drawdown_abs = 0.0
|
||||
max_drawdown = 0.0
|
||||
if len(trades_df) > 0:
|
||||
|
|
|
@ -13,10 +13,10 @@ from freqtrade.data.btanalysis import (BT_DATA_COLUMNS, analyze_trade_parallelis
|
|||
load_backtest_metadata, load_trades, load_trades_from_db)
|
||||
from freqtrade.data.history import load_data, load_pair_history
|
||||
from freqtrade.data.metrics import (calculate_cagr, calculate_calmar, calculate_csum,
|
||||
calculate_expectancy, calculate_expectancy_ratio,
|
||||
calculate_market_change, calculate_max_drawdown,
|
||||
calculate_sharpe, calculate_sortino, calculate_underwater,
|
||||
combine_dataframes_with_mean, create_cum_profit)
|
||||
calculate_expectancy_ratio, calculate_market_change,
|
||||
calculate_max_drawdown, calculate_sharpe, calculate_sortino,
|
||||
calculate_underwater, combine_dataframes_with_mean,
|
||||
create_cum_profit)
|
||||
from freqtrade.exceptions import OperationalException
|
||||
from freqtrade.util import dt_utc
|
||||
from tests.conftest import CURRENT_TEST_STRATEGY, create_mock_trades
|
||||
|
|
Loading…
Reference in New Issue
Block a user