Skip to main content

var

Gets value at risk for specified stock dataframe.

Source Code: [link]

openbb.qa.var(data: pd.DataFrame, use_mean: bool = False, adjusted_var: bool = False, student_t: bool = False, percentile: Union[int, float] = 99.9, portfolio: bool = False)

Parameters

NameTypeDescriptionDefaultOptional
datapd.DataFrameData dataframeNoneFalse
use_meanboolIf one should use the data mean for calculationFalseTrue
adjusted_varboolIf one should return VaR adjusted for skew and kurtosisFalseTrue
student_tboolIf one should use the student-t distributionFalseTrue
percentileUnion[int,float]VaR percentile99.9True
portfolioboolIf the data is a portfolioFalseTrue

Returns

TypeDescription
pd.DataFrameDataFrame with Value at Risk per percentile