How To See The Inverted Treasury Yield Curve With OpenBB Terminal
Tags: opensource, startup, python, showdev
Published: 2022-03-30 08:20:07

Inverted yield curves are a hot topic these days, here's where to find it in the Terminal.

Enter the Economy Menu from any menu/submenu with the command:  /economy

This is true for navigating the entire directory tree of features. For example:

```
/stocks/ta/vwap

/jupyter/dashboards/correlation 
```
![Enter the Economy Menu from any menu/submenu with the command:  /economy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fya0qgfv1256bthnqc4t.png)

There are a few methods to visualize this information. For a one-day chart across maturities, the command is simply: yield

From any menu, this chart can be retrieved by entering: 

```
/economy/yield 
```
![/economy/yield](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr44nwdb5v7paz3q02qb.png)

Help dialogue is shown by attaching: -h 

![/economy/yield -h](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/knqvu7goi66izthtlopa.png)

To view a specific date in history, attach: -d year-mm-dd

```
/economy/yield/ -d 2022-03-27
```

To build a time-series of one or more maturity, use: treasury

```
/economy/treasury -h
```
![/economy/treasury -h](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6eakd0yz4nrtux1dtj5z.png)
 

```
2022 Mar 30, 03:29 (🦋) /economy/ $ treasury -sm
               Maturity options per instrument                
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Instrument ┃ Maturities                                    ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ nominal    │ 1m, 3m, 6m, 1y, 2y, 3y, 5y, 7y, 10y, 20y, 30y │
├────────────┼───────────────────────────────────────────────┤
│ inflation  │ 5y, 7y, 10y, 20y, 30y                         │
├────────────┼───────────────────────────────────────────────┤
│ average    │ Defined by function                           │
├────────────┼───────────────────────────────────────────────┤
│ secondary  │ 4w, 3m, 6m, 1y                                │
└────────────┴───────────────────────────────────────────────┘
```

To draw multiple maturities, enter them with a space. 

```
/economy/treasury -m 3m 2y 5y 10y 30y
```

![/economy/treasury -m 3m 2y 5y 10y 30y](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ix3djg8zjygxu26yq35r.png)
 
![/economy/treasury -m 3m 2y 5y 10y 30y](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3twedckfj3mfhxuhvfc1.png)

Another way to view this data, and search other series, like FEDFUNDS, use: fred

```
/economy/fred -h
```
![/economy/fred -h](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/529sgvnwagt0sj0dln6m.png)

