diff --git a/openbb_terminal/parent_classes.py b/openbb_terminal/parent_classes.py
index 30dc2fd3221..315356d8bc2 100644
--- a/openbb_terminal/parent_classes.py
+++ b/openbb_terminal/parent_classes.py
@@ -1,7 +1,7 @@
"""Parent Classes."""
__docformat__ = "numpy"
-# pylint: disable=C0301,C0302,R0902,global-statement
+# pylint: disable=C0301,C0302,R0902,global-statement,too-many-boolean-expressions
import argparse
import difflib
@@ -960,7 +960,7 @@ class StockBaseController(BaseController, metaclass=ABCMeta):
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
prog="load",
description="Load stock ticker to perform analysis on. When the data source"
- + " is syf', an Indian ticker can be"
+ + " is yf, an Indian ticker can be"
+ " loaded by using '.NS' at the end, e.g. 'SBIN.NS'. See available market in"
+ " https://help.yahoo.com/kb/exchanges-data-providers-yahoo-finance-sln2310.html.",
)
@@ -1039,7 +1039,20 @@ class StockBaseController(BaseController, metaclass=ABCMeta):
type=str,
default="ytd",
)
-
+ parser.add_argument(
+ "--exchange",
+ dest="exchange",
+ action="store_true",
+ default=False,
+ help="Show exchange information.",
+ )
+ parser.add_argument(
+ "--performance",
+ dest="performance",
+ action="store_true",
+ default=False,
+ help="Show performance information.",
+ )
if other_args and "-" not in other_args[0][0]:
other_args.insert(0, "-t")
@@ -1088,17 +1101,20 @@ class StockBaseController(BaseController, metaclass=ABCMeta):
return
if not df_stock_candidate.empty:
self.stock = df_stock_candidate
- self.add_info = stocks_helper.additional_info_about_ticker(
- ns_parser.ticker
- )
- console.print(self.add_info)
+ if ns_parser.exchange:
+ self.add_info = stocks_helper.additional_info_about_ticker(
+ ns_parser.ticker
+ )
+ console.print(self.add_info)
if (
ns_parser.interval == 1440
and not ns_parser.weekly
and not ns_parser.monthly
and ns_parser.filepath is None
and self.PATH == "/stocks/"
+ and ns_parser.performance
):
+ console.print()
stocks_helper.show_quick_performance(self.stock, ns_parser.ticker)
if "." in ns_parser.ticker:
self.ticker, self.suffix = ns_parser.ticker.upper().split(".")
diff --git a/website/content/terminal/guides/basics/index.md b/website/content/terminal/guides/basics/index.md
index efa441bbe38..c2f9e8e8cad 100644
--- a/website/content/terminal/guides/basics/index.md
+++ b/website/content/terminal/guides/basics/index.md
@@ -48,17 +48,17 @@ Continuing with the example mentioned at `quit`, revisit the `stocks` menu and l
```
2022 May 19, 05:27 (π¦) /stocks/ $ load -h
-usage: load [-t TICKER] [-s START] [-e END] [-i {1,5,15,30,60}] [-p] [-f FILEPATH] [-m] [-w] [-r {ytd,1y,2y,5y,6m}] [-h] [--source {yf,av,iex,polygon}]
+usage: load [-t TICKER] [-s START] [-e END] [-i {1,5,15,30,60}] [-p] [-f FILEPATH] [-m] [-w] [-r {ytd,1y,2y,5y,6m}] [--exchange] [--performance] [-h] [--export EXPORT]
+ [--source {YahooFinance,IEXCloud,AlphaVantage,Polygon,EODHD}]
-Load stock ticker to perform analysis on. When the data source is Yahoo Finance, an Indian ticker can be loaded by
-using '.NS' at the end, e.g. 'SBIN.NS'. American tickers do not have this addition, e.g. AMZN.
+Load stock ticker to perform analysis on. When the data source is yf, an Indian ticker can be loaded by using '.NS' at the end, e.g. 'SBIN.NS'.
optional arguments:
-t TICKER, --ticker TICKER
Stock ticker (default: None)
-s START, --start START
- The starting date (format YYYY-MM-DD) of the stock (default: 2019-07-01)
- -e END, --end END The ending date (format YYYY-MM-DD) of the stock (default: 2022-07-05)
+ The starting date (format YYYY-MM-DD) of the stock (default: 2020-01-09)
+ -e END, --end END The ending date (format YYYY-MM-DD) of the stock (default: 2023-01-13)
-i {1,5,15,30,60}, --interval {1,5,15,30,60}
Intraday stock minutes (default: 1440)
-p, --prepost Pre/After market hours. Only works for 'yf' source, and intraday data (default: False)
@@ -67,33 +67,24 @@ optional arguments:
-m, --monthly Load monthly data (default: False)
-w, --weekly Load weekly data (default: False)
-r {ytd,1y,2y,5y,6m}, --iexrange {ytd,1y,2y,5y,6m}
- Range for using the iexcloud api. Note that longer range requires more tokens in account (default: ytd)
+ Range for using the iexcloud api. Longer range requires more tokens in account (default: ytd)
+ --exchange Show exchange information. (default: False)
+ --performance Show performance information. (default: False)
-h, --help show this help message (default: False)
- --source {yf,av,iex,polygon}
- Data source to select from (default: yf)
+ --export EXPORT Export raw data into csv, json, xlsx (default: )
+ --source {YahooFinance,IEXCloud,AlphaVantage,Polygon,EODHD}
+ Data source to select from (default: YahooFinance)
For more information and examples, use 'about load' to access the related guide.
+
```
This shows you all **arguments** the command has. These are additional options you can provide to the command. Each default value is also displayed which is used when you do not select this option. For example, if I would use the stock ticker of Amazon (AMZN, which can also be found with `search amazon`), I can use `load AMZN` which will return the following:
```
-2022 May 19, 05:27 (π¦) /stocks/ $ load AMZN
+2023 Jan 13, 11:22 (π¦) /stocks/ $ load AMZN
-Loading Daily AMZN stock with starting period 2019-05-15 for analysis.
-
-Datetime: 2022 May 19 05:33
-Timezone: America/New_York
-Currency: USD
-Market: OPEN
-Company: Amazon.com, Inc.
-
- AMZN Performance
-βββββββββββ³βββββββββ³βββββββββββ³βββββββββββ³βββββββββββ³ββββββββββββββββββ³βββββββββββββββββββ³βββββββββββββ
-β 1 Day β 1 Week β 1 Month β 1 Year β YTD β Volatility (1Y) β Volume (10D avg) β Last Price β
-β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
-β -3.34 % β 1.65 % β -32.26 % β -33.71 % β -37.14 % β 31.36 % β 5.51 M β 2142.25 β
-βββββββββββ΄βββββββββ΄βββββββββββ΄βββββββββββ΄βββββββββββ΄ββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββ
+Loading Daily data for AMZN with starting period 2020-01-09.
```
The default values you see within `load -h` have been inputted here. E.g. the starting period is 2019-05-15. I can decide to change these default values by calling the argument and inputting a different value.
@@ -103,22 +94,9 @@ Whenever you wish to apply an optional argument, you use the related shortcode,
Let's change the starting and ending period of the data that is being loaded in by doing the following:
```
-2022 May 19, 05:38 (π¦) /stocks/ $ load AMZN -s 2005-01-01 -e 2010-01-01
+2023 Jan 13, 11:23 (π¦) /stocks/ $ load AMZN -s 2005-01-01 -e 2010-01-01
-Loading Daily AMZN stock with starting period 2005-01-01 for analysis.
-
-Datetime: 2022 May 19 05:43
-Timezone: America/New_York
-Currency: USD
-Market: OPEN
-Company: Amazon.com, Inc.
-
- AMZN Performance
-βββββββββββ³ββββββββββ³ββββββββββ³βββββββββββ³βββββββββββ³ββββββββββββββββββ³βββββββββββββββββββ³βββββββββββββ
-β 1 Day β 1 Week β 1 Month β 1 Year β Period β Volatility (1Y) β Volume (10D avg) β Last Price β
-β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
-β -3.51 % β -3.18 % β -2.87 % β 162.32 % β 203.73 % β 49.78 % β 8.53 M β 134.52 β
-βββββββββββ΄ββββββββββ΄ββββββββββ΄βββββββββββ΄βββββββββββ΄ββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββ
+Loading Daily data for AMZN with starting period 2005-01-03.
```
We can check that this period has changed by looking into the candle chart with `candle`. This, again shares the same `-h` argument. This results in the following which indeed depicts our selected period.
diff --git a/website/content/terminal/guides/intros/stocks/index.md b/website/content/terminal/guides/intros/stocks/index.md
index b702ca5af23..70326e243a8 100644
--- a/website/content/terminal/guides/intros/stocks/index.md
+++ b/website/content/terminal/guides/intros/stocks/index.md
@@ -109,12 +109,12 @@ load -h
Prints the dialogue on the screen:
```console
-options:
+optional arguments:
-t TICKER, --ticker TICKER
Stock ticker (default: None)
-s START, --start START
- The starting date (format YYYY-MM-DD) of the stock (default: 2019-11-27)
- -e END, --end END The ending date (format YYYY-MM-DD) of the stock (default: 2022-12-01)
+ The starting date (format YYYY-MM-DD) of the stock (default: 2020-01-09)
+ -e END, --end END The ending date (format YYYY-MM-DD) of the stock (default: 2023-01-13)
-i {1,5,15,30,60}, --interval {1,5,15,30,60}
Intraday stock minutes (default: 1440)
-p, --prepost Pre/After market hours. Only works for 'yf' source, and intraday data (default: False)
@@ -124,6 +124,8 @@ options:
-w, --weekly Load weekly data (default: False)
-r {ytd,1y,2y,5y,6m}, --iexrange {ytd,1y,2y,5y,6m}
Range for using the iexcloud api. Longer range requires more tokens in account (default: ytd)
+ --exchange Show exchange information. (default: False)
+ --performance Show performance information. (default: False)
-h, --help show this help message (default: False)
--export EXPORT Export raw data into csv, json, xlsx (default: )
--source {YahooFinance,IEXCloud,AlphaVantage,Polygon,EODHD}
@@ -136,21 +138,10 @@ By default, a daily period, with three-years of OHLC+V data, from YahooFinance,
load SPY
```
-A message will print indicating the starting date from which the data begins along with a table summarizing its recent performance.
+A message will print indicating the starting date from which the data begins.
```console
Loading Daily data for SPY with starting period 2019-11-27.
-
-Company: SPDR S&P 500
-Exchange: PCX
-Currency: USD
-
- SPY Performance
-ββββββββββ³βββββββββ³ββββββββββ³ββββββββββ³βββββββββββ³ββββββββββββββββββ³βββββββββββββββββββ³βββββββββββββ
-β 1 Day β 1 Week β 1 Month β 1 Year β YTD β Volatility (1Y) β Volume (10D avg) β Last Price β
-β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
-β 2.97 % β 1.95 % β 5.56 % β -9.16 % β -13.67 % β 24.19 % β 67.92 M β 407.68 β
-ββββββββββ΄βββββββββ΄ββββββββββ΄ββββββββββ΄βββββββββββ΄ββββββββββββββββββ΄βββββββββββββββββββ΄βββββββββββββ
```
A simple way to get the entire history available from a source is to use an arbitrary starting date from a long time ago, like `1900-01-01`.
@@ -187,10 +178,6 @@ The performance table will not be displayed with intraday data, and we can see t
```console
Loading Intraday 1min data for SPY with starting period 2022-11-25.
-
-Company: SPDR S&P 500
-Exchange: PCX
-Currency: USD
```
This can be augmented further by adding pre/post market price candles. The `-p` flag is only applicable to YahooFinance, Polygon will automatically include the candles from 4AM-8PM US/Eastern when intraday is selected.
@@ -208,10 +195,6 @@ load spy -s 1990-01-01 -m --export spy_monthly.csv
```console
Loading Daily data for SPY with starting period 1993-02-01.
-Company: SPDR S&P 500
-Exchange: PCX
-Currency: USD
-
Saved file: /Users/{username}/OpenBBUserData/exports/spy_monthly.csv
```
@@ -281,7 +264,7 @@ The output will look like:
```console
135 news articles for SPDR+S&P+500 were found since 2022-11-24
- Earnings Results: Big Lots to address weak results with even lower prices: βWe will own bargains and treasuresβ
+ Earnings Results: Big Lots to address weak results with even lower prices: βWe will own bargains and treasuresβ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Content β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
@@ -292,7 +275,7 @@ The output will look like:
β https://www.marketwatch.com/story/big-lots-to-address-weak-results-with-even-lower-prices-we-will-own-bargains-and-treasures-11669920117 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Costco's Sales Update Slams the Stock. Strong Grocery Sales Weren't Enough.
+ Costco's Sales Update Slams the Stock. Strong Grocery Sales Weren't Enough.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Content β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
@@ -303,7 +286,7 @@ The output will look like:
β https://www.barrons.com/articles/costco-november-sales-51669916824 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Investors Pull $8 Billion From Major Stock ETFs
+ Investors Pull $8 Billion From Major Stock ETFs
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Content β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
@@ -327,7 +310,7 @@ tob
Which displays an output like:
```console
- SPY Top of Book
+ SPY Top of Book
ββββββββββββ³ββββββββββββ³ββββββββββββ³βββββββββββ
β Bid Size β Bid Price β Ask Price β Ask Size β
β‘ββββββββββββββββββββββββββββββββββββββββββββββ©
@@ -354,7 +337,7 @@ quote
Displays a table:
```console
- Ticker Quote
+ Ticker Quote
ββββββββββββββββββ³βββββββββββββββ
β β SPY β
β‘ββββββββββββββββββββββββββββββββ©
@@ -393,7 +376,7 @@ load aapl/codes
Prints the output:
```console
- AAPL Codes
+ AAPL Codes
ββββββββββββββββββββ³βββββββββββββββ
β β β
β‘ββββββββββββββββββββββββββββββββββ©
@@ -451,7 +434,7 @@ search -s technology --country india -e india --export csv
The results returned are:
```console
- Companies found on an exchange in India in India within Technology
+ Companies found on an exchange in India in India within Technology
βββββββββββββββββ³ββββββββββββββββββββββββββββββββββ³ββββββββββ³βββββββββββββ³ββββββββββββββββββββββββββββββββββ³βββββββββββ
β β Name β Country β Sector β Industry β Exchange β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©