(1) CLIデルタがプラスかつ二次デルタがマイナスの場合の月間収益率
func <- function(x,y,z){if(x >0 && y <0){return(z) }else(return(NA))}
date <- paste("1970",index(cli_xts) %>% last() %>% substr(.,1,7),sep="::")
i <- 12- length(diff(cli_xts$oecd)[date]) %%12
matrix(c(mapply(func,diff(cli_xts$oecd)[date], diff(diff(cli_xts$oecd))[date] ,as.vector(monthlyReturn(GSPC)[date])),rep(NA,i)),nrow=12) %>% t() %>% apply(.,2,mean,na.rm=T) %>% round(.,4)
[1] 0.0047 0.0100 0.0189 0.0162 -0.0062 0.0019 0.0168 0.0091 0.0047 0.0084 0.0298 0.0187
(2) CLIデルタがプラスかつ二次デルタがプラスの場合の月間収益率
func <- function(x,y,z){if(x >0 && y >0){return(z) }else(return(NA))}
date <- paste("1970",index(cli_xts) %>% last() %>% substr(.,1,7),sep="::")
i <- 12- length(diff(cli_xts$oecd)[date]) %%12
matrix(c(mapply(func,diff(cli_xts$oecd)[date], diff(diff(cli_xts$oecd))[date] ,as.vector(monthlyReturn(GSPC)[date])),rep(NA,i)),nrow=12) %>% t() %>% apply(.,2,mean,na.rm=T) %>% round(.,4)
[1] 0.0258 0.0146 0.0217 0.0420 0.0277 0.0138 0.0247 0.0099 0.0064 0.0166 0.0334 0.0184
(2) CLIデルタがマイナスかつ二次デルタがマイナスの場合の月間収益率
func <- function(x,y,z){if(x <0 && y <0){return(z) }else(return(NA))}
date <- paste("1970",index(cli_xts) %>% last() %>% substr(.,1,7),sep="::")
i <- 12- length(diff(cli_xts$oecd)[date]) %%12
matrix(c(mapply(func,diff(cli_xts$oecd)[date], diff(diff(cli_xts$oecd))[date] ,as.vector(monthlyReturn(GSPC)[date])),rep(NA,i)),nrow=12) %>% t() %>% apply(.,2,mean,na.rm=T) %>% round(.,4)
[1] 0.0038 -0.0189 -0.0051 0.0098 -0.0011 0.0013 -0.0123 -0.0124 -0.0207 -0.0544 -0.0328 0.0082
(2) CLIデルタがマイナスかつ二次デルタがプラスの場合の月間収益率
func <- function(x,y,z){if(x <0 && y >0){return(z) }else(return(NA))}
date <- paste("1970",index(cli_xts) %>% last() %>% substr(.,1,7),sep="::")
i <- 12- length(diff(cli_xts$oecd)[date]) %%12
matrix(c(mapply(func,diff(cli_xts$oecd)[date], diff(diff(cli_xts$oecd))[date] ,as.vector(monthlyReturn(GSPC)[date])),rep(NA,i)),nrow=12) %>% t() %>% apply(.,2,mean,na.rm=T) %>% round(.,4)
[1] 0.0066 0.0017 0.0095 -0.0002 -0.0008 -0.0014 0.0170 0.0015 -0.0138 0.0367 0.0136 0.0117