- class PositionStatistics#
PositionStatistics(calculated_at: datetime.datetime, last_valuation_at: datetime.datetime, profitability: float, profit_usd: tradingstrategy.types.USDollarAmount, quantity: float, value: tradingstrategy.types.USDollarAmount)
- __init__(calculated_at, last_valuation_at, profitability, profit_usd, quantity, value)#
__init__(calculated_at, last_valuation_at, ...)
from_dict(kvs, *[, infer_missing])
from_json(s, *[, parse_float, parse_int, ...])
schema(*[, infer_missing, only, exclude, ...])
to_json(*[, skipkeys, ensure_ascii, ...])
Real-time clock when these stats were calculated
When this position was revalued last time.
How much profit we made so far
The current number of owned units
The current position size dollars
- last_valuation_at: datetime#
When this position was revalued last time. Should not be far off from calculated_at because we should revalue positions always before calculating their stats.