Displaying 1 result from an estimated 1 matches for "entity_volatility".
2012 Jan 11
1
Constructing a data.frame from csv files
...e[i]/price[i+1])
}
volatility = sd(price_returns)
entity_returns = unique(instru_name)
colnames(price_returns) = entity_returns
write.csv(price_returns, file = paste(entity_returns, ".csv", sep = ""), row.names = FALSE)
return(data.frame(list(volatility = volatility)))
}
entity_volatility <- ddply(.data=mydata, .variables = "instru_name",
.fun=function(x) opt_return_volatilty(price = x$price, instru_name = x$instru_name))
> entity_volatility
instru_name volatility
1 instru_A 0.17746897
2 instru_B 0.06565341
...