_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › 覈覃
|
|
[edit]
1 覈覃企? #蠍 蟯煙 る 襷企. るジ 襷襦 るゴ 螻 るジる 襷.
螻一 暑. 襯 れ, 譯手螳 れ螻 螳.
[edit]
3 覈覃 讌 #螳襯願 るジ(る) 蟆 覈覃 讌 譬讌 螻, るゴ蟆 譬蟇磯.
企至 豸′? 螳
FIP = sign(螻手碓給) * (襷企 給 觜譴(%) - 給 觜譴(%)) --> 覿殊襦 譬蟇
[edit]
5 れ 襾濠鍵 #
[edit]
7 豕蠏 90朱 螳 #library(quantmod) library(PerformanceAnalytics) library(magrittr) library('lubridate') library(dplyr) ticker = c("QQQ", "DIA", "SPY", "TLT", "VNQ", "IAU", "VWO") getSymbols(ticker, from= today()-90, to = today(),warnings = FALSE, auto.assign = TRUE, src="yahoo") prices = do.call(cbind, lapply(ticker, function(x) Ad(get(x)))) rets = Return.calculate(prices) %>% na.omit() #head(rets) #head(prices) lambda <- 0.94 result <- data.frame() for( n in 1:ncol(prices)) { tmp1 <- data.frame(price=prices[,n]) %>% mutate(seq=row_number()) colnames(tmp1) <- c("price", "seq") tmp1$ewma <- NA tmp1$diff <- NA for(i in tmp1$seq){ if (i > 1){ ewma <- lambda*tmp1[i,]$price +(1-lambda)*ewma end <- tmp1[i,]$price tmp1[i,]$diff <- abs(end - yesterday_price) } else{ ewma <- tmp1[i,]$price yesterday_price <- tmp1[i,]$price start <- tmp1[i,]$price } tmp1$ewma[i] <- ewma } change <- end - start volatility <- sum(na.omit(tmp1$diff)) efficiency_ratio <- change / volatility result <- rbind(data.frame(ticker = ticker[n], efficiency_ratio), result) } arrange(result, desc(efficiency_ratio)) charts.PerformanceSummary(rets)
鏤
|
譬り 讌襷 る 譬給. 蠏碁Μ螻 襦 伎殊 り給. 磯Μれ 螳 碁 讌 覿れ讌 給. (襴) |