????????????????
???????????? ???????[ 2015/1/20 13:28:59 ] ??????????????? ?????
????????????????????????????????????????????????????????????????????????????????????????????PC????????????????????
????“?????????£???????????”???????????????????????????????????????????????Oracle??????????Oracle????????????????????????????????Oracle Express?汾????????????????????????????????????????????????????Oracle SQL Developer????????????????????????????????????????????????????????
????“?????????и?”???????????????????????????????????????????е??????????????????????????????λ????Щ?????
?????????????ù??????????????????ù?????????????????????????????????http://www.szse.cn/main/marketdata/jypz/colist/?????????http://www.sse.com.cn/assortment/stock/list/name/????????????Щ??????????????????????????????????
???????????????????????????Щ????????????????????????????163?????????????????163???????????????????У?600000????????????????????????е????????????????????“????????”?????????????????????????csv????????洢??
???????????????????????????????????????????????е????????м???????Щ????????????????????????????????????????????????????????????????R????????????????????????????“????????”?????????????????п????????????????????????????????????????????????????е??????????????????????360?????????????????п?????????????????????
???????????????????????????????????????????????????????“????????????”?????????
???????????????????????????????????ɡ??????????????http://quotes.money.163.com/service/chddata.html?code=0600000&start=19991110&end=20141231&fields=TCLOSE;HIGH;LOW;TOPEN;LCLOSE;
????CHG;PCHG;TURNOVER;VOTURNOVER;VATURNOVER;TCAP;MCAP??????????????600000?????????????????????е?????????????????????0??????У?1??????У?19991110??????????????????????????????????????????????????????????????20141231?????????????μ?????????????????
?????μ??????????????????????????????????????????????????????????????????????http://quotes.money.163.com/trade/lsjysj_600000.html#01b07??????????????????????“??????????”?????????“??????”?????????“??????”???????δ???“value="1999-11-10"”?????????????
?????????????????????????R???????????????????????????????????????????£?
#??????????????
#download the listingdate of one security
library(RCurl)
SH <- readLines("SH.txt")#??????????б?
listing.date <- vector(length = length(SH))
url.date1 <- "http://quotes.money.163.com/trade/lsjysj_"
url.date2 <- ".html#01b07"
for (i in 1:length(SH))
{
#????????????listingdate
cat(i??'
')
url.date <- paste(url.date1?? SH[i]?? url.date2?? sep="")
xx <- getURL(url.date)
posi <- regexpr("??????"??xx)
listing.date[i] <- substring(xx??posi[1]-13??posi[1]-4)
}
listing.date.tab <- data.frame(code=SH??listingdate=listing.date??stringsAsFactors=FALSE)
#???
write.table(listing.date.tab??file="xxx.txt"??sep=" "??quote=FALSE??row.name=FALSE)
????????????????????г??????????浽txt???????????????????????????????????????£?????????????yyyymmdd??write.table?????????“????”??????????????????????
???????????????????????????????????????????????????л??з?????У???????????????£?R???????£?
#??????????
library(RCurl)
#http://quotes.money.163.com/service/chddata.html?code=0600030&start=20030106&end=20140920&fields=TCLOSE;HIGH;LOW;TOPEN;LCLOSE;CHG;PCHG;TURNOVER;VOTURNOVER;VATURNOVER;TCAP;MCAP
url1 <- "http://quotes.money.163.com/service/chddata.html?code="
market <- "1" # 1:???У?0:????
code <- "000003"
url2 <- "&start="
start <- "19900101"
url3 <- "&end="
end <- "20140920"
url4 <- "&fields=TCLOSE;HIGH;LOW;TOPEN;LCLOSE;CHG;PCHG;TURNOVER;VOTURNOVER;VATURNOVER;TCAP;MCAP"
#???????·??
file.path <- "F:/download/SS/"
#???????+??????????????CODE????yyyymmdd
security <- readLines("SS.txt")
code <- vector(length = length(security))
listingdate <- vector(length = length(security))
security.tab <- data.frame(code?? listingdate?? stringsAsFactors=FALSE)
for (i in 1 : length(security))
{
security.tab[i??] = strsplit(security[i]??" ")
}
for (i in 1 : dim(security.tab)[1])
{
code <- security.tab$code[i]
start <- security.tab$listingdate[i]
cat(i??" ---"??code??"
")
url <- paste(url1??market??code??url2??start??url3??end??url4??sep="")
file <- paste(file.path??code??".csv"??sep="")
download.file(url??destfile=file?? method="auto"??quiet=T)
}
|
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11