search for: detrendedreturns

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

2009 Aug 10
0
Speeding up a bootstrap routine
...t as it stands at the moment it is painfully slow. It is written as a function as I call it many times from a script file with different data input, and the output is sunk() to a text file. Could anyone suggest improvements to the code to increase its speed? boot_white_test <- function(data) { detrendedreturns <- data[,1]; # creates a separate column vector of detrended returns (preparation for multiplication that follows) posvector1 <- data[,2]; # creates a column of position vectors for smoothed price posvector2 <- data[,3]; # creates a column of position vectors for 2 bar prediction posvector...