mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 20:42:26 +00:00
Hotfix/docs - Some Intros Updates. (#4777)
* removes .ini from screener preset examples * updates sdk economy intro * Update economy intro guide screenshot Swaps screenshot with new chart * updates terminal stocks intro * updates screenshots for stocks intro
This commit is contained in:
126
website/content/sdk/usage/intros/economy.md
vendored
126
website/content/sdk/usage/intros/economy.md
vendored
@@ -26,26 +26,32 @@ Below is brief description of each function within the Economy module:
|
||||
| Path | Type | Description |
|
||||
| :---------------------------------- | :--------: | -------------------------------------------------------------: |
|
||||
| openbb.economy.available_indices | Dictionary | Curated List of Global Indices |
|
||||
| openbb.economy.balance | Function | Global Government Deficit/Surplus |
|
||||
| openbb.economy.balance_chart | Function | Chart for `balance` |
|
||||
| openbb.economy.bigmac | Function | The Big Mac Index |
|
||||
| openbb.economy.bigmac_chart | Function | Chart for `bigmac` |
|
||||
| openbb.economy.ccpi | Function | CPI Components Data by Country |
|
||||
| openbb.economy.ccpi_chart | Function | Chart for `ccpi` |
|
||||
| openbb.economy.country_codes | Function | List of Three-Letter ISO Country Codes |
|
||||
| openbb.economy.cpi | Function | Monthly US CPI from AlphaVantage |
|
||||
| openbb.economy.cpi | Function | Harmonized CPI Data by Country |
|
||||
| openbb.economy.cpi_chart | Function | Chart for `cpi` |
|
||||
| openbb.economy.currencies | Function | Currencies from WSJ |
|
||||
| openbb.economy.debt | Function | Government Debt-to-GDP Ratio |
|
||||
| openbb.economy.debt_chart | Function | Chart for `debt` |
|
||||
| openbb.economy.events | Function | Economic Calendar |
|
||||
| openbb.economy.fgdp | Function | Real GDP Forecast by Country |
|
||||
| openbb.economy.fgdp_chart | Function | Chart for `fgdp` |
|
||||
| openbb.economy.fred_ids | Function | Search for a FRED series ID by keyword |
|
||||
| openbb.economy.fred_notes | Function | Search by Keyword for Series Information |
|
||||
| openbb.economy.futures | Function | Current Prices of Commodities |
|
||||
| openbb.economy.future | Function | Current Prices of Commodities and Futures from FinViz |
|
||||
| openbb.economy.futures | Function | Current Prices of Commodities and Futures from WSJ |
|
||||
| openbb.economy.gdpc | Function | US GDP per Capita from AlphaVantage |
|
||||
| openbb.economy.gdpc_chart | Function | Chart for `gdpc` |
|
||||
| openbb.economy.get_events_countries | List | List of Countries for Events Function |
|
||||
| openbb.economy.get_groups | List | List of Groups for Performance and Valuation Functions |
|
||||
| openbb.economy.glbonds | Function | Table of Select 10 Year Sovereign Bonds from WSJ |
|
||||
| openbb.economy.indices | Function | Top US Indices from WSJ |
|
||||
| openbb.economy.index | Function | Historical Daily Data for Indices from YahooFinance |
|
||||
| openbb.economy.index_chart | Function | Chart for `index` |
|
||||
| openbb.economy.inf | Function | US Inflation Prints from AlphaVantage |
|
||||
| openbb.economy.inf_chart | Function | Chart for `inf` |
|
||||
| openbb.economy.macro | Function | Gets Series Data from EconDB |
|
||||
| openbb.economy.macro_chart | Function | Chart for `macro` |
|
||||
| openbb.economy.macro_countries | List | List of Countries Accepted by Macro Function |
|
||||
@@ -53,20 +59,22 @@ Below is brief description of each function within the Economy module:
|
||||
| openbb.economy.overview | Function | General Market Overview from WSJ |
|
||||
| openbb.economy.perfmap | Function | Opens a Browser to Performance Map from Finviz |
|
||||
| openbb.economy.performance | Function | Performance Data (get_groups) |
|
||||
| openbb.economy.revenue | Function | Government Revenues by Country |
|
||||
| openbb.economy.revenue_chart | Function | Chart for `revenue` |
|
||||
| openbb.economy.rgdp | Function | Real GDP by Country |
|
||||
| openbb.economy.rgdp_chart | Function | Chart for `rgdp` |
|
||||
| openbb.economy.rtps | Function | Real-Time Performance by Sector (US Markets) from AlphaVantage |
|
||||
| openbb.economy.rtps_chart | Function | Chart of `rtps` |
|
||||
| openbb.economy.search_index | Function | Search for a Global Index by Name |
|
||||
| openbb.economy.spending | Function | General Government Spending by Year and Country |
|
||||
| openbb.economy.spending_chart | Function | Chart for `spending` |
|
||||
| openbb.economy.treasury | Function | US Treasuries Data |
|
||||
| openbb.economy.treasury_chart | Function | Chart for `treasury` |
|
||||
| openbb.economy.treasury_maturities | Function | Table of Accepted Values for Maturities Argument in `treasury` |
|
||||
| openbb.economy.tyld | Function | Historical Treasury Yields from AlphaVantage |
|
||||
| openbb.economy.tyld_chart | Function | Chart of `tyld` |
|
||||
| openbb.economy.unemp | Function | Historical US Unemployment Data from AlphaVantage |
|
||||
| openbb.economy.unemp_chart | Function | Chart of `unemp` |
|
||||
| openbb.economy.trust | Function | Trust in Government (OECD) as a % by Country |
|
||||
| openbb.economy.trust_chart | Function | Chart for `trust` |
|
||||
| openbb.economy.usbonds | Function | Table of Current Rate, Yield, and Yield Change |
|
||||
| openbb.economy.valuation | Function | Valuation for Group from (get_gropus) |
|
||||
| openbb.economy.ycrv | Function | Current and Historical US Yield Curve Data from FRED |
|
||||
| openbb.economy.ycrv_chart | Function | Chart for `ycrv` |
|
||||
|
||||
Alternatively, the contents of the economy, or function docstrings, is printed with:
|
||||
|
||||
@@ -83,7 +91,6 @@ The examples will assume that this code block is included with the import statem
|
||||
```python
|
||||
from openbb_terminal.sdk import openbb
|
||||
import pandas as pd
|
||||
%matplotlib inline
|
||||
```
|
||||
|
||||
### Index
|
||||
@@ -112,21 +119,22 @@ indexes
|
||||
This list can be filtered:
|
||||
|
||||
```python
|
||||
indexes.filter(like = 'sp_', axis = 0)
|
||||
filtered = indexes.name.str.contains('s&p', case = False)
|
||||
indexes[filtered].head(10)
|
||||
```
|
||||
|
||||
| | name | ticker |
|
||||
| :----------------------- | :------------------------------------------------- | :------------ |
|
||||
| sp_xsp | S&P 500 Mini SPX Options Index | ^XSP |
|
||||
| sp_energy_ig | S&P 500 Energy (Industry Group) Index | ^SP500-1010 |
|
||||
| sp_energy_equipment | S&P 500 Energy Equipment & Services Industry Index | ^SP500-101010 |
|
||||
| sp_energy_oil | S&P 500 Oil, Gas & Consumable Fuels Industry Index | ^SP500-101020 |
|
||||
| sp_materials_sector | S&P 500 Materials Sector Index | ^SP500-15 |
|
||||
| sp_utilities_sector | S&P 500 Utilities Sector Index | ^SP500-55 |
|
||||
| sp_utilities_electricity | S&P 500 Electric Utilities Index | ^SP500-551010 |
|
||||
| sp_utilities_multis | S&P 500 Multi-Utilities Industry Index | ^SP500-551030 |
|
||||
| sp_re_sector | S&P 500 Real Estate Sector Index | ^SP500-60 |
|
||||
| sp_re_ig | S&P 500 Real Estate (Industry Group) Index | ^SP500-6010 |
|
||||
| | name | ticker |
|
||||
|:----------|:------------------------------------|:---------|
|
||||
| sp500 | S&P 500 Index | ^GSPC |
|
||||
| sp400 | S&P 400 Mid Cap Index | ^SP400 |
|
||||
| sp600 | S&P 600 Small Cap Index | ^SP600 |
|
||||
| sp500tr | S&P 500 TR Index | ^SP500TR |
|
||||
| sp_xsp | S&P 500 Mini SPX Options Index | ^XSP |
|
||||
| ca_banks | S&P/TSX Composite Banks Index (CAD) | TXBA.TS |
|
||||
| ar_mervel | S&P MERVAL TR Index (USD) | M.BA |
|
||||
| eu_speup | S&P Europe 350 Index (EUR) | ^SPEUP |
|
||||
| uk_spuk | S&P United Kingdom Index (PDS) | ^SPUK |
|
||||
| in_bse | S&P Bombay SENSEX (INR) | ^BSESN |
|
||||
|
||||
One index, or multiple, can be requested as a single DataFrame:
|
||||
|
||||
@@ -148,7 +156,7 @@ This can also be displayed as a chart:
|
||||
openbb.economy.index_chart(indices = ['sp_energy_oil', 'sp_energy_equipment', 'sp_energy_ig'])
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### Performance
|
||||
|
||||
@@ -219,35 +227,35 @@ Help on Operation in module openbb_terminal.core.library.operation:
|
||||
With no arguments, `events` will return the calendar from today:
|
||||
|
||||
```python
|
||||
openbb.economy.events()
|
||||
openbb.economy.events().head(10)
|
||||
```
|
||||
|
||||
| | Time (GMT) | Country | Event | actual | consensus | previous | Date |
|
||||
| --: | :--------- | :------------- | :----------------------- | :----- | :-------- | :------- | :--------- |
|
||||
| 0 | 02:00 | United Kingdom | Car Registration | -40.4% | - | 227.2% | 2022-11-17 |
|
||||
| 1 | 02:00 | United Kingdom | Car Registration | 26.4% | - | 4.6% | 2022-11-17 |
|
||||
| 2 | 02:00 | Italy | Italian Car Registration | 14.6% | - | 5.4% | 2022-11-17 |
|
||||
| 3 | 02:00 | Italy | Italian Car Registration | 4.4% | - | 55.9% | 2022-11-17 |
|
||||
| 4 | 02:00 | Switzerland | Trade Balance | 4.140B | - | 4.193B | 2022-11-17 |
|
||||
| 56 | 13:00 | United States | 10-Year TIPS Auction | 1.485% | - | 1.248% | 2022-11-17 |
|
||||
| 57 | 18:30 | Japan | CPI, n.s.a | - | - | 0.4% | 2022-11-17 |
|
||||
| 58 | 18:30 | Japan | National Core CPI | - | 3.5% | 3.0% | 2022-11-17 |
|
||||
| 59 | 18:30 | Japan | National CPI | - | - | 3.0% | 2022-11-17 |
|
||||
| 60 | 19:01 | United Kingdom | GfK Consumer Confidence | - | -52 | -47 | 2022-11-17 |
|
||||
| | Time (ET) | Country | Event | Actual | Consensus | Previous | Date |
|
||||
|---:|:------------|:---------------|:---------------------------------------|:---------|:------------|:-----------|:-----------|
|
||||
| 0 | 01:45 | Germany | German Buba President Nagel Speaks | - | - | - | 2023-04-13 |
|
||||
| 1 | 01:45 | Germany | German Buba Vice President Buch Speaks | - | - | - | 2023-04-13 |
|
||||
| 2 | 02:00 | United Kingdom | Construction Output | 2.4% | 0.9% | -1.7% | 2023-04-13 |
|
||||
| 3 | 02:00 | United Kingdom | U.K. Construction Output | 5.7% | 1.6% | 3.3% | 2023-04-13 |
|
||||
| 4 | 02:00 | United Kingdom | GDP | 0.0% | 0.1% | 0.4% | 2023-04-13 |
|
||||
| 5 | 02:00 | United Kingdom | Index of Services | 0.1% | -0.2% | 0.1% | 2023-04-13 |
|
||||
| 6 | 02:00 | United Kingdom | Industrial Production | -0.2% | 0.2% | -0.5% | 2023-04-13 |
|
||||
| 7 | 02:00 | United Kingdom | Industrial Production | -3.1% | -3.7% | -3.2% | 2023-04-13 |
|
||||
| 8 | 02:00 | United Kingdom | Manufacturing Production | -2.4% | -4.7% | -2.8% | 2023-04-13 |
|
||||
| 9 | 02:00 | United Kingdom | Manufacturing Production | 0.0% | 0.2% | -0.1% | 2023-04-13 |
|
||||
|
||||
Calendar events can be requested for a specific countries and date ranges:
|
||||
|
||||
```python
|
||||
openbb.economy.events(countries = ['United States'], start_date = '2022-11-18', end_date = '2022-11-18')
|
||||
openbb.economy.events(countries = ['United States'], start_date = '2022-11-18', end_date = '2022-11-18').head(5)
|
||||
```
|
||||
|
||||
| | Time (GMT) | Country | Event | actual | consensus | previous | Date |
|
||||
| --: | :--------- | :------------ | :-------------------------------- | :----- | :-------- | :------- | :--------- |
|
||||
| 0 | 10:00 | United States | Existing Home Sales | - | 4.38M | 4.71M | 2022-11-18 |
|
||||
| 1 | 10:00 | United States | Existing Home Sales | - | - | -1.5% | 2022-11-18 |
|
||||
| 2 | 10:00 | United States | US Leading Index | - | -0.4% | -0.4% | 2022-11-18 |
|
||||
| 3 | 13:00 | United States | U.S. Baker Hughes Oil Rig Count | - | - | 622 | 2022-11-18 |
|
||||
| 4 | 13:00 | United States | U.S. Baker Hughes Total Rig Count | - | - | 779 | 2022-11-18 |
|
||||
| | Time (ET) | Country | Event | Actual | Consensus | Previous | Date |
|
||||
|---:|:------------|:--------------|:--------------------------------|:---------|:------------|:-----------|:-----------|
|
||||
| 0 | 09:40 | United States | Fed Collins Speaks | - | - | - | 2022-11-18 |
|
||||
| 1 | 11:00 | United States | Existing Home Sales | -5.9% | - | -1.5% | 2022-11-18 |
|
||||
| 2 | 11:00 | United States | Existing Home Sales | 4.43M | 4.38M | 4.71M | 2022-11-18 |
|
||||
| 3 | 11:00 | United States | US Leading Index | -0.8% | -0.4% | -0.5% | 2022-11-18 |
|
||||
| 4 | 14:00 | United States | U.S. Baker Hughes Oil Rig Count | 623 | - | 622 | 2022-11-18 |
|
||||
|
||||
### FRED
|
||||
|
||||
@@ -332,15 +340,15 @@ data,units,denomination = openbb.economy.macro(parameters = ['Y10YD'], countries
|
||||
data.tail(10)
|
||||
```
|
||||
|
||||
| date | France | Germany | Italy | Poland | Spain | United States |
|
||||
| :------------------ | -----: | ------: | ----: | -----: | ----: | ------------: |
|
||||
| 2022-01-01 00:00:00 | 0.31 | -0.12 | 1.35 | 4 | 0.66 | 1.76 |
|
||||
| 2022-02-01 00:00:00 | 0.68 | 0.15 | 1.79 | 3.95 | 1.11 | 1.93 |
|
||||
| 2022-03-01 00:00:00 | 0.78 | 0.28 | 1.85 | 4.83 | 1.22 | 2.13 |
|
||||
| 2022-04-01 00:00:00 | 1.28 | 0.75 | 2.44 | 5.96 | 1.69 | 2.75 |
|
||||
| 2022-05-01 00:00:00 | 1.52 | 0.95 | 2.99 | 6.64 | 2.04 | 2.9 |
|
||||
| 2022-06-01 00:00:00 | 2.06 | 1.45 | 3.64 | 7.14 | 2.63 | 3.14 |
|
||||
| 2022-07-01 00:00:00 | 1.71 | 1.08 | 3.36 | 6.37 | 2.31 | 2.9 |
|
||||
| 2022-08-01 00:00:00 | 1.69 | 1.03 | 3.3 | 5.8 | 2.15 | 2.9 |
|
||||
| 2022-09-01 00:00:00 | 2.41 | 1.8 | 4.14 | 6.28 | 2.92 | 3.52 |
|
||||
| 2022-10-01 00:00:00 | 2.77 | 2.19 | 4.53 | 7.82 | 3.29 | 3.98 |
|
||||
| date | France | Germany | Italy | Poland | Spain | United States |
|
||||
|:--------------------|----------------------:|-----------------------:|---------------------:|----------------------:|---------------------:|-----------------------------:|
|
||||
| 2022-05-01 | 1.52 | 0.95 | 2.99 | 6.64 | 2.04 | 2.9 |
|
||||
| 2022-06-01 | 2.06 | 1.45 | 3.64 | 7.14 | 2.63 | 3.14 |
|
||||
| 2022-07-01 | 1.71 | 1.08 | 3.36 | 6.37 | 2.31 | 2.9 |
|
||||
| 2022-08-01 | 1.69 | 1.03 | 3.3 | 5.8 | 2.15 | 2.9 |
|
||||
| 2022-09-01 | 2.41 | 1.8 | 4.14 | 6.28 | 2.92 | 3.52 |
|
||||
| 2022-10-01 | 2.77 | 2.19 | 4.53 | 7.82 | 3.29 | 3.98 |
|
||||
| 2022-11-01 | 2.58 | 2.07 | 4.24 | 7.24 | 3.07 | 3.89 |
|
||||
| 2022-12-01 | 2.62 | 2.09 | 4.26 | 6.61 | 3.09 | 3.62 |
|
||||
| 2023-01-01 | 2.69 | 2.19 | 4.24 | 6.02 | 3.2 | 3.53 |
|
||||
| 2023-02-01 | 2.87 | 2.37 | 4.27 | 6.18 | 3.39 | 3.75 |
|
||||
|
||||
@@ -149,7 +149,7 @@ It is a good idea to test choices made before making it too complicated. Start w
|
||||
### Performance
|
||||
|
||||
```python
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_type = 'performance')
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset', data_type = 'performance')
|
||||
```
|
||||
|
||||
| | Ticker | Perf Week | Perf Month | Perf Quart | Perf Half | Perf Year | Perf YTD | Volatility W | Volatility M | Recom | Avg Volume | Rel Volume | Price | Change | Volume |
|
||||
@@ -177,7 +177,7 @@ Beta = Under 0.5
|
||||
Running the exact same command as before trims down the list to only eleven.
|
||||
|
||||
```python
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_type = 'performance')
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset', data_type = 'performance')
|
||||
```
|
||||
|
||||
| | Ticker | Perf Week | Perf Month | Perf Quart | Perf Half | Perf Year | Perf YTD | Volatility W | Volatility M | Recom | Avg Volume | Rel Volume | Price | Change | Volume |
|
||||
@@ -200,7 +200,7 @@ openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_
|
||||
We know know that these eleven companies have a beta relative to the S&P of under 0.5, and that they all have a price-to-free-cashflow ratio under 15. The `signal` argument has also been set as `Major News`, so we know at least this much about the companies and their relative performance over the last year. Setting the `data_type` to 'overview', will fetch the data which helps us understand who these companies are.
|
||||
|
||||
```python
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_type = 'overview')
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset', data_type = 'overview')
|
||||
```
|
||||
|
||||
| | Ticker | Company | Sector | Industry | Country | Market Cap | P/E | Price | Change | Volume |
|
||||
@@ -223,7 +223,7 @@ openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_
|
||||
When `data_type = 'ownership'`, data presented are statistics for the general float, insider, institutional, and the short ratio.
|
||||
|
||||
```python
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_type = 'ownership')
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset', data_type = 'ownership')
|
||||
```
|
||||
|
||||
| | Ticker | Market Cap | Outstanding | Float | Insider Own | Insider Trans | Inst Own | Inst Trans | Float Short | Short Ratio | Avg Volume | Price | Change | Volume |
|
||||
@@ -246,7 +246,7 @@ openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_
|
||||
With `data_type` set to `technical`, aspects of technical analysis is returned.
|
||||
|
||||
```python
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset.ini', data_type = 'technical')
|
||||
openbb.stocks.screener.screener_data(preset_loaded='sdk_guide_preset', data_type = 'technical')
|
||||
```
|
||||
|
||||
| | Ticker | Beta | ATR | SMA20 | SMA50 | SMA200 | 52W High | 52W Low | RSI | Price | Change | from Open | Gap | Volume |
|
||||
@@ -304,11 +304,11 @@ Copy and past the block above into any text editor; then save the file, as `sp50
|
||||
from openbb_terminal.sdk import openbb
|
||||
import pandas as pd
|
||||
|
||||
sp500_overview = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter.ini', data_type = 'overview')
|
||||
sp500_ownership = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter.ini', data_type = 'ownership')
|
||||
sp500_performance = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter.ini', data_type = 'performance')
|
||||
sp500_technical = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter.ini', data_type = 'technical')
|
||||
sp500_valuation = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter.ini', data_type = 'valuation')
|
||||
sp500_overview = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter', data_type = 'overview')
|
||||
sp500_ownership = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter', data_type = 'ownership')
|
||||
sp500_performance = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter', data_type = 'performance')
|
||||
sp500_technical = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter', data_type = 'technical')
|
||||
sp500_valuation = openbb.stocks.screener.screener_data(preset_loaded='sp500_filter', data_type = 'valuation')
|
||||
|
||||
sp500_overview = sp500_overview.convert_dtypes()
|
||||
sp500_ownership = sp500_ownership.convert_dtypes()
|
||||
|
||||
@@ -3,30 +3,39 @@ title: Stocks
|
||||
keywords: [stocks, fundamental analysis, analysis, Behavioural, strategy, comparison, due diligence, discovery, dark pool, short, data, forecasting, fundamental, quantitative, government, forecasting, ml, ai, machine learning, artificial intelligence, insider, trading, research, sector, industry, technical, trading hours, quote, market data, close, adjusted close, download, export, tools, openbb terminal]
|
||||
description: The Stocks menu is the high-level menu for the Public Equity asset class. It contains functions for searching and loading company market data, showing candle charts, quotes and company specifics via a large selection of sub-menus. The sub-menus break the functions down into groups based on the type of data they return. They are listed below with a short description. Refer to each sub-menu's introductory guide for a more detailed explanation of the functions within.
|
||||
---
|
||||
The Stocks menu is the high-level menu for the Public Equity asset class. It contains functions for searching and loading company market data, showing candle charts, quotes and company specifics via a large selection of sub-menus. The sub-menus break the functions down into groups based on the type of data they return. The items in the stocks menu are listed below with a short description. Refer to each sub-menu's introductory guide for a more detailed explanation of the functions within.
|
||||
|
||||
The Stocks menu is the high-level menu for the Public Equity asset class. It contains functions for searching and loading company market data, showing candle charts, quotes and company specifics via a large selection of sub-menus. The sub-menus break the functions down into groups based on the type of data they return. They are listed below with a short description. Refer to each sub-menu's introductory guide for a more detailed explanation of the functions within.
|
||||
## Menu Contents
|
||||
|
||||
|Command |Sub-Menu |Description |
|
||||
|:---------|------------:|----------------------:|
|
||||
|ba |Behavioural Analysis |Social Media, Sentiment, Trends |
|
||||
|bt |Strategy Backtester | Simple EMA, EMA Crossover & RSI Strategies |
|
||||
|ca |Comparison Analysis |Compare Historical Prices, Correlations, Financials |
|
||||
|disc |Discovery |Upcoming Earnings and Dividends Calendar, Heatmaps, Trending News |
|
||||
|dps |Dark Pool and Short Data |Short Interest, Borrow Rates, Off-Exchange Short Volume |
|
||||
|fa |Fundamental Analysis |Financial Statements, Company Overviews, Analyst Coverage, Price Targets |
|
||||
|forecast |Forecasting and ML |Enter the Forecast Menu With the Loaded Ticker |
|
||||
|gov |Government |House and Senate Trading Disclosures, Lobbying Efforts, US Treasury Spending |
|
||||
|ins |Insider Trading |SEC Form 4 Disclosures & Screener |
|
||||
|options |Equity Options |Options Analysis, Quotes, Historical Prices, Greeks & Screener |
|
||||
|qa |Quantitative Analysis |Mathematical Analysis |
|
||||
|res |Research Websites |Shortcuts to Online Resources for the Loaded Ticker |
|
||||
|scr |Stocks Screener |Custom Stocks Screener |
|
||||
|sia |Sector & Industry Analysis |Find and Compare by Region, Sector, Industry & Market Cap |
|
||||
|ta |Technical Analysis |Technical Indicators and Charts |
|
||||
|th |Trading Hours |Lists of World Markets and Current Status |
|
||||
| Command | Type | Name | Description |
|
||||
| :------- | -------- | -----------------------: | ---------------------------------------------------------------------------: |
|
||||
| ba | Sub-Menu | Behavioural Analysis | Social Media, Sentiment, Trends |
|
||||
| bt | Sub-Menu | Strategy Backtester | Simple EMA, EMA Crossover & RSI Strategies |
|
||||
| ca | Sub-Menu | Comparison Analysis | Compare Historical Prices, Correlations, Financials |
|
||||
| candle | Function | Candle | Candlestick Chart of the Loaded Data |
|
||||
| codes | Function | Codes | Cross-Reference FIGI, CIK, and SIC Numbers |
|
||||
| disc | Sub-Menu | Discovery | Upcoming Earnings and Dividends Calendar, Heatmaps, Trending News |
|
||||
| dps | Sub-Menu | Dark Pool and Short Data | Short Interest, Borrow Rates, Off-Exchange Short Volume |
|
||||
| fa | Sub-Menu | Fundamental Analysis | Financial Statements, Company Overviews, Analyst Coverage, Price Targets |
|
||||
| forecast | Sub-Menu | Forecasting and ML | Enter the Forecast Menu With the Loaded Ticker |
|
||||
| gov | Sub-Menu | Government | House and Senate Trading Disclosures, Lobbying Efforts, US Treasury Spending |
|
||||
| ins | Sub-Menu | Insider Trading | SEC Form 4 Disclosures & Screener |
|
||||
| load | Function | Load | Load a Ticker Symbol |
|
||||
| news | Function | News | Ticker-Specific News Headlines |
|
||||
| options | Sub-Menu | Equity Options | Options Analysis, Quotes, Historical Prices, Greeks & Screener |
|
||||
| qa | Sub-Menu | Quantitative Analysis | Mathematical Analysis |
|
||||
| quote | Function | Quote | Current Price and Performance Data for the Ticker |
|
||||
| res | Sub-Menu | Research Websites | Shortcuts to Online Resources for the Loaded Ticker |
|
||||
| scr | Sub-Menu | Stocks Screener | Custom Stocks Screener |
|
||||
| search | Function | Stocks Search | Find a company and ticker |
|
||||
| ta | Sub-Menu | Technical Analysis | Technical Indicators and Charts |
|
||||
| th | Sub-Menu | Trading Hours | Lists of World Markets and Current Status |
|
||||
| tob | Function | Top of Book | Top of Book Bid/Ask from CBOE (US-only when markets are open) |
|
||||
|
||||
## How to Use
|
||||
|
||||
Navigate to the menu by entering, `stocks`, from the Main Menu. From another menu, `/stocks`, will jump directly there.
|
||||
|
||||
The current screen can always be re-printed with any of: `?`, `h`, `help`. The help dialogue, containing all parameters for each function, is printed when `-h` is attached to any command. The help dialogue will also provide the list of sources available to each command, the `news` function is shown below.
|
||||
|
||||
```console
|
||||
@@ -36,12 +45,11 @@ news -h
|
||||
Which prints the reference information on the screen:
|
||||
|
||||
```console
|
||||
usage: news [-t TICKER] [-d N_START_DATE] [-o] [-s SOURCES] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT]
|
||||
[--source {Feedparser,NewsApi}]
|
||||
usage: news [-t TICKER] [-d N_START_DATE] [-o] [-s SOURCES] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT] [--source {Feedparser,NewsApi,Ultima}]
|
||||
|
||||
latest news of the company
|
||||
|
||||
optional arguments:
|
||||
options:
|
||||
-t TICKER, --ticker TICKER
|
||||
Ticker to get data for
|
||||
-d N_START_DATE, --date N_START_DATE
|
||||
@@ -55,39 +63,48 @@ optional arguments:
|
||||
Name of excel sheet to save data to. Only valid for .xlsx files.
|
||||
-l LIMIT, --limit LIMIT
|
||||
Number of entries to show in data.
|
||||
--source {Feedparser,NewsApi}
|
||||
--source {Feedparser,NewsApi,Ultima}
|
||||
Data source to select from
|
||||
|
||||
For more information and examples, use 'about news' to access the related guide.
|
||||
```
|
||||
|
||||
The first step in many workflows will be to load a stock symbol with historical data. The amount, granularity, and market coverage will vary by source. Users can elect to subscribe to any of the data sources accordingly. While no API keys are required to get started using the Terminal, acquiring these credentials at the free level will enhance the user experience with additional functionality. Refer to the [API keys guide](https://docs.openbb.co/terminal/usage/guides/api-keys) for links to obtain each.
|
||||
|
||||
<img width="800" alt="image" src="https://user-images.githubusercontent.com/46355364/218974442-563cb216-623f-4f98-b2e1-9f1bb0e1a199.png"></img>
|
||||
|
||||
Attaching the source argument to a command enables users to select their preferred source. The default sources can be changed from the [`/sources` menu](https://docs.openbb.co/terminal/usage/guides/changing-sources). To select the `source` as `NewsApi`, use the block below.
|
||||
Attaching the source argument to a command selects a source other than the default, which can also be set permanently from the [`/sources` menu](https://docs.openbb.co/terminal/usage/guides/changing-sources). To select the `source` as `Ultima`, use the syntax below.
|
||||
|
||||
```console
|
||||
news --source NewsApi
|
||||
news -t WMT --source Ultima
|
||||
|
||||
------------------------
|
||||
> 2023-04-10 15:44:56 - The Federal Trade Commission and Justice Department should stop the acquisition of Albertsons by Kroger. The usual false claims are being made such as...
|
||||
|
||||
Relevancy score: 4.87/5 Stars
|
||||
|
||||
Competition Risk (Walmart Inc. faces competition risk due to the presence of other large retailers in the market, as well as physical, eCommerce and omni-channel retailers, social commerce platforms, wholesale club operators and retail intermediaries.
|
||||
These competitors have the ability to leverage their economies of scale to offer lower prices than Walmart, which can put pressure on Walmart’s margins.
|
||||
Additionally, these competitors have the ability to quickly respond to changes in the market, which can put Walmart at a disadvantage.
|
||||
Furthermore, Walmart is subject to laws and regulations related to competition and antitrust matters, which could require extensive system and operational changes, increase operating costs, and require significant capital expenditures.)
|
||||
|
||||
Read more: https://www.cincinnati.com/story/opinion/letters/2023/04/10/letters-kroger-acquiring-albertsons-will-reduce-competition-not-prices/70080423007/
|
||||
```
|
||||
|
||||
The first step in many workflows will be to load a stock symbol with historical data. The amount, granularity, and market coverage will vary by source. Users can elect to subscribe to any of the data sources accordingly. While no API keys are required to get started using the Terminal, acquiring these credentials at the free level significantly enhances the user experience with additional functionality and available data. Refer to the [API keys guide](https://docs.openbb.co/terminal/usage/guides/api-keys) for links to obtain each.
|
||||
|
||||
## Examples
|
||||
|
||||
### Load
|
||||
|
||||
The `load` function is a starting point for most functions, and parameters can be adjusted for intraday and resolution. It has many optional arguments which can be displayed for reference by attaching, `-h`, or, `--help`, to any function. Entering:
|
||||
|
||||
```console
|
||||
load -h
|
||||
```
|
||||
|
||||
Prints the dialogue on the screen:
|
||||
Reveals the choices:
|
||||
|
||||
```console
|
||||
usage: load [-t TICKER] [-s START] [-e END] [-i {1,5,15,30,60}] [-p] [-f FILEPATH] [-m] [-w] [--performance] [-h] [--export EXPORT]
|
||||
usage: load [-t TICKER] [-s START] [-e END] [-i {1,5,15,30,60}] [-p] [-f FILEPATH] [-m] [-w] [--exchange] [--performance] [-h] [--export EXPORT]
|
||||
[--sheet-name SHEET_NAME [SHEET_NAME ...]] [--source {YahooFinance,AlphaVantage,Polygon,EODHD,Intrinio}]
|
||||
|
||||
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'. See available market
|
||||
in https://help.yahoo.com/kb/exchanges-data-providers-yahoo-finance-sln2310.html.
|
||||
|
||||
optional arguments:
|
||||
-t TICKER, --ticker TICKER
|
||||
Stock ticker (default: None)
|
||||
@@ -96,23 +113,24 @@ optional arguments:
|
||||
-e END, --end END The ending date (format YYYY-MM-DD) of the stock (default: 2023-02-15)
|
||||
-i {1,5,15,30,60}, --interval {1,5,15,30,60}
|
||||
Intraday stock minutes (default: 1440)
|
||||
-p, --prepost Pre/After market hours. Only reflected in 'YahooFinance' intraday data. (default: False)
|
||||
-p, --prepost Pre/After market hours. Only reflected in intraday data. (default: False)
|
||||
-f FILEPATH, --file FILEPATH
|
||||
Path to load custom file. (default: None)
|
||||
-m, --monthly Load monthly data (default: False)
|
||||
-w, --weekly Load weekly data (default: False)
|
||||
--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: )
|
||||
--sheet-name SHEET_NAME [SHEET_NAME ...]
|
||||
Name of excel sheet to save data to. Only valid for .xlsx files. (default: None)
|
||||
--source {YahooFinance,AlphaVantage,Polygon,EODHD,Intrinio}
|
||||
--source {YahooFinance,AlphaVantage,Polygon,EODHD,Intrinio,DataBento}
|
||||
Data source to select from (default: YahooFinance)
|
||||
|
||||
For more information and examples, use 'about load' to access the related guide.
|
||||
|
||||
```
|
||||
|
||||
By default, a daily period, with three-years of OHLC+V data, from YahooFinance, is loaded to memory. Use the default settings like this:
|
||||
By default, a daily period of OHLC+V data over three years, from YahooFinance, is loaded to memory. Use the default settings like this:
|
||||
|
||||
```console
|
||||
load MSFT
|
||||
@@ -154,19 +172,19 @@ Intraday data is also requested this way, only using the `-i` or `--interval` ar
|
||||
load MSFT -i 1
|
||||
```
|
||||
|
||||
The performance table will not be displayed with intraday data, and we can see that five-days of one-minute candles are available from YahooFinance.
|
||||
From YahooFinance, five days of one-minute data is available. The amount of historical price data will vary by source.
|
||||
|
||||
```console
|
||||
Loading Intraday 1min data for MSFT with starting period 2022-11-25.
|
||||
```
|
||||
|
||||
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.
|
||||
This can be augmented further by adding pre/post market price candles.
|
||||
|
||||
```console
|
||||
load MSFT -i 1 -p
|
||||
```
|
||||
|
||||
Data can also be exported directly from the `load` function as a CSV, JSON, or XLSX file. The file is created in the OpenBBUserData folder.
|
||||
Data can also be exported, as a CSV, JSON, or XLSX file, directly from the `load` function. The file is created in the OpenBBUserData folder.
|
||||
|
||||
```console
|
||||
load MSFT -s 1990-01-01 -m --export msft_monthly.csv
|
||||
@@ -187,12 +205,12 @@ The `candle` command displays a chart of the loaded symbol. It needs no argument
|
||||
```console
|
||||
(🦋) /stocks/ $ load MSFT
|
||||
|
||||
cLoading Daily data for MSFT with starting period 2020-02-11.
|
||||
Loading Daily data for MSFT with starting period 2020-04-08.
|
||||
|
||||
(🦋) /stocks/ $ candle
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
The help dialogue for the `candle` command shows how this chart can be supplemented with additional data; specifically, `-t` for trend, `--ma` for moving averages, and `--log` for a log scale.
|
||||
|
||||
@@ -203,22 +221,21 @@ candle -h
|
||||
Which prints to screen:
|
||||
|
||||
```console
|
||||
usage: candle [-t TICKER] [-p] [--sort {adjclose,open,close,high,low,volume,returns,logret}] [-r] [--raw] [--trend] [--ma MOV_AVG] [--log] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT]
|
||||
usage: candle [-t TICKER] [-p] [--sort {open,high,low,close,adjclose,volume,dividends,stock_splits}] [-r] [--raw] [--trend] [--ma MOV_AVG] [--log] [-h] [--export EXPORT]
|
||||
[--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT]
|
||||
|
||||
Shows historic data for a stock
|
||||
|
||||
optional arguments:
|
||||
options:
|
||||
-t TICKER, --ticker TICKER
|
||||
Ticker to analyze (default: None)
|
||||
-p, --plotly Flag to show interactive plotly chart (default: True)
|
||||
--sort {adjclose,open,close,high,low,volume,returns,logret}
|
||||
-p, --prepost Pre/After market hours. Only works for 'yf' source, and intraday data (default: False)
|
||||
--sort {open,high,low,close,adjclose,volume,dividends,stock_splits}
|
||||
Choose a column to sort by. Only works when raw data is displayed. (default: )
|
||||
-r, --reverse Data is sorted in descending order by default. Reverse flag will sort it in an ascending way. Only works when raw data is displayed.
|
||||
(default: False)
|
||||
-r, --reverse Data is sorted in descending order by default. Reverse flag will sort it in an ascending way. Only works when raw data is displayed. (default: False)
|
||||
--raw Shows raw data instead of chart. (default: False)
|
||||
--trend Flag to add high and low trends to candle (default: False)
|
||||
--ma MOV_AVG Add moving average in number of days to plot and separate by a comma. Value for ma (moving average) keyword needs to be greater than 1.
|
||||
(default: None)
|
||||
--ma MOV_AVG Add moving average in number of days to plot and separate by a comma. Value for ma (moving average) keyword needs to be greater than 1. (default: None)
|
||||
--log Plot with y axis on log scale (default: False)
|
||||
-h, --help show this help message (default: False)
|
||||
--export EXPORT Export raw data into csv, json, xlsx and figure into png, jpg, pdf, svg (default: )
|
||||
@@ -230,13 +247,16 @@ optional arguments:
|
||||
For more information and examples, use 'about candle' to access the related guide.
|
||||
```
|
||||
|
||||
Be sure to adjust the values for moving averages to correspond with the interval of the data loaded. Below adds movings averages for one and four year periods (because data loaded is monthly), and changes the y-axis to a log-scale.
|
||||
Be sure to adjust the values for moving averages to correspond with the interval of the data loaded. Below adds movings averages for three and twelve month periods (because data loaded is monthly), and changes the y-axis to a log-scale.
|
||||
|
||||
```console
|
||||
candle --ma 20,30 --log
|
||||
load msft --start 1980-01-01 --monthly
|
||||
candle --ma 3,12 --log
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### News
|
||||
|
||||
Get ticker-related news headlines by entering `news` after loading a ticker.
|
||||
|
||||
@@ -244,45 +264,9 @@ Get ticker-related news headlines by entering `news` after loading a ticker.
|
||||
news --source NewsApi
|
||||
```
|
||||
|
||||
The output will look like:
|
||||

|
||||
|
||||
```console
|
||||
(🦋) /stocks/ $ news --source NewsApi
|
||||
|
||||
346 news articles for Tesla,+Inc. were found since 2023-02-08
|
||||
|
||||
Elon Musk says he may lead Twitter for almost another year
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Content ┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ 2023-02-15 07:57:55 │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ The billionaire executive embarked on a search for a new CEO for Twitter in December, a person familiar with the search said at the time. │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ https://www.moneycontrol.com/news/world/elon-musk-says-he-may-lead-twitter-for-almost-another-year-10088481.html │
|
||||
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
Elon Musk Gave $1.9 Billion of Tesla Shares to Charity Last Year
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Content ┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ 2023-02-15 06:46:08 │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ Tesla CEO Elon Musk now owns around 13% of the company. Elon Musk donated roughly $1.9 billion of Tesla Inc. stock to charity last year, according to a regulatory │
|
||||
│ filing made Tuesday. Mr. Musk, Tesla’s chief executive, reported having donated roughly 11.6 mil… │
|
||||
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ https://biztoc.com/x/99aa746544171bae │
|
||||
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
Elon Musk Aims to Find Twitter CEO Successor Toward End of 2023
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Content ┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ 2023-02-15 06:14:49 │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ Elon Musk is aiming to find his successor to lead Twitter Inc. as chief executive officer toward the end of 2023. │
|
||||
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
|
||||
│ https://www.bloomberg.com/news/articles/2023-02-15/musk-aims-to-replace-himself-as-twitter-ceo-toward-end-of-2023 │
|
||||
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
### TOB
|
||||
|
||||
The `tob` function is the "Top of Book", and it returns data during market hours.
|
||||
|
||||
@@ -290,217 +274,36 @@ The `tob` function is the "Top of Book", and it returns data during market hours
|
||||
tob
|
||||
```
|
||||
|
||||
Which displays an output like:
|
||||

|
||||
|
||||
```console
|
||||
SPY Top of Book
|
||||
┏━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━┓
|
||||
┃ Bid Size ┃ Bid Price ┃ Ask Price ┃ Ask Size ┃
|
||||
┡━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━┩
|
||||
│ 223.00 │ 407.60 │ 407.62 │ 536.00 │
|
||||
├──────────┼───────────┼───────────┼──────────┤
|
||||
│ 823.00 │ 407.59 │ 407.63 │ 436.00 │
|
||||
├──────────┼───────────┼───────────┼──────────┤
|
||||
│ 923.00 │ 407.58 │ 407.64 │ 836.00 │
|
||||
├──────────┼───────────┼───────────┼──────────┤
|
||||
│ 316.00 │ 407.57 │ 407.65 │ 936.00 │
|
||||
├──────────┼───────────┼───────────┼──────────┤
|
||||
│ 823.00 │ 407.56 │ 407.66 │ 636.00 │
|
||||
└──────────┴───────────┴───────────┴──────────┘
|
||||
```
|
||||
### Quote
|
||||
|
||||
Get the current market price, during exchange hours.
|
||||
Get the current market price and general performance metrics of the loaded ticker.
|
||||
|
||||
```console
|
||||
quote
|
||||
```
|
||||
|
||||
Displays a table:
|
||||

|
||||
|
||||
```console
|
||||
(🦋) /stocks/ $ quote
|
||||
|
||||
TSLA Quote
|
||||
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ ┃ ┃
|
||||
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ Symbol │ TSLA │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Name │ Tesla, Inc. │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Price │ 209.25 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Changes percentage │ 7.51 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Change │ 14.61 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Day low │ 189.45 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Day high │ 209.82 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Year high │ 384.29 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Year low │ 101.81 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Market cap │ 662.088 B │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Price avg50 │ 152.95 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Price avg200 │ 225.47 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Exchange │ NASDAQ │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Volume │ 214.769 M │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Avg volume │ 156755621 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Open │ 191.94 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Previous close │ 194.64 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Eps │ 3.44 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Pe │ 60.83 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Earnings announcement │ 2023-04-18 10:59:00 │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Shares outstanding │ 3.164 B │
|
||||
├───────────────────────┼─────────────────────┤
|
||||
│ Timestamp │ 1676408405 │
|
||||
└───────────────────────┴─────────────────────┘
|
||||
```
|
||||
### Codes
|
||||
|
||||
`codes` prints the CIK, Composite FIGI, Share Class FIGI, and SIC codes - when available - for a US-listed stock. This function requires a free API key from Polygon.
|
||||
|
||||
```console
|
||||
load aapl/codes
|
||||
codes
|
||||
```
|
||||
|
||||
Prints the output:
|
||||

|
||||
|
||||
### Search
|
||||
|
||||
The `search` function provides a way to find stocks by name, region, sector, industry and exchange location. The results can be exported as a CSV, JSON, or XLSX file from the command line or within the table.
|
||||
|
||||
Return all Canadian banks with US listings with:
|
||||
|
||||
```console
|
||||
AAPL Codes
|
||||
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
|
||||
┃ ┃ ┃
|
||||
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
|
||||
│ CIK │ 0000320193 │
|
||||
├──────────────────┼──────────────┤
|
||||
│ COMPOSITE FIGI │ BBG000B9XRY4 │
|
||||
├──────────────────┼──────────────┤
|
||||
│ SHARE CLASS FIGI │ BBG001S5N8V8 │
|
||||
├──────────────────┼──────────────┤
|
||||
│ SIC CODE │ 3571 │
|
||||
└──────────────────┴──────────────┘
|
||||
search --country canada --industrygroup banks
|
||||
```
|
||||
|
||||
The `search` function provides a way to find stocks by name, region, sector, industry and exchange location. The results can be easily exported as a CSV, JSON, or XLSX file.
|
||||
|
||||
```console
|
||||
search -h
|
||||
```
|
||||
|
||||
Prints the help dialogue for the command:
|
||||
|
||||
```console
|
||||
usage: search [-q QUERY [QUERY ...]] [-c country] [-s sector] [-i industry] [-e exchange] [-a] [-h] [--export EXPORT] [--sheet-name SHEET_NAME [SHEET_NAME ...]] [-l LIMIT]
|
||||
|
||||
Show companies matching the search query, country, sector, industry and/or exchange. Note that by default only the United States exchanges are searched which tend
|
||||
to contain the most extensive data for each company. To search all exchanges use the --all-exchanges flag.
|
||||
|
||||
optional arguments:
|
||||
-q QUERY [QUERY ...], --query QUERY [QUERY ...]
|
||||
The search term used to find company tickers (default: )
|
||||
-c country, --country country
|
||||
Search by country to find stocks matching the criteria (default: )
|
||||
-s sector, --sector sector
|
||||
Search by sector to find stocks matching the criteria (default: )
|
||||
-i industry, --industry industry
|
||||
Search by industry to find stocks matching the criteria (default: )
|
||||
-e exchange, --exchange exchange
|
||||
Search by a specific exchange country to find stocks matching the criteria (default: )
|
||||
-a, --all-exchanges Whether to search all exchanges, without this option only the United States market is searched. (default: False)
|
||||
-h, --help show this help message (default: False)
|
||||
--export EXPORT Export raw data into csv, json, xlsx (default: )
|
||||
--sheet-name SHEET_NAME [SHEET_NAME ...]
|
||||
Name of excel sheet to save data to. Only valid for .xlsx files. (default: None)
|
||||
-l LIMIT, --limit LIMIT
|
||||
Number of entries to show in data. (default: 10)
|
||||
|
||||
For more information and examples, use 'about search' to access the related guide.
|
||||
```
|
||||
|
||||
As an example, if you wish to obtain the ticker for Apple, you can do so with the following:
|
||||
|
||||
```
|
||||
(🦋) /stocks/ $ search -q apple
|
||||
|
||||
Companies found on term apple
|
||||
┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
|
||||
┃ ┃ Name ┃ Country ┃ Sector ┃ Industry ┃ Exchange ┃
|
||||
┡━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
|
||||
│ AAPL │ Apple Inc. │ United States │ Technology │ Consumer Electronics │ NMS │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ AGPL │ Apple Green Holding, Inc. │ Canada │ Technology │ Software - Application │ PNK │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ APLE │ Apple Hospitality REIT, Inc. │ United States │ Real Estate │ REIT - Hotel & Motel │ NYQ │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ APRU │ Apple Rush Company, Inc. │ United States │ Consumer Defensive │ Beverages - Non-Alcoholic │ PNK │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ GAPJ │ Golden Apple Oil & Gas Inc. │ United States │ │ │ PNK │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ MLP │ Maui Land & Pineapple Company, Inc. │ United States │ Real Estate │ Real Estate Services │ NYQ │
|
||||
├──────┼─────────────────────────────────────┼───────────────┼────────────────────┼───────────────────────────┼──────────┤
|
||||
│ PNPL │ Pineapple, Inc. │ United States │ Healthcare │ Pharmaceutical Retailers │ PNK │
|
||||
└──────┴─────────────────────────────────────┴───────────────┴────────────────────┴───────────────────────────┴──────────┘
|
||||
```
|
||||
|
||||
With a variety of options to also discover country-specific and sector-specific companies:
|
||||
|
||||
```
|
||||
(🦋) /stocks/ $ search --sector technology --country united_kingdom -l 20
|
||||
|
||||
Companies found in United Kingdom within Technology
|
||||
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
|
||||
┃ ┃ Name ┃ Country ┃ Sector ┃ Industry ┃ Exchange ┃
|
||||
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
|
||||
│ ATC │ Atotech Limited │ United Kingdom │ Technology │ Electronic Components │ NYQ │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ MIME │ Mimecast Limited │ United Kingdom │ Technology │ Software - Infrastructure │ NMS │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ NNOCF │ Nanoco Group plc │ United Kingdom │ Technology │ Semiconductor Equipment & Materials │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ OXINF │ Oxford Instruments plc │ United Kingdom │ Technology │ Semiconductor Equipment & Materials │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ PSFE │ Paysafe Limited │ United Kingdom │ Technology │ Information Technology Services │ NYQ │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ PXAMF │ Location Sciences Group PLC │ United Kingdom │ Technology │ Software - Application │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ RNSHF │ Renishaw plc │ United Kingdom │ Technology │ Scientific & Technical Instruments │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ MFGP │ Micro Focus International plc │ United Kingdom │ Technology │ Software - Infrastructure │ NYQ │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ SEPJF │ Spectris plc │ United Kingdom │ Technology │ Scientific & Technical Instruments │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ SLLN │ Searchlight Solutions Ltd. │ United Kingdom │ Technology │ Information Technology Services │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ SPMYY │ Spirent Communications plc │ United Kingdom │ Technology │ Software - Infrastructure │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ SPNUF │ Spirent Communications plc │ United Kingdom │ Technology │ Software - Infrastructure │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ TEKCF │ Tekcapital plc │ United Kingdom │ Technology │ Software - Application │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ TTCNF │ Telit Communications PLC │ United Kingdom │ Technology │ Communication Equipment │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ TTGPF │ TT Electronics plc │ United Kingdom │ Technology │ Electronic Components │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ SGPYY │ The Sage Group plc │ United Kingdom │ Technology │ Software - Application │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ VVPR │ VivoPower International PLC │ United Kingdom │ Technology │ Solar │ NMS │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ MCFUF │ Micro Focus International plc │ United Kingdom │ Technology │ Software - Infrastructure │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ KNNNF │ Kainos Group plc │ United Kingdom │ Technology │ Software - Application │ PNK │
|
||||
├───────┼───────────────────────────────┼────────────────┼────────────┼─────────────────────────────────────┼──────────┤
|
||||
│ AVEVF │ AVEVA Group plc │ United Kingdom │ Technology │ Software - Application │ PNK │
|
||||
└───────┴───────────────────────────────┴────────────────┴────────────┴─────────────────────────────────────┴──────────┘
|
||||
```
|
||||

|
||||
|
||||
Reference in New Issue
Block a user