display_positions_table#
API documentation for tradeexecutor.visual.single_pair.display_positions_table Python function.
- display_positions_table(state, pair, sort_by='PnL %', ascending=True)[source]#
Prepare a table of positions taken for a trading pair.
Example:
from tradeexecutor.visual.single_pair import display_positions_table pair = token_map["JOE"] # Get previously resolved trading pair display_positions_table(state, pair, sort_by="PnL USD", ascending=False)
- Returns:
DataFrame that includes basic diagnostics info about positions taken in a backtest.
- Parameters:
state (State) –
pair (TradingPairIdentifier) –
- Return type:
DataFrame