Giter Site home page Giter Site logo

treasury-debt-model's Introduction

Treasury Debt Model

Overview:

This project creates a tool that can track, at the individual security level, the outstanding stock of U.S. Treasury debt and the evolution of the U.S. Federal Reserve’s holdings of Treasury securities in the System Open Market Account (SOMA) portfolio. This model may be used to make projections about the full maturity structure of Treasury debt, whether for purposes of understanding the path of various descriptive statistics of the debt structure or for assessing the optimality of that debt structure.

The model presented here is based on the structure of Treasury issuance and the form of the input files as of March 2022. The code would potentially need to be adapted if there were changes to the types of Treasury securities issued, to the settlement cycles of Treasury securities, or to the structure of the input files. For further detail on the purpose, context, and utility of the model, please see the corresponding Brookings Institution paper: link.

Disclaimer:

THIS MODEL IS INTENDED FOR EDUCATIONAL PURPOSES ONLY. ANY RESULTS GENERATED BY USERS OF THIS MODEL ARE NOT INTENDED TO BE RELIED UPON OR TO BE USED FOR ANY OTHER PURPOSES. THE CREATORS OF THIS MODEL ARE NOT RESPONSIBLE FOR ANY ERRORS OR STALE INFORMATION THAT MAY BE CONTAINED IN THE FILES AVAILABLE, AND DO NOT INTEND TO UPDATE SUCH INFORMATION IN THE FUTURE. BOTH THE MODEL ITSELF AND THE BACKGROUND INFORMATION PROVIDED REFLECT CERTAIN BELIEFS AND/OR OPINIONS OF THE AUTHORS INDICATED; NO REPRESENTATION IS BEING MADE THAT SUCH BELIEFS AND/OR OPINIONS ARE COMPLETE OR ACCURATE.

Using the Model:

To run the model, follow the steps below:

  1. Download the Monthly Statement of the Public Debt (MSPD) file and SOMA file corresponding to the desired model jump-off point (MSPD files; SOMA files), and store them in the MSPD and SOMA folders respectively.
    1. Note: the model requires that the end-of-month date to which the MSPD publication refers to be a business day in order to be fully accurate (see Technical Notes for more detail).
  2. Update the filenames reading MSPD and SOMA in the model code at lines 1308-1309.
  3. Open the file market_data.xlsx and populate the “Forward Curve” and “Inflation Swaps” tabs, using values for those inputs based on a reference date that matches the model jump-off point. This date should match the MSPD publication date.
    1. The default values for the forward curve and inflation swap data are based on data sourced from Bloomberg (as of March 2022). If you have an active Bloomberg Terminal connection or other source of equivalent forward curve and inflation swap data, you should manually update this data using your own inputs.
  4. Open the file discretionary_assumptions.xlsx and input assumptions for the following variables:
    1. Issuance Table: projected gross Treasury issuance to the private sector (excluding the Fed) by tenor each period in $ bns. The model horizon can be extended by adding more rows to the table. We anticipate that usage of the model will in many cases involve entering different paths for the gross issuance in this table to assess the effects on the characteristics of the debt stock at some point in the future.
      1. For convenience, this sheet is color coded to indicate the current Treasury reopening schedule.
    2. FY Funding Needs: estimated Treasury borrowing need by fiscal year. Borrowing needs should be entered as positive numbers, and the borrowing need for the current FY should be adjusted to reflect only the need for the remaining portion of the FY. Some additional notes on generating these inputs are provided in the spreadsheet itself.
    3. QE Path: monthly Fed purchases of Treasury securities in $ bns.
    4. SOMA Runoff Caps: monthly cap on the amount of SOMA holdings that are allowed to run off each period (in $ bns). A runoff cap of 0 indicates no SOMA runoff that month. All of the Fed’s Treasury holdings that are not allowed to run off are assumed to be reinvested into the new Treasury securities issued on the date of maturity, following the procedures described here by the Federal Reserve Bank of New York.
  5. Run the file treasury_model.py, either in an IDE or via the command line.
  6. By default, the model will append outputs to an existing spreadsheet in the output_files folder. This can be changed by specifying a new output path at the end of the code in line 1696. The spreadsheet includes a fairly comprehensive set of results, although a broader set is retained within the Python code itself.
    1. A set of charts for key measures is shown in the provided output file. These can also be used to chart new model outputs by copying the chart tabs into a new output file and using Excel’s Find and Replace function (Home > Find & Select > Replace) to point the charts to the new file’s data.

Technical Notes:

  • The MSPD refers to the last day of the month, but it is only compatible with the model code if that day is a business day. If the MSPD refers to a weekend or holiday, certain securities on the end-of-month settlement cycle might have been auctioned prior to the MSPD publication date but settle after the publication date on the next business day. These securities will be omitted from the MSPD and accordingly excluded in an erroneous manner in the model code.
    • If it is necessary to run the model using a non-business-day MSPD, these “overflow” securities should be manually appended to the MSPD with all necessary fields.
  • Within the model, Treasury securities are issued, reopened, and matured per the U.S. Treasury’s auction timing guidelines. This schedule includes adjustments for weekends/holidays. In practice, this means there are four possible issuance dates and two possible maturity dates for each period.
  • SOMA holdings of any single Treasury security are capped at 70% of the total outstanding amount (per the Fed’s SOMA policy).
  • New QE purchases are assumed to be purchases of non-bill securities only and are distributed proportionally across the entire outstanding universe of coupons at the time of purchase.
    • QE purchases can be modified to include bills by adjusting the “qe_bill_purchase_adj” variable in line 1535. This parameter sets the percent of QE bill purchases relative to the currently outstanding bill share (e.g., a value of 1 means QE bill purchases will be exactly proportional to outstanding bill share, a value of 0.5 would be 50% of that, etc.)

Directory Contents:

  1. input_data folder
    1. MSPD folder
      1. MSPD_Mar2022.xlsx : most recent Treasury MSPD file before jump-off point
    2. SOMA folder
      1. SOMA_Mar302022.csv : most recent SOMA file before jump-off point
      2. market_data.xlsx : file containing model inputs for market data, specifically forward rates and inflation swap data.
      3. discretionary_assumptions.xlsx: user-inputted assumptions for issuance table, funding need, QE path, and SOMA runoff caps. These parameters are intended to be modified to test the model under different issuance and funding paths.
  2. output_files folder
    1. Output_2022_03_31.xlsx : full model outputs in table format and summary charts
  3. treasury_model.py : main Python code
  4. LICENSE.txt : license text

Contact:

To report an issue with the code or raise other questions, comments, or concerns, please contact Salil Mitra at [email protected].

Credits:

I, Salil Mitra, authored the initial code for this project. Any errors are mine. This model was created under the supervision of Brian Sack, without whom this project would not have been possible. Many thanks also to Kristopher Dawsey and Ankita Jha for their helpful contributions.

License:

This project is released under a BSD-3-Clause license.

Data included with this project comes from the sources identified herein (please see the file LICENSE.txt) and use and access of such data is subject to terms available at those sources.

Any Bloomberg data disclosed herein is used by permission.

treasury-debt-model's People

Contributors

rebeccadanae avatar salil-mitra 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.