R get Stock data
Several pkg in R provide the online download of stock data Essentials, if you have to find a better, then quantmod well-deserved! For example, to download the market data in Shanghai, the code can be:
library(quantmod)
SSE <- getSymbols("000001.SS",auto.assign=FALSE)
head(SSE)
possible:
library(quantmod)
setSymbolLookup(SSE=list(name="000001.SS", src="yahoo"))
getSymbols("SSE")
head(SSE)
These are the essentials recommended by Jeff Ryan (Quantmod author). But, after Joshua Ulrich in his e-mail to give a more concise essentials:
library(quantmod)
getSymbols("^SSEC")
head(SSEC)
While Quantmod's package comes from Jeff Ryan's hand, it's obvious that Joshua Ulrich is coming from behind and winning Bluetooth!
Turn from: https://uhomework.com/a/qitajiaocheng/20171205/9688.html genius writer
Get stock data tutorials with R language