Files
OpenBB/website/content/portfolio/es/_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

1.7 KiB
Vendored

usage: es [-m] [-d {laplace,student_t,logistic,normal}] [-p PERCENTILE] [-h]

Provides Expected Shortfall (short: ES) of the selected portfolio.

optional arguments:
  -m, --mean            If one should use the mean of the portfolios return (default: False)
  -d {laplace,student_t,logistic,normal}, --dist {laplace,student_t,logistic,normal}, --distributions {laplace,student_t,logistic,normal}
                        Distribution used for the calculations (default: normal)
  -p PERCENTILE, --percentile PERCENTILE
                        Percentile used for ES calculations, for example input 99.9 equals a 99.9 Percent Expected
                        Shortfall (default: 99.9)
  -h, --help            show this help message (default: False)

Example:

2022 Feb 25, 03:09 (✨) /portfolio/ $ es
    Portfolio Expected Shortfall
┏━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃       ┃ ES:     ┃ Historical ES: ┃
┡━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ 90.0% │ -0.0204 │ -0.0202        │
├───────┼─────────┼────────────────┤
│ 95.0% │ -0.0240 │ -0.0242        │
├───────┼─────────┼────────────────┤
│ 99.0% │ -0.0310 │ -0.0270        │
├───────┼─────────┼────────────────┤
│ 99.9% │ -0.0391 │ -0.0277        │
└───────┴─────────┴────────────────┘