2016/05/09 Append: corresponding QUANTMOD package related instructions reference http://www.quantmod.com/
The Quantmod package defaults to access to Yahoo Finance data, including SSE and Shenzhen stock data, as well as Hong Kong equities.
The SSE code is SS, deep Proof code is SZ, Hong Kong stock code is HK
such as Maotai: 6000519.SS, Vanke 000002.sz, Changjiang industrial 0001.hk
Use the following command in the R console:
> Library (QUANTMOD)
> Setsymbollookup (wk=list (name= ' 000002.sz ', src= ' Yahoo '))
> Getsymbols ("WK")
[1] "WK"
> ChartSeries (WK)
The test of Guizhou Maotai is as follows:
> Setsymbollookup (gzmt=list (name= ' 600519.ss ', src= ' Yahoo '))
> Getsymbols ("GZMT")
[1] "GZMT"
> ChartSeries (GZMT)
The test of Changjiang industry is as follows:
> Setsymbollookup (cjsy=list (name= "00001.hk", src= "Yahoo"))
> Getsymbols ("Cjsy")
> ChartSeries (cjsy, up.col= ' Red ', dn.col= ' green ', Ta= "Addvo (); ADDMACD (); Addsma (n=10)")
Shanghai:
> Getsymbols ("^ssec")
> ChartSeries (SSEC, up.col= ' Red ', dn.col= ' green ', Ta= "Addvo (); ADDMACD (); Addsma (n=10)")