pnl#

API documentation for tradeexecutor.strategy.pnl Python module in Trading Strategy.

Module description#

Profit and Loss (PnL) calculation helperes for trading positions.

Classes#

ProfitData

Different profit values for a trading position.

Functions#

calculate_pnl(position[, end_at, ...])

Calculate the Profit and Loss (PnL) for a given trading position.

calculate_pnl_generic(position[, end_at, ...])

Handle different position types generically.