KeyMetricKind#

API documentation for tradeexecutor.strategy.summary.KeyMetricKind Python class in Trading Strategy framework.

class KeyMetricKind[source]#

Bases: Enum

What key metrics we have available on a strategy summary card.

All othe metrics will be available as well, but we do not cache them for the quick frontend rendering.

__init__(*args, **kwds)#

Methods

get_help_link()

Attributes

sharpe

Sharpe ratio for the execution

sortino

Sortino ratio for the execution

max_drawdown

Negative value 0...-1

started_at

UNIX timestamp when the first trade was executd

cagr

CAGR

profitability

All-time profitability

total_equity

Total equity

last_trade

Last trade

trades_last_week

Trades last week

trades_per_month

Trades per month estimate

trading_period_length

Duration of the trading period

return_percent

Percentage return over the trading period

annualised_return_percent

Annualized percentage return, adjusted for the length of the trading period

cash_at_start

Initial cash amount at the start of the trading period

value_at_end

Portfolio value at the end of the trading period

trade_volume

Total value of all trades conducted

position_win_percent

Percentage of positions that were profitable

total_positions

Total number of trading positions taken

won_positions

Number of positions that resulted in a profit

lost_positions

Number of positions that resulted in a loss

stop_losses_triggered

Number of times stop losses were triggered

stop_loss_percent_of_all

Percentage of all positions where stop losses were triggered

stop_loss_percent_of_lost

Percentage of losing positions where stop losses were triggered

winning_stop_losses

Number of winning positions where stop losses were set

winning_stop_losses_percent

Percentage of winning positions where stop losses were set

losing_stop_losses

Number of losing positions where stop losses were triggered

losing_stop_losses_percent

Percentage of losing positions where stop losses were triggered

take_profits_triggered

Number of times take profits were triggered

take_profit_percent_of_all

Percentage of all positions where take profits were triggered

take_profit_percent_of_won

Percentage of winning positions where take profits were triggered

zero_profit_positions

Number of positions closed with zero profit or loss

positions_open_at_the_end

Number of positions still open at the end of the trading period

realised_profit_and_loss

Total realized profit and loss from all closed positions

unrealised_profit_and_loss

Unrealized profit and loss from positions still open

portfolio_unrealised_value

Unrealized value of the portfolio

extra_returns_on_lending_pool_interest

Extra returns earned from lending pool interest

cash_left_at_the_end

Cash amount remaining at the end of the trading period

average_winning_position_profit_percent

Average profit percentage for winning positions

average_losing_position_loss_percent

Average loss percentage for losing positions

biggest_winning_position_percent

Largest percentage profit for a single position

biggest_losing_position_percent

Largest percentage loss for a single position

average_duration_of_winning_positions

Average duration for positions that ended in profit

average_duration_of_losing_positions

Average duration for positions that ended in loss

average_bars_of_winning_positions

Average number of price bars for winning positions

average_bars_of_losing_positions

Average number of price bars for losing positions

lp_fees_paid

Total liquidity provider fees paid

lp_fees_paid_percent_of_volume

Percentage of trade volume spent on liquidity provider fees

average_position

Average profit or loss for all positions

median_position

Median profit or loss for all positions

most_consecutive_wins

Highest number of consecutive winning trades

most_consecutive_losses

Highest number of consecutive losing trades

biggest_realised_risk

Largest risk realized in a single trade

avg_realised_risk

Average risk realized across all trades

max_pullback_of_total_capital

Maximum percentage pullback from peak capital

max_loss_risk_at_opening_of_position

Maximum loss risked at the opening of a position

average_interest_paid_usd

median_interest_paid_usd

max_interest_paid_usd

min_interest_paid_usd

total_interest_paid_usd

average_duration_between_position_openings

average_position_frequency

time_in_market

decision_cycle_duration

sharpe = 'sharpe'#

Sharpe ratio for the execution

sortino = 'sortino'#

Sortino ratio for the execution

max_drawdown = 'max_drawdown'#

Negative value 0…-1

started_at = 'started_at'#

UNIX timestamp when the first trade was executd

cagr = 'cagr'#

CAGR

See CAGR

profitability = 'profitability'#

All-time profitability

total_equity = 'total_equity'#

Total equity

last_trade = 'last_trade'#

Last trade

trades_last_week = 'trades_last_week'#

Trades last week

trades_per_month = 'trades_per_month'#

Trades per month estimate

