xd.fred {YRmisc} | R Documentation |
This function returns a data from the Federal Reserve Bank of St. Louis database. It can take one ticker or a string of tickers, which will output a merged data frame with all observations.
xd.fred(tkr, start_date, end_date)
tkr |
:one data ticker or a string of tickers used by the database |
start_date |
:starting date of the data(default is set as 1900-01-01) |
end_date |
:ending date of the data(default is set as 2018-01-01) |
cpi <- xd.fred("CPIAUCSL") # CPI data
head(cpi)
tail(cpi)
#Frequently used tickers:
#CPIAUCSL: Consumer Price Index for All Urban Consumers: All Items
#A191RL1Q225SBEA: Real Gross Domestic Product
#DGS10: 10-Year Treasury Constant Maturity Rate
#UNRATE: Civilian Unemployment Rate