Displaying 1 result from an estimated 1 matches for "max_boot_return".
2009 Aug 10
0
Speeding up a bootstrap routine
...tevector[sample(n,n,replace=TRUE)]
for(j in 1:n) {
matrix_1[j] <- zerocentredreturns1[date_sample[j]]
matrix_2[j] <- zerocentredreturns2[date_sample[j]]
matrix_3[j] <- zerocentredreturns3[date_sample[j]]
x <- mean(matrix_1)
y <- mean(matrix_2)
z <- mean(matrix_3)
max_boot_return <- max(x,y,z)
if (max_boot_return>=average_daily_return1) result1 <- result1+1 # create
"p values"
if (max_boot_return>=average_daily_return2) result2 <- result2+1 # create
"p values"
if (max_boot_return>=average_daily_return3) result3 <- result3+1 #...