_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › 譬覈螳蟯蟯螻

#install.packages("magrittr")
library(quantmod)
library(PerformanceAnalytics)
library(magrittr)

options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)

#tiger 200, KOSEF 蟲螻豈10, KODEX 螻覓(H), TIGER 覿一誤手覦磯
symbols = c("102110.KS", "148070.KS","132030.KS", "329200.KS")
getSymbols(symbols, from= "2019-01-01", to = "2020-08-25",warnings = FALSE, auto.assign = TRUE, src="yahoo")

prices = do.call(cbind, lapply(symbols, function(x) Ad(get(x)))) %>% setNames(symbols)
rets = Return.calculate(prices) %>% na.omit()
head(rets)


library(tidyr)
library(dplyr)
library(corrplot)

cor(rets) %>%
  corrplot(method = 'color', type = 'upper',
           addCoef.col = 'black', number.cex = 0.7,
           tl.cex = 0.6, tl.srt=45, tl.col = 'black',
           col =
             colorRampPalette(c('blue', 'white', 'red'))(200),
           mar = c(0,0,0.5,0))


covmat = cov(rets)
stock_cor.png
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2020-08-25 18:50:15

一 覦 蟆 覲企 蟆 . (襴ろ)