Displaying 1 result from an estimated 1 matches for "tbillreturn".
2013 Apr 04
5
Help for bootstrapping‏
...1:396s = sample(x,6,replace=T)bsdata = data[(s[1]):(s[1]+59),] for (j in 2:6) { a = data[(s[j]):(s[j]+59),] bsdata = rbind(bsdata,a) }return(bsdata)}
#set.seed(1234)#trial<-GetBSData(OriData)
##############################the Minimisation functionOpt<-function(data, horizon, col, lamda){TbillReturn<-numeric(30/horizon)USReturn<-numeric(30/horizon)for (x in 1: (30/horizon)){ TbillReturn[x]<-prod(data[(12*horizon*(x-1)+1):(12*horizon*(x-1)+12*horizon),col])-1 USReturn[x]<-prod(data[(12*horizon*(x-1)+1):(12*horizon*(x-1)+12*horizon),2])-1}Return<-cbind(TbillReturn,USReturn)MeanVec...