search for: periodperf

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

2009 Jun 01
0
vectorizing a double loop
...rice,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 if (periodPerf*horizonPerformance>0) #checks consistency with time horizon perf indicator[length(indicator)-i+1,1]=indicator[length(indicator)-i+1,1]+sign(periodPerf) }...