[Blotter-commits] r480 - pkg/RTAQ/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 30 15:16:16 CET 2010
Author: jonathan
Date: 2010-11-30 15:16:16 +0100 (Tue, 30 Nov 2010)
New Revision: 480
Modified:
pkg/RTAQ/R/volatility.R
Log:
Bugfix TSCov & RTSCov in univariate case
Modified: pkg/RTAQ/R/volatility.R
===================================================================
--- pkg/RTAQ/R/volatility.R 2010-11-30 11:56:13 UTC (rev 479)
+++ pkg/RTAQ/R/volatility.R 2010-11-30 14:16:16 UTC (rev 480)
@@ -357,7 +357,10 @@
# if(hasArg(data)){ rdata = data }
# if(makeReturns){ rdata = makeReturns(rdata)}
- if(!is.list(pdata)){ n = 1 }else{ n = length(pdata)}
+ if(!is.list(pdata)){ n = 1 }else{
+ n = length(pdata);
+ if(n==1){pdata=pdata[[1]];}
+ }
if( n == 1 ){ return( RTSRV( pdata, startIV=startIV , noisevar = noisevar , K = K , J = J, eta = eta ))}
@@ -467,7 +470,10 @@
# if(hasArg(data)){ rdata = data }
# if(makeReturns){ rdata = makeReturns(rdata)}
- if(!is.list(pdata)){ n = 1 }else{ n = length(pdata)}
+ if(!is.list(pdata)){ n = 1 }else{
+ n = length(pdata);
+ if(n==1){pdata=pdata[[1]];}
+ }
if( n == 1 ){ return( TSRV( pdata, K = K , J = J ))}
More information about the Blotter-commits
mailing list