The primary function of this project is to construct measures of inflation expectations from USD inflation options (i.e., caps and floors). We construct implied probability density measures from option butterflies and perform regression analysis examining the response of these expectations to changes in FOMC signaling and macroeconomic announcements.
- MATLAB 2020a with at least 1 GB od memory with the following toolboxes installed (Econometrics, Optimization, Financial)
- Python 3.6 with the following libraries installed (Pandas)
- Bloomberg Professional Services for historical data
All project code is stored in the /Code
folder for generating figures and performing analysis. Refer to the headline comment string in each file for a general description of the purpose of the script in question.
-
/.../lib/
stores functions derived from academic papers or individual use to compute statistical tests or perform complex operations. Please refer to the in function documentation for each.m
function for granular detail on function arguments and returns.cusip_generator.py
this file is preserved in the code library, but is not run when calling themain.m
file. This scipt was used to develop the Excel files within the options folder and SHOULD NOT be run unless those files are missing or have been deleted.
Folder for all unfiltered, raw input data for financial time series.
/.../options/
stores inflation option price series for USD CPI caps and floors for YoY (year-over-year) and ZC (zero-coupon)/.../swaps/
stores inflation swap price series for USD, UK (United Kingdom), EUR (Euro-Zone), and FRA (France) structures- tips-curve.csv historical timeseries data of the 2y-20y U.S. TIPS, taken from the Federal Reserve
- treasury-curve.csv historical timeseries data of the 1y-30y U.S. Treasury, taken from the Federal Reserve
- nakamura_steinsson_shocks.xlsx monetary shocks series taken from Nakamura a& Steinsson's 2018 paper entitled High Frequency Identification of Monetary Non-Neutrality: The Information Effect
- bloomberg_economic_releases.csv historical data of economic announcements, including forecast average, standard deviation, etc.
Folder for storing data files after being read and cleaned of missing/obstructed values.
/.../options/
stores inflation option price series for USD CPI caps and floors for YoY (year-over-year) and ZC (zero-coupon)DATA.mat
price series including data from FRED, monetary shocks, and U.S. GSW ratesOPTIONS.mat
option price series for USD inflation options covering both YoY and ZC caps and floorsPROBA.mat
inflation probabilibies for options tenors (1-30y)SWAPS.mat
inflation swap price series for USD, UK, EUR, and FRA inflation measures
Folder and sub-folders are provided to store graphs and tables for forecasts, regressions, etc.
/.../macro_response/
stores png images displaying the price effect that various macro-economic annoucements have on the inflation basis, we observe both the cummulative and the absolute change in the return series/.../market_implied_probability/
stores csv files with the implied inflation probabilites constructured from integer butterfly-spreads as well as a smoothed cubic spline fit/.../market_implied_probability_buckets/
stores png images of the implied inflation rate and implied inflation probabilites for particular rates (e.g. probability of inflation being 3% or higher)/.../regressions/
stores coefficients for changes in volatility measures regressed on macro-economic announcements. For more detailed overview of the code responsible for constructing these measures refer to macro_regress.m.
Data Fields that are automatically updated from HTML connections
- The U.S. Treasury Yield Curve: 1961 to the Present, taken from Federal Reserve website and stored under the
treasury-curve.csv
file in theInput
folder - TIPS Yield Curve and Inflation Compensation, taken from Federal Reserve website and stored under the
tips-curve.csv
file in theInput
folder - Swanson's FOMC shock series, taken from his website under his published paper, “Measuring the Effects of Federal Reserve Forward Guidance and Asset Purchases on Financial Markets”
Data Fields that are manually updated by the user
-
Login into your Bloomberg Professional Service account, you will need it to retrieve historical data.
-
Check to see if the files
usd-inflation-zc-caps.xlsx
andusd-inflation-zc-floors.xlsx
are stored within the/Input/options/..
folder. If they are missing run thecusip_generator.py
script to produce the required.xlsx
files. If files are not missing, we then pull the data series using the spreadsheet builder tool found on the Bloomberg Tab, this follows for each.xlsx
file:- Clear all contents from the second
Sheet
of the excel workbook, if not already blank. - Copy the BBG_TICKER list of Bloomberg IDs from the first
Sheet
and paste special the transpose in cellA1
in the secondSheet
. - Click on the Spreadsheet Builder and select the Historical Data Table under the "Analyze Historical Data" tab.
- Select all securities that you have copied and transposed over from the first
Sheet
as the Selected Securities. - Search for the Last Price field from the search box and select it, this will return the last traded price for the security.
- Enter the furthest date you would like to retrieve prices for, this is our start date.
- Select only to Show Date and Show Security from the preview screen and press the finish button.
- After all price series have been pulled, we will
Select All
contents within the secondSheet
andCopy + Paste Values
at the same location - Finally, we complete a
Find and Replace
on the data removing null values (i.e., “#N/A N/A”) with empty spaces. This process will take a long time to complete, and may cause excel to not respond in the process, depending on the number of securities queried. In future this process WILL be improved
- Clear all contents from the second
-
Now open the
/Input/swaps/...
and systematically update each.xlsx
spreadsheet with the latest price series. Simply open a given spreadsheet, go to the Bloomberg tab on Excel and click the Refresh Worksheets icon to update the Bloomberg formulas and save spreadsheet. Note if working on a separate server or cluster, these refreshed worksheets will need to be transferred to the designated workstation. -
To update the data series entitled
bloomberg_economic_releases.csv
, refer to this repo. Simply transfer theOutput
series from that project to theInput
folder of this repo, following the necessary steps outlined in that repo for replication. -
Download the updated Nakamura and Steinsson (2018) shocks from Miguel Acosta's website and rename the file as nakamura_steinsson_shocks.xlsx. In future this link may change so refer to Emi Nakamura personal website for further details.
-
You may opt to run the
main.m
file in a MATLAB interactive session or via terminal on your local machine or HPC cluster.
%% e.g., running code via batch on the FRBNY RAN HPC Cluster
$ matlab20a-batch-withemail 5 main.m
- Work to improve the method for collecting Bloomberg price data to be more efficient, and less suceptible to hard data querying limits
- Consider expanding work to construct smooth volatility smiles for inflation options. Refer to existing functions within the
.../Code/lib/
folder, namely inf_option_black_mdl.m and newton_raphson_iv.m for helpful information
- Rajesh Rao (Sr. Research Analyst)