portfolio_toolkit.portfolio.time_series package

Submodules

Module contents

class portfolio_toolkit.portfolio.time_series.PortfolioTimeSeries(name: str, currency: str, assets: List[PortfolioAsset], data_provider: DataProvider, account: Account, start_date: str)[source]

Bases: Portfolio

DataFrame with the following structure:

Columns: - Date (str): Date of the transaction or calculation. - Ticker (str): Asset symbol (including synthetic cash tickers like __EUR). - Quantity (int): Accumulated quantity of shares/units on the date. - Price (float): Share price on the date in original currency (1.0 for cash tickers). - Price_Base (float): Share price converted to portfolio base currency, including fees for purchase transactions. - Value (float): Total value of the shares/units on the date (Quantity * Price). - Value_Base (float): Total value in portfolio base currency (Quantity * Price_Base). - Cost (float): Total accumulated cost of the shares/units on the date in base currency. - Sector (str): Sector to which the asset belongs (Cash for synthetic tickers). - Country (str): Country to which the asset belongs.

Each row represents the state of an asset on a specific date. Cash transactions use synthetic tickers (e.g., __EUR) with constant price of 1.0.

__init__(name: str, currency: str, assets: List[PortfolioAsset], data_provider: DataProvider, account: Account, start_date: str) None
classmethod from_portfolio(portfolio: Portfolio) PortfolioTimeSeries[source]

Alternate constructor that builds PortfolioTimeSeries from a Portfolio.

plot_evolution() LineChartData[source]
print() None[source]
portfolio_timeseries: DataFrame
name: str
currency: str
assets: List[PortfolioAsset]
data_provider: DataProvider
account: Account
start_date: str