[R-sig-finance] Getting stock prices and annualized returns for common indexes

Patrick Burns patrick at burns-stat.com
Tue Oct 19 21:05:34 CEST 2004


You can get data from Yahoo via the "get.hist.quote" function in
the tseries package.  Indices have strange symbols in Yahooland.

S&P 500:     ^GSPC
Nasdaq Comp:   ^IXIC
Nasdaq 100:      ^NDX

US 30yr Treasury:   ^TYX
US 10yr Treasury:   ^TNX
US   5yr Treasury:   ^FVX


Patrick Burns

Burns Statistics
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")

Waichler, Scott R wrote:

>Is there a way to obtain stock and mutual fund prices (previous day's
>close would be fine) 
>from R?  Can bond prices also be obtained?  How about annualized returns
>for previous calendar
>year and last 3 and 5 years for major indexes such as S&P 500, 
>Wilshire 5000, MSCI EAFE, etc.?  I am a non-professional
>who manages some family portfolios and I am looking for better ways to
>access information
>and compare investment results in annual reports I write using Sweave.
>
>Thanks,
>Scott Waichler
>scott.waichler at pnl.gov
>
>_______________________________________________
>R-sig-finance at stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>
>  
>



More information about the R-sig-finance mailing list