I'm not sure how to easily get that data from google (see Michael's
message), but it's available from yahoo.

getSymbols('TCS.NS', src='yahoo')

I've found that historical stock data from Yahoo is typically cleaner and
more reliable than from Google.  The other main difference is that Yahoo
provides OHLCV and Adjusted columns, where the Adjusted column is the close
price series adjusted for dividends and splits.  Google, does not provide
unadjusted or completely adjusted data.  Instead, they give you data that
has been adjusted for splits, but not for dividends.

If you really want the yahoo data to look like google data, you could adjust
it for splits, and not for dividends like this

TCS <- adjustOHLC(TCS.NS, adjust='split')

HTH,
Garrett

p.s.  If there is any reason to use historic stock price data from google
instead of yahoo, I would be very interested to hear it (off-list of course,
since it's off-topic)


On Tue, Oct 18, 2011 at 8:19 AM, R. Michael Weylandt <
michael.weylandt@gmail.com> wrote:

> I believe it's because they are not made available for download as a csv
> file.
>
> Compare:
>
> https://www.google.com/finance/historical?q=NSE:TCS
>
> with
>
> https://www.google.com/finance/historical?q=NASDAQ:AAPL
>
> You'll see that for AAPL, there is an option to export prices on the
> right hand side: that's what getSymbol() takes advantage of.
>
> Why it exists I don't know, but it probably has to do with how much
> google is willing to pay for licensing to foreign exchanges.
>
> You could perhaps write something to read the price table that google
> shows or if you find the data available elsewhere on a csv, I'm sure
> the package authors would be willing to add another method for
> getSymbols.
>
> Michael
>
> On Tue, Oct 18, 2011 at 1:07 AM, ATANU <ata.sonu@gmail.com> wrote:
> > i am using quantmod package.it get stock quotes from google finanace.
> but
> > unfortunately i am not able to get the quotations of some stocks(e.g.
> > NSE:TCS,NSE:SAIL ) through the "getSymbol" command of this package
> although
> > they are available in the google finance website. anyone please help me.
> > thanks in advance.....
> >
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/problem-with-quantmod-package-tp3914263p3914263.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]

