Skip to main content

var

Get portfolio VaR

Source Code: [link]

openbb.portfolio.var(portfolio_engine: portfolio_engine.PortfolioEngine, use_mean: bool = False, adjusted_var: bool = False, student_t: bool = False, 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_meanboolif one should use the data mean returnFalseTrue
adjusted_varboolif one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion)FalseTrue
student_tboolIf one should use the student-t distributionFalseTrue
percentilefloatvar percentile (%)99.9True

Returns

TypeDescription
pd.DataFrameDataFrame with portfolio VaR

Examples

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