0

I try to download some stocks from Google Finance with quantmod in R.

For instance, I want to download the soft bank stocks.

https://www.google.com/finance?q=TYO:9984&ei=f2gFU4j8N6KYwQPVCQ

So I tried

softbank = getSymbols("TYO%3A9984", from="2010-01-01", to=Sys.Date(), src="google")

or

softbank = getSymbols("TYO:9984", from="2010-01-01", to=Sys.Date(), src="google")

What do I do wrong?

S12000
  • 3,345
  • 12
  • 35
  • 51
  • 1
    I think the [RFinanceYJ](http://cran.r-project.org/package=RFinanceYJ) package can download data for Japanese stocks. I tried `quoteStockXtsData("9984")` and it returned some data. – GSee Feb 20 '14 at 03:14
  • See [this post and answer](http://stackoverflow.com/questions/8867001/loading-stock-information-of-japan-using-quantmod-package-in-r/8869363#8869363) for an example of downloading Japanese price data. – SlowLearner Feb 20 '14 at 08:07
  • OK I did not know this package. It works. I think you can post it as an answer ! – S12000 Feb 20 '14 at 14:03

1 Answers1

2

I'm not sure about downloading historic market data for Japanese equities with quantmod, but the RFinanceYJ can do it.

R> library(RFinanceYJ)
R> head(quoteStockXtsData("9984"))
           Open High  Low Close   Volume AdjClose
2013-11-25 8380 8600 8370  8590 19321800     8590
2013-11-26 8500 8590 8430  8550 16331600     8550
2013-11-27 8480 8500 8280  8310 16068600     8310
2013-11-28 8470 8480 8330  8430  9585500     8430
2013-11-29 8340 8360 8240  8290  9479900     8290
2013-12-02 8270 8340 8250  8280  5910700     8280
GSee
  • 48,880
  • 13
  • 125
  • 145