calculate_compounding_unrealised_trading_profitability#
API documentation for tradeexecutor.visual.equity_curve.calculate_compounding_unrealised_trading_profitability Python function.
- calculate_compounding_unrealised_trading_profitability(state_or_portfolio, freq='D')[source]#
Calculate the current profitability of open and closed trading positions, with the compounding effect.
- Parameters:
freq (str | None) –
Bin results to this Pandas frequency.
Default to daily.
state_or_portfolio (tradeexecutor.state.state.State | tradeexecutor.state.portfolio.Portfolio) –
- Returns:
Sparse Pandas series of compounded returns.
Timeline of (timestamp, position profit) for each timestamp when the position was last updated or closed.
- Return type:
Series