[R-SIG-Finance] How to obtain data from *all* companies in the S&P 500 + sector information?

Brian G. Peterson brian at braverock.com
Thu Dec 16 13:56:28 CET 2010


On 12/16/2010 06:41 AM, Marius Hofert wrote:
> Dear expeRts,
>
> Is it possible to obtain quotes from all companies of the S&P 500 via R?
> I know that I can use the following code to get historical data from the index, but what about the 500 companies?
>
> If this is possible, is it also possible to obtain the GICS sector information (see http://en.wikipedia.org/wiki/Global_Industry_Classification_Standard) for each of the 500 companies? Basically, the sector information is given here:
> http://en.wikipedia.org/wiki/List_of_S%26P_500_companies (it suffices to have the sector information [not the industry groups etc.])
> The problem would then be to match the sector information with the companies. I once obtained the 500 time series from Thompson Datastream and tried to match the GICS sectors (obtained from the webpage) by hand, which was very tedious and prone to errors. That's why I'm asking.

I use the FinancialInstrument package to store instrument metadata on a 
couple thousand instruments.  Then you can slice and dice by building 
hierarchies as you like.  Peter Carl is working to make that slicing and 
dicing more transparent.

Basically, the full GICS data is a commercial product, and you have to 
pay for it.

'quotes', e.g. tick data, will likewise have to come from a commercial 
source.  There are many, many posts here in the list archives about 
connecting to commercial services like Bloomberg, Interactive Brokers, 
and Reuters.

Daily OHLC data is of course available from Google and Yahoo, and both 
may be accessed via getSymbols()

Regards,

   - Brian

-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list