BacktestFuturePosition

class qf_lib.backtesting.portfolio.backtest_future_position.BacktestFuturePosition(ticker: Ticker)[source]

Bases: BacktestPosition

Methods:

market_value()

Market value is equal to the P&L of the position

total_exposure()

It tells us what is the total exposure of the position to the market in currency units

market_value() float[source]

Market value is equal to the P&L of the position

total_exposure() float[source]

It tells us what is the total exposure of the position to the market in currency units

For cash securities (Equities, Bonds, ETFs, etc)

It represents the value of the position (quantity * price)

For margin securities (Futures, Options)

It represents Notional of the position (quantity * price * contract size)