Financial Data Accessible from R – part II

I updated my initial post with two new sources of data and the associated R packages: Datastream and PWT. I also added the fImport package from Rmetrics. Following a reader suggestion, I made the initial tableĀ  more interactive, movedĀ  the data description and package detail below the main table and updated them.

Enjoy!

Source R Package Free Access Available on CRAN Package/Data URL
Yahoo, FRED, Oanda, Google Quantmod Yes Yes http://www.quantmod.com/
Quandl Quandl Yes Yes http://www.quandl.com/help/packages/r
TrueFX TFX Yes Yes http://rpubs.com/gsee/TFX
Bloomberg Rbbg No No http://findata.org/rbloomberg/
Interactive Broker IBrokers No Yes https://www.interactivebrokers.com/en/main.php
Datastream rdatastream No No https://github.com/fcocquemas/rdatastream
Penn World Table pwt Yes Yes https://pwt.sas.upenn.edu/
Yahoo, FRED, Oanda fImport Yes Yes http://www.rmetrics.org/

Data Description

  • Yahoo: Free stock quotes, up to date news, portfolio management resources, international market data, message boards, and mortgage rates that help you manage your financial life
  • FRED: Download, graph, and track 149,000 economic time series from 59 sources
  • Oanda: Currency information, tools, and resources for investors, businesses, and travelers
  • Google: Stock market quotes, news, currency conversions & more
  • Quandl: Futures prices, daily. Quandl is a search engine for numerical data. The site offers access to several million financial, economic and social datasets
  • TrueFX: Tick-By-Tick Real-Time And Historical Market Rates, Clean, Aggregated, Dealer Prices
  • Bloomberg: Financial news, business news, economic news, stock quotes, markets quotes, finance stocks, financial markets, stock futures, personal finance, personal finance advice, mutual funds, financial calculators, world business, small business, financial trends, forex trading, technology news, bloomberg financial news
  • Interactive Broker: Interactive Brokers Group, Inc. is an online discount brokerage firm in the United States
  • Datastream: Datastream Professional is a powerful tool that integrates economic research and strategy with cross asset analysis to seamlessly bring together top down and bottom up in one single, integrated application
  • pwt: The Penn World Table provides purchasing power parity and national income accounts converted to international prices for 189 countries/territories for some or all of the years 1950-2010

Package Detail

  • Quantmod: Specify, build, trade, and analyse quantitative financial trading strategies
  • Quandl: This package interacts directly with the Quandl API to offer data in a number of formats usable in R, as well as the ability to upload and search
  • TFX: Connects R to TrueFX(tm) for free streaming real-time and historical tick-by-tick market data for dealable interbank foreign exchange rates with millisecond detail
  • Rbbg: Handles fetching data from the Bloomberg financial data application
  • IBrokers: Provides native R access to Interactive Brokers Trader Workstation API
  • rdatastream: RDatastream is a R interface to the Thomson Dataworks Entreprise SOAP API (non free), with some convenience functions for retrieving Datastream data specifically. This package requires valid credentials for this API
  • pwt: The Penn World Table provides purchasing power parity and national income accounts converted to international prices for 189 countries/territories for some or all of the years 1950-2010
  • fImport: Rmetrics is the premier open source software solution for teaching and training quantitative finance. fImport is the package for Economic and Financial Data Import

 

5 Responses to “Financial Data Accessible from R – part II”


  • Thanks, this is a good collection. Do you know of a site or article with a more detailed assessment of the strengths and weaknesses of the different data sources? For example, what sort of analysis needs variables that are only available on a paid service like Bloomberg or Datastream; what are the strengths and weaknesses on coverage and timeliness of the different collections of international economic development indicators; and so on?

    • Thank you.
      I don’t know of any site or article that compares different data sources. From experience Bloomberg is expensive but great and nearly unbeatable when it comes to market data. Regarding international economic indicators Bloomberg is good as well but some free alternatives are available (FRED). I haven’t used Datastream for many years so I can’t comment on it.
      On more thing to consider is data quality. It’s nice not to pay for the data but if you spend countless hours to clean it or you realise afterwards that you can’t use the data at all, I’m not sure this is a good use of your time.
      Hope this helps

  • Thanks for great links.

    Have you (or anyone else) seen a dataset with S&P companies reporting dates. I’m trying to remove dates around the reporting floods as they upset my trading system…
    OR
    could we simply say “SInce 2005 all reporting for Q3 has been mid-octobre to end-octobre, all Q2 reporting….” etc.

    Grateful for any advice on this matter,
    Matti Zemack

    • Such databases exist. Check Compustat (US), IBES (Europe) and Toyo Kezai (Japan). From experience there is a wealth of information in those databases but this is very messy and heavy to say to least. This type of data is used extensively by the big quant players that have the resources to deal with it (at some point we had 2 people full time just to organize and clean these datasets). To cut a long story short, if you have the budget go for it otherwise forget it.
      One alternative that you might want to check is ThinkNum (there is even an R package). I just found out about it so I don’t know if it’ll fit your needs but it’s definitely worth a look.
      Hope this helps

  • if you want realtime access to data, you can look at market data providers like barchartondemand.com. They provide a financial data api that you can use to get access to Price Data (real-time, delayed, historical or end-of-day), Profiles, Financial Data, Corporate Actions, Leaderboards, Charts, Analytics, ETFs, News, Filings, Weather and more. It’s not free, but I don’t think it’s possible to get free access to real time stock market data in the form of a financial data api.

Leave a Reply