Files
OpenBB/website/content/terminal/reference/portfolio/perf.md
DidierRLopes 4ad995fdd0 Docs/terminalpro and improvement (#5622)
* add first iteration of content for Terminal Pro

* Update index.md

* Update dashboards.md

* Update folders.md

* Update grouping.md

* Update report.md

* Update templates.md

* Update quick-start.md

* Update index.md

* Update index.md

* Update home.md

* Update news.md

* Update index.md

* Update index.md

* Update index.md

* Update data-provider.md

* Update chat-with-widget.md

* Update data-manipulation.md

* Update forecasting.md

* fix: images self closing tags

* fix: only pro visitors can see pro

* inter font

* improve SEO content and restructuring

* add new package for toggle on tutorials

* move folder around

* improve main page of each prod

* small updates and improvements

* fix logo above

* small improvement in headtitle for portfolio funcs

* fix typos from OpenAI's GPT-4

* fix _category_ json

* remove generic SEO words

* add script that generates SEO for documentation

* add missing file

* remove sdk warning message

* fix links for andrew

---------

Co-authored-by: jose-donato <zmcdonato@gmail.com>
Co-authored-by: jose-donato <43375532+jose-donato@users.noreply.github.com>
Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com>
2023-10-30 21:01:29 +00:00

142 lines
23 KiB
Markdown
Vendored

---
title: perf
description: The 'perf' function displays the performance metrics of both individual
trades and the total portfolio against a given benchmark. This data is crucial for
investors and traders to understand how their portfolio is performing compared to
a standard benchmark.
keywords:
- perf
- benchmark
- trade performance
- portfolio performance
- performance metrics
- investment tracking
---
import HeadTitle from '@site/src/components/General/HeadTitle.tsx';
<HeadTitle title="portfolio/perf - Reference | OpenBB Terminal Docs" />
Shows performance of each trade and total performance of the portfolio versus the benchmark.
### Usage
```python
performance [-t]
```
---
## Parameters
| Name | Description | Default | Optional | Choices |
| ---- | ----------- | ------- | -------- | ------- |
| show_trades | Whether to show performance on all trades in comparison to the benchmark. | False | True | None |
---
## Examples
```python
2022 May 12, 06:22 (🦋) /portfolio/ $ perf -t
Portfolio vs. Benchmark - Totals
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ ┃ Portfolio ┃ Benchmark ┃ Difference ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Investment │ 61331.99 │ 61331.99 │ 0.00e+00 │
├──────────────────┼───────────┼───────────┼────────────┤
│ Total Value │ 95969.52 │ 81940.19 │ 14029.33 │
├──────────────────┼───────────┼───────────┼────────────┤
│ Total % Return │ 0.56 │ 0.34 │ 0.23 │
├──────────────────┼───────────┼───────────┼────────────┤
│ Total Abs Return │ 34637.53 │ 20608.20 │ 14029.33 │
└──────────────────┴───────────┴───────────┴────────────┘
Portfolio vs. Benchmark - Individual Trades
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Date ┃ Name ┃ Portfolio Value ┃ Portfolio % Return ┃ Benchmark Value ┃ % Benchmark Return ┃ Alpha ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ 2010-05-03 00:00:00 │ CASH │ 0.00e+00 │ 0.00e+00 │ 0.00e+00 │ 0.00e+00 │ 0.00e+00 │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2010-05-03 00:00:00 │ GOOGL │ 4544.10 │ 756.41% │ 2102.34 │ 296.22% │ 460.19% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2010-07-06 00:00:00 │ AMZN │ 10537.20 │ 1814.81% │ 2563.26 │ 365.79% │ 1449.02% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2011-08-06 00:00:00 │ AAPL │ 439.50 │ 1061.78% │ 157.50 │ 316.33% │ 745.44% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2011-12-12 00:00:00 │ APTV │ 453.70 │ 403.55% │ 336.57 │ 273.56% │ 129.99% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2012-02-03 00:00:00 │ ASML │ 3649.10 │ 781.02% │ 1407.84 │ 239.90% │ 541.12% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2012-05-04 00:00:00 │ NKE │ 323.76 │ 286.12% │ 280.56 │ 234.60% │ 51.52% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2012-08-04 00:00:00 │ TSM │ 4391.50 │ 516.78% │ 2341.66 │ 228.88% │ 287.90% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2012-10-12 00:00:00 │ DGX │ 797.16 │ 109.59% │ 1212.76 │ 218.86% │ -109.27% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2013-02-03 00:00:00 │ YUM │ 435.60 │ 136.84% │ 550.77 │ 199.46% │ -62.62% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2013-03-04 00:00:00 │ GOOGL │ 2272.05 │ 453.15% │ 1205.05 │ 193.38% │ 259.77% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2013-08-08 00:00:00 │ AMZN │ 2107.44 │ 612.60% │ 769.49 │ 160.19% │ 452.41% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2013-10-09 00:00:00 │ AAPL │ 732.50 │ 742.92% │ 229.90 │ 164.56% │ 578.36% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2014-02-03 00:00:00 │ APTV │ 453.70 │ 83.20% │ 618.99 │ 149.94% │ -66.74% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2014-02-05 00:00:00 │ ASML │ 1563.90 │ 512.14% │ 634.71 │ 148.44% │ 363.70% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2014-12-08 00:00:00 │ NKE │ 1079.20 │ 120.88% │ 1029.58 │ 110.72% │ 10.16% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2015-02-02 00:00:00 │ BABA │ 2451.90 │ -9.32% │ 5772.66 │ 113.49% │ -122.81% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2015-03-08 00:00:00 │ TSM │ 1756.60 │ 274.54% │ 967.87 │ 106.37% │ 168.17% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2015-12-05 00:00:00 │ DGX │ 2790.06 │ 93.03% │ 2977.51 │ 106.00% │ -12.97% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2016-02-06 00:00:00 │ YUM │ 217.80 │ 124.58% │ 225.69 │ 132.72% │ -8.14% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2016-09-07 00:00:00 │ GOOGL │ 4544.10 │ 181.20% │ 3099.70 │ 91.82% │ 89.38% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2017-01-10 00:00:00 │ AMZN │ 4214.88 │ 164.79% │ 2913.21 │ 83.01% │ 81.77% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2017-05-10 00:00:00 │ AAPL │ 1465.00 │ 282.31% │ 661.37 │ 72.59% │ 209.71% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2017-12-08 00:00:00 │ APTV │ 907.40 │ 6.48% │ 1317.77 │ 54.63% │ -48.15% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2018-07-05 00:00:00 │ ASML │ 2606.50 │ 165.98% │ 1441.40 │ 47.09% │ 118.89% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2018-09-03 00:00:00 │ NKE │ 323.76 │ 35.58% │ 331.89 │ 38.98% │ -3.40% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2019-05-04 00:00:00 │ BABA │ 408.65 │ -56.58% │ 1284.84 │ 36.51% │ -93.09% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2019-09-09 00:00:00 │ TSM │ 263.49 │ 100.30% │ 177.00 │ 34.55% │ 65.74% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2019-12-10 00:00:00 │ DGX │ 1062.88 │ 26.61% │ 1069.02 │ 27.34% │ -0.73% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2020-02-03 00:00:00 │ YUM │ 1089.00 │ 2.34% │ 1304.22 │ 22.57% │ -20.23% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2020-03-08 00:00:00 │ GOOGL │ 6816.15 │ 86.88% │ 5324.47 │ 45.98% │ 40.90% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2020-06-09 00:00:00 │ AMZN │ 4214.88 │ -18.97% │ 6436.07 │ 23.73% │ -42.70% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2020-12-12 00:00:00 │ AAPL │ 586.00 │ 20.30% │ 512.33 │ 5.18% │ 15.12% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2021-01-07 00:00:00 │ APTV │ 1814.80 │ -37.33% │ 2901.22 │ 0.18% │ -37.51% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2021-05-06 00:00:00 │ ASML │ 15639.00 │ -19.10% │ 17643.93 │ -8.72% │ -10.37% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2021-12-28 00:00:00 │ NKE │ 1402.96 │ -35.15% │ 1749.43 │ -19.14% │ -16.01% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2022-02-02 00:00:00 │ BABA │ 2451.90 │ -33.49% │ 3141.73 │ -14.78% │ -18.71% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2022-03-04 00:00:00 │ TSM │ 2634.90 │ -16.40% │ 2835.11 │ -10.05% │ -6.35% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2022-04-12 00:00:00 │ DGX │ 1328.60 │ -3.21% │ 1216.75 │ -11.36% │ 8.15% │
├─────────────────────┼───────┼─────────────────┼────────────────────┼─────────────────┼────────────────────┼──────────┤
│ 2022-05-02 00:00:00 │ YUM │ 1197.90 │ -5.93% │ 1194.00 │ -6.23% │ 0.31% │
└─────────────────────┴───────┴─────────────────┴────────────────────┴─────────────────┴────────────────────┴──────────┘
```
---