Skip to main content

es

Get portfolio expected shortfall

Source Code: [link]

openbb.portfolio.es(portfolio_engine: portfolio_engine.PortfolioEngine, use_mean: bool = False, distribution: str = "normal", percentile: float = 99.9)

Parameters

NameTypeDescriptionDefaultOptional
portfolio_enginePortfolioEnginePortfolioEngine class instance, this will hold transactions and perform calculations.
Use portfolio.load to create a PortfolioEngine.
NoneFalse
use_meanif one should use the data mean returnFalseTrue
distributionstrchoose distribution to use: logistic, laplace, normalnormalTrue
percentilefloates percentile (%)99.9True

Returns

TypeDescription
pd.DataFrameDataFrame with portfolio expected shortfall

Examples

from openbb_terminal.sdk import openbb
p = openbb.portfolio.load("openbb_terminal/miscellaneous/portfolio/holdings_example.xlsx")
output = openbb.portfolio.es(p)