Update economy.md

This commit is contained in:
Jeroen Bouma
2023-02-15 10:43:01 +01:00
committed by GitHub
parent 9fb2f786e7
commit f3fccf3192

View File

@@ -6,20 +6,20 @@ description: The Economy menu enables you to obtain market overviews, see yield
The Economy menu enables you to obtain market overviews (<a href="/terminal/reference/economy/overview" target="_blank" rel="noreferrer noopener">overview</a> and <a href="/terminal/reference/economy/futures" target="_blank" rel="noreferrer noopener">futures</a>), see yield curves of any country (<a href="/terminal/reference/economy/ycrv" target="_blank" rel="noreferrer noopener">ycrv</a>) and discover sector, industry and country performance (<a href="/terminal/reference/economy/performance" target="_blank" rel="noreferrer noopener">performance</a>). Next to that, the databases of <a href="https://www.econdb.com/" target="_blank" rel="noreferrer noopener">EconDB</a>, <a href="https://fred.stlouisfed.org/" target="_blank" rel="noreferrer noopener">FRED</a> and <a href="https://finance.yahoo.com/" target="_blank" rel="noreferrer noopener">Yahoo Finance</a> can be accessed via <a href="/terminal/reference/economy/macro" target="_blank" rel="noreferrer noopener">macro</a>, <a href="/terminal/reference/economy/fred" target="_blank" rel="noreferrer noopener">fred</a> and <a href="/terminal/reference/economy/index_cmd" target="_blank" rel="noreferrer noopener">index</a> respectively. All of this can also be further analysed with <a href="/terminal/guides/intros/forecast" target="_blank" rel="noreferrer noopener">Forecasting menu</a> (`forecast`) and <a href="/terminal/guides/intros/common/qa" target="_blank" rel="noreferrer noopener">Quantitative Techniques</a> (`qa`).
### How to use
## How to use
The Economy menu is called upon by typing `economy` which opens the following menu:
![Economy Menu](https://user-images.githubusercontent.com/46355364/176679746-21b28263-96be-4701-9fd1-8657602e0214.png)
<img width="800" alt="image" src="https://user-images.githubusercontent.com/46355364/218990930-84338dbb-64eb-4243-82ff-8d0423f7066c.png">
Within the Economy menu you have a variety of options ranging from treasury rates to population growth to country financial performance. As this is quite extensive, the guide has two sections. The first section will discuss valuations and performance and the second section discusses the databases.
#### Performance and valuations
### Performance and valuations
By using <a href="/terminal/reference/economy/overview" target="_blank" rel="noreferrer noopener">overview</a> we can look into market overviews from the perspective of indices (`indices`), bonds (`usbonds` and `glbonds`), currencies (`currencies`) and in general. E.g. let's look at global bond performance by adding the `-t` argument:
```
2022 Jun 29, 09:56 (🦋) /economy/ $ overview -t glbonds
(🦋) /economy/ $ overview -t glbonds
Global Bonds
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┓
@@ -42,7 +42,7 @@ By using <a href="/terminal/reference/economy/overview" target="_blank" rel="nor
Next to that, to better understand the current commodity market we can look into the <a href="/terminal/reference/economy/futures" target="_blank" rel="noreferrer noopener">futures</a> of a variety of commodities. For example, let's look at a general overview:
```
2022 Jun 29, 09:58 (🦋) /economy/ $ futures
(🦋) /economy/ $ futures
Futures/Commodities [Source: Wall St. Journal]
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┓
@@ -70,18 +70,10 @@ Next to that, to better understand the current commodity market we can look into
└───────────────────────────┴─────────┴─────────┴───────┘
```
Furthermore, we can look into yield curves of any country, by default this is set to the United States, but it can be any:
![Yield Curves Options Menu](https://user-images.githubusercontent.com/46355364/176679828-bd90df8c-bff3-42a7-8e03-897c0be99443.png)
Which then returns the following plot:
![Yield Curve](https://user-images.githubusercontent.com/46355364/176679949-dd8b5b47-1125-4b1c-9558-25f1d2d70ffc.png)
Lastly, we can also show industry, sector and country performance with <a href="/terminal/reference/economy/performance" target="_blank" rel="noreferrer noopener">performance</a>. For example, looking at the `sectors` returns the following:
We can also show industry, sector and country performance with <a href="/terminal/reference/economy/performance" target="_blank" rel="noreferrer noopener">performance</a>. For example, looking at the `sectors` returns the following:
```
2022 Jun 29, 10:03 (🦋) /economy/ $ performance -g sector
(🦋) /economy/ $ performance -g sector
Group Performance Data
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━┓
@@ -111,12 +103,12 @@ Lastly, we can also show industry, sector and country performance with <a href="
└────────────────────────┴───────┴───────┴────────┴────────┴───────┴───────┴───────┴────────────────┴───────────┴────────┴─────────────┘
```
#### Economic Databases
### Economic Databases
Starting with the EconDB database (via <a href="/terminal/reference/economy/macro" target="_blank" rel="noreferrer noopener">macro</a>) a large selection of Economic data can be obtained. What can be obtained is easily found by typing `macro --show parameters` which returns the following:
```
2022 Jun 29, 10:16 (🦋) /economy/ $ macro --show parameters
(🦋) /economy/ $ macro --show parameters
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Parameter ┃ Name ┃ Period ┃ Description ┃
@@ -140,7 +132,7 @@ Starting with the EconDB database (via <a href="/terminal/reference/economy/macr
As well as the available countries with `macro --show countries`:
```
2022 Jun 29, 10:16 (🦋) /economy/ $ macro --show countries
(🦋) /economy/ $ macro --show countries
┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Country ┃ Currency ┃
@@ -167,7 +159,7 @@ As well as the available countries with `macro --show countries`:
Then, with these parameters and countries, you can now plot macroeconomic data. For example, we can look at unemployment rate (`URATE`) of the Netherlands, Germany and France with the following:
```
2022 Jun 29, 10:18 (🦋) /economy/ $ macro --countries Netherlands Germany France --parameters URATE
(🦋) /economy/ $ macro --countries Netherlands Germany France --parameters URATE
```
This returns the following graph:
@@ -179,7 +171,7 @@ The FRED database similarly has a lot of macroeconomic data, do note that you ne
You have the ability to query the entire FRED database with the `-q` argument. For example, down below we look for datasets that are centered around inflation. The `-l` argument is set to show a maximum of 10 datasets:
```
022 Jun 29, 10:23 (🦋) /economy/ $ fred -q inflation -l 10
(🦋) /economy/ $ fred -q inflation -l 10
Search results for inflation
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
@@ -261,48 +253,37 @@ You have the ability to query the entire FRED database with the `-q` argument. F
With this information, we can now plot datasets, e.g. the 5-year, 10-year, 20-year and 30-year break-even inflation rates, with the following. Note that I added some additional series not in the above table. This is because you can recognise the structure relatively easy of the break-even inflation rates, the number after the `T` refers to the amount of years.
```
2022 Jun 29, 10:27 (🦋) /economy/ $ fred T5YIEM,T10YIEM,T20YIEM,T30YIEM
(🦋) /economy/ $ fred T5YIEM,T10YIEM,T20YIEM,T30YIEM
```
Which returns the following graph:
![Break-Even Inflation Rates](https://user-images.githubusercontent.com/46355364/176680117-6d2b53e4-4980-42e6-a46c-4da34001ad46.png)
Furthermore, understanding the influence macroeconomic trends have to indices, the `index` command can be used. This has a large set of pre-configured indices but has the possibility to add your own if you enter the ticker.
![Index Command Menu](https://user-images.githubusercontent.com/46355364/176680206-7ad44c3a-6cd7-45de-be5a-9bbb4e3e5c9a.png)
Which plots the following:
Furthermore, understanding the influence macroeconomic trends have to indices, the `index` command can be used. This has a large set of pre-configured indices but has the possibility to add your own if you enter the ticker. Which plots the following:
![Index Plot](https://user-images.githubusercontent.com/46355364/176680336-9ce60aa4-b2f7-4199-be42-62a8d78b1f5c.png)
This then all comes together within the <a href="/terminal/reference/economy/plot" target="_blank" rel="noreferrer noopener">plot</a> command where you can combine the datasets from the above commands into one graph. For example, it seems there is a relationship between the inflation rates and the unemployment rate (<a href="https://www.investopedia.com/articles/markets/081515/how-inflation-and-unemployment-are-related.asp" target="_blank" rel="noreferrer noopener">source</a>) which we can graphically show with:
```
2022 Jun 29, 10:38 (🦋) /economy/ $ macro -p URATE -s 2010-01-01
(🦋) /economy/ $ macro -p URATE -s 2010-01-01
2022 Jun 29, 10:39 (🦋) /economy/ $ fred T5YIEM -s 2010-01-01
(🦋) /economy/ $ fred T5YIEM -s 2010-01-01
2022 Jun 29, 10:39 (🦋) /economy/ $ plot --y1 United_States_URATE --y2 T5YIEM
🦋) /economy/ $ plot --y1 United_States_URATE --y2 T5YIEM
```
Resulting in the following graph:
![Combine plots of Unemployment Rate and Break Even Inflation](https://user-images.githubusercontent.com/46355364/176680454-b878604e-08a2-474e-ad9f-3b695ee958d1.png)
### Sub-menus available
The Economy menu has a few sub-menus available to delve further into a specific macroeconomic indicator. To find more information about each menu, click on oneof the following:
- <a href="/terminal/guides/intros/forecast/" target="_blank" rel="noreferrer noopener">Introduction to Forecasting menu</a>: apply advanced AI and Machine Learning models to form prediction of future macroeconomic indicators including Recurrent Neural Network (RNN), Autoregressive Integrated Moving Average (ARIMA) and Monte Carlo forecasting.
- <a href="/terminal/guides/intros/common/qa" target="_blank" rel="noreferrer noopener">Introduction to Quantitative Analysis</a>: analyse the macroeconomic indicators extensively for seasonality, rolling windows and statistical techniques.
### Examples
## Examples
Starting off, let's looking at current performance of energy futures with `futures`.
```
2022 Jun 30, 05:39 (🦋) /economy/ $ futures energy
(🦋) /economy/ $ futures energy
Future Table [Source: FinViz]
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┓
@@ -325,7 +306,7 @@ Starting off, let's looking at current performance of energy futures with `futur
This gives insights in the current future contracts and their (relative) performance. Here, we take a closer look at `Crude Oil Brent` by querying the FRED database, with `fred`, for a dataset that is relevant:
```
2022 Jun 30, 05:43 (🦋) /economy/ $ fred -q oil index
(🦋) /economy/ $ fred -q oil index
Search results for oil index
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Series ID ┃ Title ┃ Description ┃
@@ -354,7 +335,7 @@ This gives insights in the current future contracts and their (relative) perform
Here, we take the `CBOE Crude OIL ETF Volatility Index` to get some understanding of how volatile oil is. Here, a period is defined from 2008 to 2015, showing the influence of the <a href="https://en.wikipedia.org/wiki/Financial_crisis_of_2007%E2%80%932008" target="_blank" rel="noreferrer noopener">Financial Crisis of 2008</a>.
```
2022 Jun 30, 06:22 (🦋) /economy/ $ fred OVXCLS -s 2008-01-01 -e 2015-01-01
(🦋) /economy/ $ fred OVXCLS -s 2008-01-01 -e 2015-01-01
```
This plots the following graph:
@@ -364,7 +345,7 @@ This plots the following graph:
A hypothesis could be that the more volatile the price of oil is, the lower the confidence of the consumers is. It is possible to visually depict this. First, let's plot the consumer confidence of Germany.
```
2022 Jun 30, 07:59 (🦋) /economy/ $ macro -p CONF -c Germany -s 2008-01-01 -e 2015-01-01
(🦋) /economy/ $ macro -p CONF -c Germany -s 2008-01-01 -e 2015-01-01
```
![Consumer Confidence Germany](https://user-images.githubusercontent.com/46355364/176680603-1ace9534-f18a-4362-a1c0-d28c675d9415.png)