[R-SIG-Finance] xts
Joshua Ulrich
josh.m.ulrich at gmail.com
Mon May 30 19:34:25 CEST 2011
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
More information about the R-SIG-Finance
mailing list