先導株候補
from here.
#cli 2022 schedule
dplyr::filter(js,prefecture==35) %>% dplyr::group_by(.,date) %>% dplyr::summarise(.,sum(count)) %>% last(.,20)
w <- ((dplyr::arrange(df.melt,t))[,3] %>% matrix(.,nrow=8) %>% t())%*% matrix(c(0, 0, 0, 0.001, 0.003, 0.014, 0.048, 0.125 ),ncol=1)
dplyr::group_by(js,date,prefecture) %>% dplyr::summarise(.,sum(count))
# key を複数取るとことができる。primary key , sub key の順番?
VIX.Open VIX.High VIX.Low VIX.Close VIX.Volume VIX.Adjusted delta
2007-02-27 1.164265 1.776636 1.167954 1.730624 NaN 1.730624 0.112702008-09-29 1.049162 1.375391 1.137750 1.423522 NaN 1.423522 -0.833232010-01-22 1.203133 1.422549 1.207701 1.461991 NaN 1.461991 0.290172010-05-07 1.261941 1.547925 1.335158 1.643918 NaN 1.643918 0.018402011-08-08 1.501832 1.496726 1.451666 1.516109 NaN 1.516109 -0.267652011-11-01 1.384704 1.442352 1.385843 1.417448 NaN 1.417448 -0.02283
to.monthly(GSPC)[substr(mondate(index(w[w[,7] > 0]))+6,1,7)][,4] /as.vector(to.monthly(GSPC)[substr(index(w[w[,7] > 0]),1,7)][,4])[-11]
GSPC.Close
8 2007 1.0477467 2010 1.02582211 2010 1.08366010 2013 1.0995077 2014 1.08307012 2016 1.0666893 2017 1.08968011 2017 1.0977612 2018 1.09798312 2020 1.211522
平均は9.03%。