```
2022 Mar 30, 03:42 (🦋) /economy/ $ fred -q treasury -l 20
                                                                       Search results for treasury                                                                       
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Series ID ┃ Title                                              ┃ Description                                                                                          ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ T10Y2Y    │ 10-Year Treasury Constant Maturity Minus 2-Year    │ Starting with the update on June 21, 2019, the Treasury bond data used in calculating interest rate  │
│           │ Treasury Constant Maturity                         │ spreads is obtained directly from the U.S. Treasury Department (https://www.treasury.gov/resource-   │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/TextView.aspx?data=yield).  Series is calculated as    │
│           │                                                    │ the spread between 10-Year Treasury Constant Maturity (BC_10YEAR) and 2-Year Treasury Constant       │
│           │                                                    │ Maturity (BC_2YEAR). Both underlying series are published at the U.S. Treasury Department            │
│           │                                                    │ (https://www.treasury.gov/resource-center/data-chart-center/interest-                                │
│           │                                                    │ rates/Pages/TextView.aspx?data=yield).                                                               │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ T10Y2YM   │ 10-Year Treasury Constant Maturity Minus 2-Year    │ Series is calculated as the spread between 10-Year Treasury Constant Maturity (BC_10YEARM) and       │
│           │ Treasury Constant Maturity                         │ 2-Year Treasury Constant Maturity (BC_2YEARM). Starting with the update on June 21, 2019, the        │
│           │                                                    │ Treasury bond data used in calculating interest rate spreads is obtained directly from the U.S.      │
│           │                                                    │ Treasury Department (https://www.treasury.gov/resource-center/data-chart-center/interest-            │
│           │                                                    │ rates/Pages/TextView.aspx?data=yield).                                                               │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DFII10    │ Market Yield on U.S. Treasury Securities at        │ For further information regarding treasury constant maturity data, please refer to the Board of      │
│           │ 10-Year Constant Maturity, Inflation-Indexed       │ Governors ( http://www.federalreserve.gov/releases/h15/current/h15.pdf) and the Treasury             │
│           │                                                    │ (http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/yieldmethod.aspx).   │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ FII10     │ Market Yield on U.S. Treasury Securities at        │ For further information regarding treasury constant maturity data, please refer to                   │
│           │ 10-Year Constant Maturity, Inflation-Indexed       │ http://www.federalreserve.gov/releases/h15/current/h15.pdf and http://www.treasury.gov/resource-     │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/yieldmethod.aspx.                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ WFII10    │ Market Yield on U.S. Treasury Securities at        │ For further information regarding treasury constant maturity data, please refer to                   │
│           │ 10-Year Constant Maturity, Inflation-Indexed       │ http://www.federalreserve.gov/releases/h15/current/h15.pdf and http://www.treasury.gov/resource-     │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/yieldmethod.aspx.                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ T10Y3M    │ 10-Year Treasury Constant Maturity Minus 3-Month   │ Series is calculated as the spread between 10-Year Treasury Constant Maturity (BC_10YEAR) and        │
│           │ Treasury Constant Maturity                         │ 3-Month Treasury Constant Maturity (BC_3MONTH). Starting with the update on June 21, 2019, the       │
│           │                                                    │ Treasury bond data used in calculating interest rate spreads is obtained directly from the U.S.      │
│           │                                                    │ Treasury Department (https://www.treasury.gov/resource-center/data-chart-center/interest-            │
│           │                                                    │ rates/Pages/TextView.aspx?data=yield).                                                               │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ T10Y3MM   │ 10-Year Treasury Constant Maturity Minus 3-Month   │ Series is calculated as the spread between 10-Year Treasury Constant Maturity (BC_10YEARM) and       │
│           │ Treasury Constant Maturity                         │ 3-Month Treasury Constant Maturity (BC_3MONTHM). Starting with the update on June 21, 2019, the      │
│           │                                                    │ Treasury bond data used in calculating interest rate spreads is obtained directly from the U.S.      │
│           │                                                    │ Treasury Department (https://www.treasury.gov/resource-center/data-chart-center/interest-            │
│           │                                                    │ rates/Pages/TextView.aspx?data=yield).                                                               │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DGS10     │ Market Yield on U.S. Treasury Securities at        │ For further information regarding treasury constant maturity data, please refer to the H.15          │
│           │ 10-Year Constant Maturity                          │ Statistical Release (https://www.federalreserve.gov/releases/h15/current/h15.pdf) notes and Treasury │
│           │                                                    │ Yield Curve Methodology (https://www.treasury.gov/resource-center/data-chart-center/interest-        │
│           │                                                    │ rates/Pages/yieldmethod.aspx).                                                                       │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ GS10      │ Market Yield on U.S. Treasury Securities at        │ Averages of business days. For further information regarding treasury constant maturity data, please │
│           │ 10-Year Constant Maturity                          │ refer to the Board of Governors (http://www.federalreserve.gov/releases/h15/current/h15.pdf) and the │
│           │                                                    │ Treasury (http://www.treasury.gov/resource-center/data-chart-center/interest-                        │
│           │                                                    │ rates/Pages/yieldmethod.aspx).                                                                       │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ WGS10YR   │ Market Yield on U.S. Treasury Securities at        │ Averages of business days. For further information regarding treasury constant maturity data, please │
│           │ 10-Year Constant Maturity                          │ refer to the Board of Governors (http://www.federalreserve.gov/releases/h15/current/h15.pdf) and the │
│           │                                                    │ Treasury (http://www.treasury.gov/resource-center/data-chart-center/interest-                        │
│           │                                                    │ rates/Pages/yieldmethod.aspx).                                                                       │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DFII5     │ Market Yield on U.S. Treasury Securities at 5-Year │ For further information regarding treasury constant maturity data, please refer to                   │
│           │ Constant Maturity, Inflation-Indexed               │ http://www.federalreserve.gov/releases/h15/current/h15.pdf and http://www.treasury.gov/resource-     │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/yieldmethod.aspx.                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ RRPONTSYD │ Overnight Reverse Repurchase Agreements: Treasury  │ This series is constructed as the aggregated daily amount value of the RRP transactions reported by  │
│           │ Securities Sold by the Federal Reserve in the      │ the New York Fed as part of the Temporary Open Market Operations.  Temporary open market operations  │
│           │ Temporary Open Market Operations                   │ involve short-term repurchase and reverse repurchase agreements that are designed to temporarily add │
│           │                                                    │ or drain reserves available to the banking system and influence day-to-day trading in the federal    │
│           │                                                    │ funds market.  A reverse repurchase agreement (known as reverse repo or RRP) is a transaction in     │
│           │                                                    │ which the New York Fed under the authorization and direction of the Federal Open Market Committee    │
│           │                                                    │ sells a security to an eligible counterparty with an agreement to repurchase that same security at a │
│           │                                                    │ specified price at a specific time in the future. For these transactions, eligible securities are    │
│           │                                                    │ U.S. Treasury instruments, federal agency debt and the mortgage-backed securities issued or fully    │
│           │                                                    │ guaranteed by federal agencies. For more information, see                                            │
│           │                                                    │ https://www.newyorkfed.org/markets/rrp_faq.html                                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ FII5      │ Market Yield on U.S. Treasury Securities at 5-Year │ For further information regarding treasury constant maturity data, please refer to                   │
│           │ Constant Maturity, Inflation-Indexed               │ http://www.federalreserve.gov/releases/h15/current/h15.pdf and http://www.treasury.gov/resource-     │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/yieldmethod.aspx.                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ WFII5     │ Market Yield on U.S. Treasury Securities at 5-Year │ For further information regarding treasury constant maturity data, please refer to                   │
│           │ Constant Maturity, Inflation-Indexed               │ http://www.federalreserve.gov/releases/h15/current/h15.pdf and http://www.treasury.gov/resource-     │
│           │                                                    │ center/data-chart-center/interest-rates/Pages/yieldmethod.aspx.                                      │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ TB3MS     │ 3-Month Treasury Bill Secondary Market Rate        │ Averages of Business Days, Discount Basis                                                            │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DTB3      │ 3-Month Treasury Bill Secondary Market Rate        │ Discount Basis                                                                                       │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ WTB3MS    │ 3-Month Treasury Bill Secondary Market Rate        │ Averages of Business Days, Discount Basis                                                            │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DGS2      │ Market Yield on U.S. Treasury Securities at 2-Year │ For further information regarding treasury constant maturity data, please refer to the Board of      │
│           │ Constant Maturity                                  │ Governors. (http://www.federalreserve.gov/releases/h15/current/h15.pdf and                           │
│           │                                                    │ http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/yieldmethod.aspx)     │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DGS1      │ Market Yield on U.S. Treasury Securities at 1-Year │ For further information regarding treasury constant maturity data, please refer to the Board of      │
│           │ Constant Maturity                                  │ Governors (http://www.federalreserve.gov/releases/h15/current/h15.pdf) and the Treasury              │
│           │                                                    │ (http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/yieldmethod.aspx).   │
├───────────┼────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ DGS5      │ Market Yield on U.S. Treasury Securities at 5-Year │ For further information regarding treasury constant maturity data, please refer to the Board of      │
│           │ Constant Maturity                                  │ Governors (http://www.federalreserve.gov/releases/h15/current/h15.pdf) and the Treasury              │
│           │                                                    │ (http://www.treasury.gov/resource-center/data-chart-center/interest-rates/Pages/yieldmethod.aspx).   │
└───────────┴────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

Overnight Reverse Repurchase Agreements - "temporary operations"

```
/economy/fred -p RRPONTSYD -s 2013-06-01
```

![/economy/fred -p RRPONTSYD -s 2013-06-01](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fpahpzpycy0lj4vx4uyt.png)

To see todays rates, yields and change in yields, use: overview usbonds

```
2022 Mar 30, 03:51 (🦋) /economy/ $ overview usbonds
                     US Bonds                      
