An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110530/64381f46/attachment.pl>
xts
3 messages · Emmanuel Senyo, Jeff Ryan, Joshua Ulrich
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110530/1366c229/attachment.pl>
Hi Emmanuel, On Mon, May 30, 2011 at 12:27 PM, Emmanuel Senyo
<emmanuel.senyo at gmail.com> wrote:
Dear All,
I am creating an xts object for a univariate time series data , EXX.dm but
it does not work. The data starts from 01/01/2008 to 09/05/2011 and I use
01/01/1970 as the base year. Below is my code.
library(PerformanceAnalytics)
library(xts)
b<-as.xts(EXX.dm, order.by=as.Date(13880:15104), origin=1970-01-01)
C<-VaR(b, p=0.5,method = c("historical"),portfolio_method =
c("single"),weights = NULL, mu = NULL, sigma = NULL,
? ?m3 = NULL, m4 = NULL, invert = TRUE))
I got the following error message:
Error in xts(x, order.by = order.by, frequency = frequency, ...) :
?NROW(x) must match length(order.by)
Please provide a minimal, reproducible example. We need to know the exact structure of EXX.dm and exactly where the error occurs.
I am new to R and need an assistance. Regards Emma
Best, -- Joshua Ulrich | FOSS Trading: www.fosstrading.com