finsets
  1. Papers
  2. Gilchrist and Zakrajsek (2012)
  • finsets
  • FRED
    • fred
    • fred_api
  • WRDS
    • wrds_api
    • crspm
    • crspd
    • compa
    • compa_ccm
    • compq
    • compq_ccm
    • ratios
    • ibes_ltg
    • bondret
    • mergent
    • linking
  • Papers
    • Dickerson, et al. (2023)
    • Gilchrist and Zakrajsek (2012)
    • Gürkaynak, et al. (2007)
    • Hassan, et al. (2019)
    • Hoberg, Phillips (2010, 2016)
    • Peters and Taylor (2016)

On this page

  • get_raw_data
  • list_all_vars
  • process_raw_data
  • Report an issue
  1. Papers
  2. Gilchrist and Zakrajsek (2012)

Gilchrist and Zakrajsek (2012)

Macro credit spread and excess bond premium

This module downloads and processes data developed by:

  • Gilchrist, Simon, and Egon Zakrajšek. 2012. “Credit Spreads and Business Cycle Fluctuations.” American Economic Review 102 (4): 1692-1720. https://doi.org/10.1257/aer.102.4.1692
PROVIDER = 'Gilchrist, Simon, and Egon Zakrajšek, 2012'
URL = 'https://www.federalreserve.gov/econres/notes/feds-notes/ebp_csv.csv'
HOST_WEBSITE = 'https://www.federalreserve.gov/econres/notes/feds-notes/updating-the-recession-risk-and-the-excess-bond-premium-20161006.html'
FREQ = 'M'
MIN_YEAR = 1973
MAX_YEAR = None
TIME_VAR_IN_RAW_DSET = 'date'
TIME_VAR_IN_CLEAN_DSET = f'{FREQ}date'

source

get_raw_data

 get_raw_data (url:str='https://www.federalreserve.gov/econres/notes/feds-
               notes/ebp_csv.csv', nrows:int=None, delimiter:str=',',
               headers:dict=None)

Download raw data from url

Type Default Details
url str https://www.federalreserve.gov/econres/notes/feds-notes/ebp_csv.csv
nrows int None How many rows to download. If None, all rows are downloaded
delimiter str ,
headers dict None
Returns pd.DataFrame
raw = get_raw_data(nrows=3)
raw
date gz_spread ebp est_prob
0 1973-01-01 1.101827 0.015875 0.229627
1 1973-02-01 1.045423 -0.001218 0.223800

source

list_all_vars

 list_all_vars ()
list_all_vars()
name
0 date
1 gz_spread
2 ebp
3 est_prob

source

process_raw_data

 process_raw_data (df:pandas.core.frame.DataFrame=None)
clean = process_raw_data(raw)
clean
date dtdate gz_spread ebp est_prob
Mdate
1973-01 1973-01-01 1973-01-01 1.101827 0.015875 0.229627
1973-02 1973-02-01 1973-02-01 1.045423 -0.001218 0.223800
  • Report an issue