[R-SIG-Finance] [R-sig-finance] troubles with the weights in the VaR function

genx info at genetrix.se
Sat Apr 28 11:27:03 CEST 2007


I use financial data from Yahoo and it is of low quality i.e dirty but still
very popular since it's free. As an example, i want to compare the Swedish
stocks ABB, Ericsson and Skanska to the Stockholm OMX30 Index using various
measures available in rmetrics and the performanceanalytics packages. The
download procedure looks like this for each symbol which should result in
four vectors with the same length:

OMX30 <- get.hist.quote("^OMX",start=(today <- Sys.Date())-700, quote =
c("Close"), provider = c("yahoo"), retclass = c("zoo"))

> dim(OMX30)
[1] 451   1
> dim(ABB)
[1] 489   1
> dim(ERIC)
[1] 491   1
> dim(SKAB)
[1] 491   1


Solution - a Bloomberg terminal with high quality data?



Gabor Grothendieck wrote:
> 
> On 4/26/07, genx <info at genetrix.se> wrote:
>>
>> I have the same problem with vectors of different length, most packages
>> don't
>> know how to scale and adjust timeseries / vectors of different length. It
>> would be a welcome contribution to R Finance if any programmer out there
>> could solve this problem in an easy way.
>>
> 
> All of the major time series classes handle series of different lengths.
> 
> a <- ts(1:3); b <- ts(12:15, start = 2)
> a + b
> a == b
> 
> library(zoo)
> az <- as.zoo(a); bz <- as.zoo(b)
> az + bz
> az == bz
> 
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. 
> -- If you want to post, subscribe first.
> 
> 

-- 
View this message in context: http://www.nabble.com/troubles-with-the-weights-in-the-VaR-function-tf2785155.html#a10231268
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list