Skip to main content

summary

Get portfolio and benchmark returns summary

Source Code: [link]

openbb.portfolio.summary(portfolio_engine: portfolio_engine.PortfolioEngine, window: str = "all", risk_free_rate: float = 0)

Parameters

NameTypeDescriptionDefaultOptional
portfolio_enginePortfolioEnginePortfolioEngine class instance, this will hold transactions and perform calculations.
Use portfolio.load to create a PortfolioEngine.
NoneFalse
windowstrinterval to compare cumulative returns and benchmarkallTrue
risk_free_ratefloatRisk free rate for calculations0True

Returns

TypeDescription
pd.DataFrameDataFrame with portfolio and benchmark returns summary

Examples

from openbb_terminal.sdk import openbb
p = openbb.portfolio.load("openbb_terminal/miscellaneous/portfolio_examples/holdings/example.csv")
output = openbb.portfolio.summary(p)