search for: horizonperformance

Displaying 1 result from an estimated 1 matches for "horizonperformance".

2009 Jun 01
0
vectorizing a double loop
...eates the empty vector for the indicator indicator[,1]=0 if ((H/N)==floor(H/N)) { #Checks if length of subperiods is an integer for (i in 1:(length(indicator)-H)) { ph=last(price,H+1) #Horizon time data list horizonPerformance=as.numeric(last(ph))/as.numeric(first(ph))-1 #Performance over the time horizon for (j in 1:N) { phj=last(first(ph,(N-j+1)*H/N+1),H/N+1) #subperiod data list periodPerf=as.numeric(last(phj))/as.numeric(first(phj))-1 #Performance over period j...