pedquant (Public Economic Data and QUANTitative analysis) provides an interface to access public economic and financial data for economic research and quantitative analysis. The functions are grouped into three main categories,
The functions in this package are designed to write minimum codes for some common tasks in quantitative analysis process. Since the parameters to get data can be interactively specify, it’s very easy to start. The loaded data have been carefully cleansed and provided in a unified format.
pedquant package has advantages on multiple aspects, such as the format of loaded data is a list of data frames, which can be easily manipulated in data.table or tidyverse packages; high performance on speed by using data.table and TTR; and interactive charts by using echarts4r. Similar works including tidyquant or quantmod.
pedquantfrom CRAN with:
pedquantfrom github with:
The following examples show you how to import data.
library(pedquant) ## import eocnomic data = ed_fred('GDPCA') dat1 #> 1/1 GDPCA = ed_nbs(geo_type='nation', freq='quarterly', symbol='A010101') dat2 ## import market data = md_stock(c('FB', 'AMZN', 'AAPL', 'GOOG'), date_range = '10y') FAAG #> 1/4 fb #> 2/4 amzn #> 3/4 aapl #> 4/4 goog = md_stock(c('^000001','^399001'), date_range = '10y') INDX #> 1/2 ^000001 #> 2/2 ^399001
This package still on the developing stage. If you have any issue when using this package, please update to the latest version from github. If the issue still exists, report it at github page. Contributions in any forms to this project are welcome.