[R-SIG-Finance] How to get name of a ticker using Quantmod/R

George Kumar grgkumar4 at gmail.com
Mon Nov 28 09:36:12 CET 2011


I tried using the following scipt

----------------------------------------
Args <- commandArgs()      # retrieve cmdline args
ticker <- as.character(Args[5])
url =
paste("http://download.finance.yahoo.com/d/quotes.csv?s=",ticker,"&f=n",sep="")
x<- read.table(url)
compname=x[1,]
compname=as.character(compname)
cat("Comp name is ",compname, "\n")

----------------------------------------

cat get_name_from_yahoo.R |  R --vanilla --slave --args FIIAX
Output: FIDELITY ADVISOR

So even this does not give the full name that one sees in yahoo finance web
page - Fidelity Advisor Mid Cap II A 

Thanks a lot for your replies.
George



--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-name-of-a-ticker-using-Quantmod-R-tp4114044p4114517.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list