Displaying 3 results from an estimated 3 matches for "cameronhume".
2012 Dec 17
4
R beginner: matrix algebra
Hi, I have an n x m matrix of numerical observations. ie. stock prices
I wish to convert the matrix of observations to a matrix of simple returns
(by taking the differences between (column) observations.)
Can any good soul suggest a function for this?
--
View this message in context: http://r.789695.n4.nabble.com/R-beginner-matrix-algebra-tp4653335.html
Sent from the R help mailing list
2013 Jan 25
3
Help with adding 'dates' string as rownames to matrix
Hi, I need help with two related issues:
1. I wish to drop repeating text "BST" from the below 'dates' string:
[1] "2005-04-01 BST" "2005-04-04 BST" "2005-04-05 BST" "2005-04-06 BST"
"2005-04-07 BST" "2005-04-08 BST" "2005-04-11 BST" "2005-04-12 BST"
"2005-04-13 BST" "2005-04-14
2013 Jan 24
1
Error with Expected Shortfall function, ES.
ES function gives the below error.
> ES(sim, p=.95, method=c("modified"),portfolio_method=c("component"),
> weights=w1)
/Error in checkData(R, method = "xts", ...) : The data cannot be converted
into a time series. If you are trying to pass in names from a data object
with one column, you should use the form 'data[rows, columns, drop =
FALSE]'.