TradeSummary#

tradeexecutor.analysis.trade_analyser.TradeSummary class.

class TradeSummary[source]#

Bases: object

Some generic statistics over all the trades

__init__(won, lost, zero_loss, stop_losses, undecided, realised_profit, open_value, uninvested_cash, initial_cash, extra_return, duration, average_winning_trade_profit_pc, average_losing_trade_loss_pc, biggest_winning_trade_pc, biggest_losing_trade_pc, average_duration_of_winning_trades, average_duration_of_losing_trades)#
Parameters
Return type

None

Methods

__init__(won, lost, zero_loss, stop_losses, ...)

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

to_dataframe()

Creates a human-readable Pandas dataframe table from the object.

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

won

lost

zero_loss

stop_losses

undecided

realised_profit

open_value

uninvested_cash

initial_cash

extra_return

duration

average_winning_trade_profit_pc

average_losing_trade_loss_pc

biggest_winning_trade_pc

biggest_losing_trade_pc

average_duration_of_winning_trades

average_duration_of_losing_trades

total_trades

win_percent

return_percent

annualised_return_percent

all_stop_loss_percent

lost_stop_loss_percent

average_net_profit

end_value

to_dataframe()[source]#

Creates a human-readable Pandas dataframe table from the object.

Return type

DataFrame

__init__(won, lost, zero_loss, stop_losses, undecided, realised_profit, open_value, uninvested_cash, initial_cash, extra_return, duration, average_winning_trade_profit_pc, average_losing_trade_loss_pc, biggest_winning_trade_pc, biggest_losing_trade_pc, average_duration_of_winning_trades, average_duration_of_losing_trades)#
Parameters
Return type

None