┏━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┓
┃              ┃ Rate (%) ┃ Yld (%) ┃ Yld Chg (%) ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━┩
│ 30-Year Bond │ 2.25     │ 2.505   │ 0.000       │
├──────────────┼──────────┼─────────┼─────────────┤
│ 10-Year Note │ 1.88     │ 2.383   │ -0.018      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 7-Year Note  │ 1.88     │ 2.465   │ -0.024      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 5-Year Note  │ 2.50     │ 2.463   │ -0.037      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 3-Year Note  │ 1.75     │ 2.514   │ -0.041      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 2-Year Note  │ 2.25     │ 2.330   │ -0.044      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 1-Year Bill  │ 0.00     │ 1.661   │ -0.008      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 6-Month Bill │ 0.00     │ 1.022   │ -0.027      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 3-Month Bill │ 0.00     │ 0.548   │ -0.006      │
├──────────────┼──────────┼─────────┼─────────────┤
│ 1-Month Bill │ 0.00     │ 0.145   │ -0.025      │
└──────────────┴──────────┴─────────┴─────────────┘
```

That's a lot of way to look at these things, **and that isn't even all the ways to query them.**

```
fred -p FEDFUNDS DGS5
```

![fred -p FEDFUNDS DGS5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77u8nf7qki028grqiq1q.png)

Thanks for reading! What are your go-to series in the FRED database?

Visit the OpenBB website and say hello: [https://openbb.co](https://openbb.co)