Displaying 1 result from an estimated 1 matches for "daily_ret_subsampl".
Did you mean:
daily_ret_subsample
2013 May 01
0
log returns, error
...p://www.file-upload.net/download-7537530/daily.csv.html
>
>############################
>data <- read.csv("daily.csv", sep=",")
>data
>#Step 1: Daily Log Returns
>daily_ret <- NULL
>for (i in c(2:ncol(data))){
> subsample <- data[ ,i]
> daily_ret_subsample <- diff(log(subsample))
> daily_ret <- cbind(daily_ret, daily_ret_subsample)
>}
>daily_ret <- cbind(tail(x=data[ ,1], n=nrow(daily_ret)), daily_ret)
>colnames(daily_ret) <- colnames(data)
>daily_ret <- as.data.frame(daily_ret)
>daily_ret
> ###############...