calculate_realised_profitability#

calculate_realised_profitability(state)[source]#

Calculate realised profitability of closed trading positions.

This function returns the profitability of individually closed trading positions.

See Profitability calculations for more information.

Returns:

Pandas series (DatetimeIndex, % profit).

Empty series if there are no trades.

Parameters:

state (State) –

Return type:

Series