FinalPositionStatistics#

API documentation for tradeexecutor.state.statistics.FinalPositionStatistics Python class in Trading Strategy framework.

class FinalPositionStatistics[source]#

Bases: object

When position is closed, its final statistics are calculated.

These statistics contain fields that is not present in open positions.

__init__(calculated_at, trade_count, value_at_open, value_at_max)#
Parameters:
Return type:

None

Methods

__init__(calculated_at, trade_count, ...)

from_dict(kvs, *[, infer_missing])

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

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

to_dict([encode_json])

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

Attributes

calculated_at

Real-time clock when these stats were calculated

trade_count

How many trades we have made

value_at_open

How much was the first purchase

value_at_max

How much was we held at the maximum point of time

calculated_at: datetime#

Real-time clock when these stats were calculated

trade_count: int#

How many trades we have made

value_at_open: float#

How much was the first purchase

value_at_max: float#

How much was we held at the maximum point of time

__init__(calculated_at, trade_count, value_at_open, value_at_max)#
Parameters:
Return type:

None