
That's brilliant - Many thanks Garett, I was not aware of qmao (any hope to integrate it into quantmod outright?) 

It could also be great to include the type of function Alain (Many thanks!) referenced from package tawny (getIndexComposition) to have everything under a single umbrella... just a thought of course

Many thanks for the head start, will get me going

Rgds,
Julien


> Date: Wed, 4 Jan 2012 08:24:40 -0600
> Subject: Re: [R-SIG-Finance] List index constituents of an index in R? quantmod?
> From: gsee000@gmail.com
> To: j_cuisinier@hotmail.com
> CC: zoonek@gmail.com; r-sig-finance@r-project.org
> 
> Julien,
> 
> I did this for an example with the Dow Jones Industrial average.
> It should be in this directory on your computer:
> blotter/pkg/FinancialInstrument/inst/parser/DJIA.index.R
> 
> It's also available here:
> http://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/FinancialInstrument/inst/parser/DJIA.index.R?revision=834&root=blotter
> 
> If you're interested in getting the holdings of an iShare ETR or a
> Sector SPDR ETF, you can use a function called "getHoldings" from the
> package "qmao"
> 
> Regards,
> Garrett
> 
> On Wed, Jan 4, 2012 at 7:50 AM, julien cuisinier
> <j_cuisinier@hotmail.com> wrote:
> >
> > Many thanks Vincent. It does run on several pages and layout seems to be constant so your route might be very useful..
> >
> > I was hoping it should be possible to request that data using http get method as for historical prices, I will also try to look down that route
> >
> > If / when I get around this I will keep the list posted
> >
> >
> > Rgds,
> > Julien
> >
> >
> >
> >> Date: Wed, 4 Jan 2012 21:47:31 +0900
> >> Subject: Re: [R-SIG-Finance] List index constituents of an index in R? quantmod?
> >> From: zoonek@gmail.com
> >> To: r-sig-finance@r-project.org
> >> CC: j_cuisinier@hotmail.com
> >>
> >> You can use the XML package to parse the page and extract the contents
> >> of the table:
> >>   library(XML)
> >>   index <- "^DJI"
> >>   url <- paste("http://uk.finance.yahoo.com/q/cp?s=", index, sep="")
> >>   symbols <- readHTMLTable(url, as.data.frame=FALSE)[[10]]$Symbol
> >>
> >> You should check the size of the result: large indices may be split
> >> across several pages, and the layout of the page may change.
> >>
> >> -- Vincent
> >>
> >> On 4 January 2012 21:24, julien cuisinier <j_cuisinier@hotmail.com> wrote:
> >> > Is anyone aware of an existing function to download from yahoo finance
> >> > the list of an index constituents?
> >
> >        [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Finance@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only. If you want to post, subscribe first.
> > -- Also note that this is not the r-help list where general R questions should go.
 		 	   		  
	[[alternative HTML version deleted]]

