Giter VIP home page Giter VIP logo

fedcurveconvexity's Introduction

An Analysis of Federal Reserve Policy via Treasury Yield Curve Convexity

    FedFundsConvexity
      └───src
          │   collect_data.R
          │   butterfly_model.R
          │   regression.R
          │   params.R
      └───data
          │   data.parquet
          │   flys.parquet
          │   params.parquet

src files:

  • collect_data.R: Collects data from Fred for yield curve treasury rates and Fed Funds rates
  • butterfly_model.R: Creates all yield curve butterfly rates for every possibly teneors
  • regression.R: Does a regression on one specific butterfly regression
  • params.R: Analysis of the OLS parameters of the regression

data files:

  • data.parquet: FRED Treasury & Fed Funds date
  • fly.parquet: All Yield Curve FLys data
  • params.parquet: Fly regression Paramater Analysis

Background

Curve Convexity via Butterflys for Fed Funds Analysis. The idea behind this model is to measure the confidence that is placed in the federal reserve's montery policy. Since the treasury curve will be the most responsive set of securities that can be parsed via their term we can use an analysis of the curve. Ideally we can regress specific treasury rates to their respective butterflies. Since the butterflies are a measure of convexity and simply put curve volatility we can analyze relationship between yields and the curve. Essentially as we regress the treasury yields to their respective yield curve we are measuing how strong the relationship is between respective tenors. This is all done by measure the R squared of the regression. As the R squared decreases the tenors trade less in line with respect to the curve.

We can first start by picking a Treasury Butterfly in this case we'll use the 2-3-5 butterfly. We can see that there is a strong relationship between by the yield and the butterfly yield. We can also see although there is some homogeneity within the data discrimating by year seems to show clear differences in the regression. image

In this case we can break down by the year and examine the various R squares for the regression. We are left with this bar chart of the R squared over time. image

Looking at the distribution of the parameters in this case using a 1y rolling linear regression image

Now run regressions for every possibly fly and then take the cross-sectional average of every regression image

Todo

  1. Generalize for all possible flys
  2. calculate medians and mean of all rolling $R^2$

fedcurveconvexity's People

Contributors

diegodalvarez avatar

Watchers

 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.