PortfolioAnalyzer#

tradingstrategy.analysis.portfolioanalyzer.PortfolioAnalyzer class.

class PortfolioAnalyzer[source]#

Bases: object

Represents the portfolio analysis over the backtest period.

__init__(snapshots)#
Parameters

snapshots (Dict[Timestamp, PortfolioSnapshot]) –

Return type

None

Methods

__init__(snapshots)

get_max_assets_held_once()

Find out what was the max number of assets the strategy was holding at the same time.

Attributes

snapshots

get_max_assets_held_once()[source]#

Find out what was the max number of assets the strategy was holding at the same time.

Return type

int

__init__(snapshots)#
Parameters

snapshots (Dict[Timestamp, PortfolioSnapshot]) –

Return type

None