mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
flake8 fix
This commit is contained in:
@@ -535,12 +535,13 @@ class RPC:
|
|||||||
# winrate,
|
# winrate,
|
||||||
# loserate)
|
# loserate)
|
||||||
|
|
||||||
expectancy = calculate_expectancy(trades)
|
|
||||||
expectancy_ratio = calculate_expectancy_ratio(trades)
|
|
||||||
|
|
||||||
trades_df = DataFrame([{'close_date': trade.close_date.strftime(DATETIME_PRINT_FORMAT),
|
trades_df = DataFrame([{'close_date': trade.close_date.strftime(DATETIME_PRINT_FORMAT),
|
||||||
'profit_abs': trade.close_profit_abs}
|
'profit_abs': trade.close_profit_abs}
|
||||||
for trade in trades if not trade.is_open and trade.close_date])
|
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_abs = 0.0
|
||||||
max_drawdown = 0.0
|
max_drawdown = 0.0
|
||||||
if len(trades_df) > 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)
|
load_backtest_metadata, load_trades, load_trades_from_db)
|
||||||
from freqtrade.data.history import load_data, load_pair_history
|
from freqtrade.data.history import load_data, load_pair_history
|
||||||
from freqtrade.data.metrics import (calculate_cagr, calculate_calmar, calculate_csum,
|
from freqtrade.data.metrics import (calculate_cagr, calculate_calmar, calculate_csum,
|
||||||
calculate_expectancy, calculate_expectancy_ratio,
|
calculate_expectancy_ratio, calculate_market_change,
|
||||||
calculate_market_change, calculate_max_drawdown,
|
calculate_max_drawdown, calculate_sharpe, calculate_sortino,
|
||||||
calculate_sharpe, calculate_sortino, calculate_underwater,
|
calculate_underwater, combine_dataframes_with_mean,
|
||||||
combine_dataframes_with_mean, create_cum_profit)
|
create_cum_profit)
|
||||||
from freqtrade.exceptions import OperationalException
|
from freqtrade.exceptions import OperationalException
|
||||||
from freqtrade.util import dt_utc
|
from freqtrade.util import dt_utc
|
||||||
from tests.conftest import CURRENT_TEST_STRATEGY, create_mock_trades
|
from tests.conftest import CURRENT_TEST_STRATEGY, create_mock_trades
|
||||||
|
|||||||
Reference in New Issue
Block a user