portfolio_toolkit.watchlist.performance module

portfolio_toolkit.watchlist.performance.performance(assets: List[MarketAsset], periods: List[Period]) DataFrame[source]

Calculate performance comparison between periods for each asset.

Parameters:

assetsList[MarketAsset]

List of market assets with price data

periodsList[Period]

List of periods to compare

Returns:

pd.DataFrame

DataFrame where rows are assets (tickers) and columns are period labels. Each cell contains the percentage change from previous period to current period. First period column will contain ‘-’ as there’s no previous period to compare.