trading_period_length = 'trading_period_length'#

Duration of the trading period

return_percent = 'return_percent'#

Percentage return over the trading period

annualised_return_percent = 'annualised_return_percent'#

Annualized percentage return, adjusted for the length of the trading period

cash_at_start = 'cash_at_start'#

Initial cash amount at the start of the trading period

value_at_end = 'value_at_end'#

Portfolio value at the end of the trading period

trade_volume = 'trade_volume'#

Total value of all trades conducted

position_win_percent = 'position_win_percent'#

Percentage of positions that were profitable

total_positions = 'total_positions'#

Total number of trading positions taken

won_positions = 'won_positions'#

Number of positions that resulted in a profit

lost_positions = 'lost_positions'#

Number of positions that resulted in a loss

stop_losses_triggered = 'stop_losses_triggered'#

Number of times stop losses were triggered

stop_loss_percent_of_all = 'stop_loss_percent_of_all'#

Percentage of all positions where stop losses were triggered

stop_loss_percent_of_lost = 'stop_loss_percent_of_lost'#

Percentage of losing positions where stop losses were triggered

winning_stop_losses = 'winning_stop_losses'#

Number of winning positions where stop losses were set

winning_stop_losses_percent = 'winning_stop_losses_percent'#

Percentage of winning positions where stop losses were set

losing_stop_losses = 'losing_stop_losses'#

Number of losing positions where stop losses were triggered

losing_stop_losses_percent = 'losing_stop_losses_percent'#

Percentage of losing positions where stop losses were triggered

take_profits_triggered = 'take_profits_triggered'#

Number of times take profits were triggered

take_profit_percent_of_all = 'take_profit_percent_of_all'#

Percentage of all positions where take profits were triggered

take_profit_percent_of_won = 'take_profit_percent_of_won'#

Percentage of winning positions where take profits were triggered

zero_profit_positions = 'zero_profit_positions'#

Number of positions closed with zero profit or loss

positions_open_at_the_end = 'positions_open_at_the_end'#

Number of positions still open at the end of the trading period

realised_profit_and_loss = 'realised_profit_and_loss'#

Total realized profit and loss from all closed positions

unrealised_profit_and_loss = 'unrealised_profit_and_loss'#

Unrealized profit and loss from positions still open

portfolio_unrealised_value = 'portfolio_unrealised_value'#

Unrealized value of the portfolio

extra_returns_on_lending_pool_interest = 'extra_returns_on_lending_pool_interest'#

Extra returns earned from lending pool interest

cash_left_at_the_end = 'cash_left_at_the_end'#

Cash amount remaining at the end of the trading period

average_winning_position_profit_percent = 'average_winning_position_profit_percent'#

Average profit percentage for winning positions

average_losing_position_loss_percent = 'average_losing_position_loss_percent'#

Average loss percentage for losing positions

biggest_winning_position_percent = 'biggest_winning_position_percent'#

Largest percentage profit for a single position

biggest_losing_position_percent = 'biggest_losing_position_percent'#

Largest percentage loss for a single position

average_duration_of_winning_positions = 'average_duration_of_winning_positions'#

Average duration for positions that ended in profit

average_duration_of_losing_positions = 'average_duration_of_losing_positions'#

Average duration for positions that ended in loss

average_bars_of_winning_positions = 'average_bars_of_winning_positions'#

Average number of price bars for winning positions

average_bars_of_losing_positions = 'average_bars_of_losing_positions'#

Average number of price bars for losing positions

lp_fees_paid = 'lp_fees_paid'#

Total liquidity provider fees paid

lp_fees_paid_percent_of_volume = 'lp_fees_paid_percent_of_volume'#

Percentage of trade volume spent on liquidity provider fees

average_position = 'average_position'#

Average profit or loss for all positions

median_position = 'median_position'#

Median profit or loss for all positions

most_consecutive_wins = 'most_consecutive_wins'#

Highest number of consecutive winning trades

most_consecutive_losses = 'most_consecutive_losses'#

Highest number of consecutive losing trades

biggest_realised_risk = 'biggest_realised_risk'#

Largest risk realized in a single trade

avg_realised_risk = 'avg_realised_risk'#

Average risk realized across all trades

max_pullback_of_total_capital = 'max_pullback_of_total_capital'#

Maximum percentage pullback from peak capital

max_loss_risk_at_opening_of_position = 'max_loss_risk_at_opening_of_position'#

Maximum loss risked at the opening of a position