Files
OpenBB/website/content/portfolio/var/_index.md
northern-64bit 884bb82fb5 Adding risk metrics to portfolio and qa (#1394)
* Adding es to qa and var to portfolio

* Fixing mathematics

* Adding es command to portfolio menu

* Linting

* Fixing tests

* Lint fixes

* lint fixes

* Adding hugo, tests and small fixes

* Fixes

* Fix mypy + portfolio model

Co-authored-by: jmaslek <jmaslek11@gmail.com>
2022-02-25 13:02:01 -05:00

33 lines
1.7 KiB
Markdown
Vendored

```
usage: var [-m] [-a] [-s] [-p PERCENTILE] [-h]
```
Provides value at risk (short: VaR) of the selected portfolio.
```
optional arguments:
-m, --mean If one should use the mean of the portfolio return (default: False)
-a, --adjusted If the VaR should be adjusted for skew and kurtosis (Cornish-Fisher-Expansion) (default:
False)
-s, --student If one should use the student-t distribution (default: False)
-p PERCENTILE, --percentile PERCENTILE
Percentile used for VaR calculations, for example input 99.9 equals a 99.9 Percent VaR
(default: 99.9)
-h, --help show this help message (default: False)
```
Example:
```
2022 Feb 25, 03:09 (✨) /portfolio/ $ var
Portfolio Value at Risk
┏━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━┓
┃ ┃ VaR: ┃ Historical VaR: ┃
┡━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━┩
│ 90.0% │ -0.0148 │ -0.0135 │
├───────┼─────────┼─────────────────┤
│ 95.0% │ -0.0189 │ -0.0197 │
├───────┼─────────┼─────────────────┤
│ 99.0% │ -0.0267 │ -0.0258 │
├───────┼─────────┼─────────────────┤
│ 99.9% │ -0.0353 │ -0.0276 │
└───────┴─────────┴─────────────────┘
```