Skip to main content

es

Gets Expected Shortfall for specified stock dataframe.

Source Code: [link]

openbb.qa.es(data: pd.DataFrame, use_mean: bool = False, distribution: str = "normal", percentile: Union[float, int] = 99.9, portfolio: bool = False)

Parameters

NameTypeDescriptionDefaultOptional
datapd.DataFrameData dataframeNoneFalse
use_meanboolIf one should use the data mean for calculationFalseTrue
distributionstrType of distribution, options: laplace, student_t, normalnormalTrue
percentileUnion[float,int]VaR percentile99.9True
portfolioboolIf the data is a portfolioFalseTrue

Returns

TypeDescription
pd.DataFrameDataFrame with Expected Shortfall per percentile