Get stock data tutorials with R language

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.