Daily Treasury Maturities | Federal Reserve Board
Available in
AWS Marketplace
Available in
AWS Marketplace
Available in
AWS Marketplace
About
Yields on Treasury nominal securities at “constant maturity” are interpolated by the U.S. Treasury from the daily yield curve for non-inflation-indexed Treasury securities. This curve, which relates the yield on a security to its time to maturity, is based on the closing market bid yields on actively traded Treasury securities in the over-the-counter market. These market yields are calculated from composites of quotations obtained by the Federal Reserve Bank of New York. The constant maturity yield values are read from the yield curve at fixed maturities, currently 1, 3, and 6 months and 1, 2, 3, 5, 7, 10, 20, and 30 years. This method provides a yield for a 10-year maturity, for example, even if no outstanding security has exactly 10 years remaining to maturity. Similarly, yields on inflation-indexed securities at “constant maturity” are interpolated from the daily yield curve for Treasury inflation protected securities in the over-the-counter market. The inflation-indexed constant maturity yields are read from this yield curve at fixed maturities, currently 5, 7, 10, 20, and 30 years.
This data is part of U.S. Government Work. The structure of the original data is slightly modified to comply with SQL, without modifying the actual data. This data may be anonymized/aggregated at the source.
# More Information:
- [Source - Federal Reserve Board's Data Download Program](https://www.federalreserve.gov/releases/h15/default.htm)
- [Schema Definitions](https://s3.amazonaws.com/rearc-data-provider/treasury-maturities/public/treasury-maturities-schema.docx)
- [Sample Dataset](https://s3.amazonaws.com/rearc-data-provider/treasury-maturities/public/sample.csv)
- [Terms of Use](https://www.usa.gov/government-works)
- [Federal Reserve Board Data Homepage](https://www.federalreserve.gov/data.htm)
- Frequency: Daily (Automatic revision updates every week day @4:30 PM EST)
## What's included?
You will receive access to the following:
- Daily treasury rates for 1, 3, and 6 months and 1, 2, 3, 5, 7, 10, 20, and 30 years (treasury-maturities.csv)
- CloudFormation template that setups up automatic daily revision updates using AWS Lambda plus AWS analytics services such as AWS Glue and Amazon Athena (cloudformation.yaml)
- AWS Lambda code for daily revision updates (post-processing-code.zip)
# Automatic Revision Updates, Analytics and Visualizations
Apart from the source data, what we also provide in this product listing is an automated way to receive automatic revision updates as well as an easy way to interact and extract value out of the dataset. Native AWS Analytics services such as AWS Glue, Amazon Athena and Amazon QuickSight provide different ways to interact and visualize the data. The included AWS CloudFormation template sets up AWS Glue and Amazon Athena automatically in your AWS account and the documentation below describes how to visualize the data using Amazon QuickSight.
[Automatic Revision Updates - This diagram shows the automatic revision update process](https://rearc-data-provider.s3.amazonaws.com/treasury-maturities/public/automatic-revision-updates.png)
[Analytics & Visualizations - This diagram shows how the native AWS services are used for Analytics & Visualizations](https://s3.amazonaws.com/rearc-data-provider/treasury-maturities/public/data-analysis.png)
## Deploy automation to set up automatic daily revision updates and AWS Analytics services
Assuming you have subscribed to this product listing, below are the detailed steps to deploy CloudFormation template:
(*Please note that you will need IAM permissions for CloudFormation, AWS Data Exchange, IAM, Lambda, Glue, Athena and QuickSight, in order to deploy the CloudFormation template.*)
- Under the product listing, scroll down to `Data sets` section and click on the Data set name
- Under the `Revisions` section, click on the most recent revision
- Under `Assets`, checkmark `treasury-maturities/automation/post-processing-code.zip` and click `Export to S3`
- Choose the S3 Bucket where you would like to store the dataset. Make sure you only choose the S3 bucket. The asset comes with a pre-defined directory structure
- Under `Assets`, checkmark `treasury-maturities/automation/cloudformation.yaml` and click either `Export to S3` or `Export to computer`
- If you exported the `cloudformation.yaml` to S3, go to the S3 UI on the AWS console and navigate to the location where the `cloudformation.yaml` is stored. In S3, click on the cloudformation.yaml and copy the url from the `Object URL`
- Now, from your AWS Management Console, log onto Amazon CloudFormation UI and click `Create Stack`
- Under `Choose a template` either provide the template via uploading from local computer or specify the S3 object url and click `Next`
- Provide a friendly stack name in the `Stack name` text box
- In the `SourceS3Bucket` field, input the S3 bucket name that you chose earlier to store the treasury-maturities/automation/post-processing-code.zip file
- Leave rest of the fields as is
- Click `Next`
- On the `Configure stack options` page, click `Next`
- On the `Review test` page, checkmark the `I acknowledge...` boxes
- Click `Create stack`
### At a high level, CloudFormation will setup following resources automatically.
- Lambda function to setup automatic AWS Data Exchange revision updates for this dataset
- CloudWatch Event rule that will automatically trigger the Lambda function every time a new revision update is published
- Analytics Lambda function to setup AWS Glue and Amazon Athena
- Necessary IAM roles and permissions
If you are interested in looking at the AWS Lambda code or the CloudFormation template, feel free to inspect files inside `treasury-maturities/automation/post-processing-code.zip` and `treasury-maturities/automation/cloudformation.yaml`
*Please note, the code for automatic daily revision updates runs in AWS Lambda using Python runtime. AWS Python SDK (boto3) that comes with the default Lambda Python runtime is currently not updated to support AWS Data Exchange and AWS Marketplace Catalog APIs. Hence, we use a Lambda layer on top of the Lambda Python runtime that extends the AWS Python SDK (boto3) to support AWS Data Exchange and AWS Marketplace Catalog APIs as of November 13, 2019. Once the Lambda Python runtime is updated with a newer version of AWS Python SDK (boto3), we will update the code to remove this Lambda layer.*
## Using AWS Glue and Amazon Athena to run interactive queries against the dataset
Once the CloudFormation template is successfully deployed, the data is immediately searchable, queryable, and available on Athena. You can go to the Athena UI from the AWS Management Console and run SQL queries on the dataset.
### Here are some sample Athena SQL queries you can try on the dataset.
**# list daily 5 year treasury rate**
```bash
SELECT "time_period", "5_year" FROM "treasurymaturities"."data";
```
**# list all treasury data for a specific date**
```bash
SELECT * FROM "treasurymaturities"."data" WHERE "time_period" = date '2019-05-01';
```
**# compare 2 year and 5 year treasury rate for a specific date**
```bash
SELECT "time_period", "2_year", "10_year" FROM "treasurymaturities"."data" WHERE "time_period" = date '2019-05-01';
```
**# compare all treasury rates between 2 specific dates**
```bash
SELECT * FROM "treasurymaturities"."data" WHERE "time_period" IN (date '2000-05-01', date '2019-05-01');
```
## Setup Amazon QuickSight to create visualizations on the dataset
Below are the detailed steps to analyze dataset using Amazon QuickSight
- From your AWS Management Console, log onto Amazon QuickSight
- Click `Manage data`
- Click `New data set`
- If you ran the provided CloudFormation template, you should already have your database and table with schema created in AWS Glue and Athena
- Click on `Athena` to connect to your data source
- Provide a name for your QuickSight `Data source name` and click `Create data source`
- In the `Database: contain sets of table` dropdown, choose database as `treasurymaturities` and under `Tables: contain the data you can visualize`, choose table as `data`
- At this point, you can `Edit/Preview data` if you like
- You can then click on `Select`
- In the `Finish data set creation` screen, you can select `Visualize` to finish the creation of data set process
- Visualize the data set by selecting the `Line chart` from the `Visual types`
- Drag `time_period` field to the `X axis` in `Field wells` and for e.g. drag `5_year` field in the `Value` block with `Aggregate` equals `Average` to chart the data
You are now ready to start analyzing and visualizing the dataset.
# Contact Information
If you have questions about the source data, please contact [here](https://www.federalreserve.gov/apps/contactus/feedback.aspx). If you have any questions about the CloudFormation stack, Lambda code or any of the AWS services being used, please contact data@rearc.io.
## About Rearc
Rearc is a cloud, software and services company. We believe that empowering engineers drives innovation. Cloud-native architectures, modern software and data practices, and the ability to safely experiment can enable engineers to realize their full potential. We have partnered with several enterprises and startups to help them achieve agility. Our approach is simple — empower engineers with the best tools possible to make an impact within their industry.
Related Products
show moreBuyer guide
Read insights from real user interviews on why they chose this product.
How it works?
Search
Search 25000+ products and services vetted by AWS.
Request private offer
Our team will send you an offer link to view.
Purchase
Accept the offer in your AWS account, and start using the software.
Manage
All your transactions will be consolidated into one bill in AWS.
Create Your Marketplace with Webvar!
Launch your marketplace effortlessly with our solutions. Optimize sales processes and expand your reach with our platform.