Files
OpenBB/website/versioned_docs/version-v3/sdk/reference/portfolio/var.md
Theodore Aptekarev f72bc8ccec Add Versioned Documentation (#5470)
* Adding versioning to docs

---------

Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
Co-authored-by: tehcoderer <me@tehcoderer.com>
2023-09-29 11:49:05 +02:00

1.4 KiB
Vendored

title, description
title description
var OpenBB SDK Function

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

Name Type Description Default Optional
portfolio_engine PortfolioEngine PortfolioEngine class instance, this will hold transactions and perform calculations.
Use portfolio.load to create a PortfolioEngine.
None False
use_mean bool if one should use the data mean return False True
adjusted_var bool if one should have VaR adjusted for skew and kurtosis (Cornish-Fisher-Expansion) False True
student_t bool If one should use the student-t distribution False True
percentile float var percentile (%) 99.9 True

Returns

Type Description
pd.DataFrame DataFrame 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)