Giter Site home page Giter Site logo

financialengineerlab / yield-curve Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skasim/yield-curve

0.0 0.0 0.0 22.95 MB

A Python/Jupyter notebook project to understand the Yield Curve and its potential for forecasting a recession

Dockerfile 0.01% Jupyter Notebook 99.99%

yield-curve's Introduction

YIELD CURVE

A Python/Jupyter notebook project to understand the Yield Curve and its potential for forecasting a recession. Yield curve rates between 1990 and present are from the U.S. Department of the Treasury

Getting Started

  • Git clone the repository
  • Create a virtual environment and run $ pip install -r requirements.txt
  • Update the docker-compose.yml volumes to point to your local instance and cd to where the repo is stored
  • Run the following:
    $ docker-compose build
    $ docker-compose up
    

You can access the project at http://localhost:8888/notebooks/yield%20curve.ipynb and you'll need to provide a token that appears in the docker logs. To bring down the project, run $ docker-compose down and to destroy the containers, run $ docker-compose kill.

Forecasting a Recession

A deeper dive into U.S. Department of the Treasury Yield Curve data and it's predictive capaiblities.

In an efficiently performing market, long-term bonds have higher bond yield rates than shorter-term bonds, T-notes, and T-bills as the market expects greater risk in investing in long-term bonds (a lot can happen in 30 years). However, when the yield curve inverts, the bond yield rates for shorter-term bonds are higher than long-term bond yield rates. An Inverted Yield Curve is used as one predictor of a recession as it captures the nervousness of investors about the near term market outlook.

In my analysis, an Inverted Yield Curve occurs when the ratio of long-term bond rates (i.e. 30 years, 10 years) versus short-term bonds (6 months, 1 year, 3 years, etc.) is between 0 and 1. The yield curve last inverted between 2006 and 2007.

Yield Curve Ratios for Years 1990 to Present

Yield Curve Ratios for Years 1990 to Present

Yield Curve Ratios Demonstrating Inversion from 2006 to 2007

Yield Curve Ratios for Years 2006 to 2007

Yield Curve Ratios for 2019

The ratio of 10 year bonds/6 month bonds and 10 year/1 year bonds inverted in May 2019 Yield Curve Ratios for 2019

yield-curve's People

Contributors

skasim avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.