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

genx info at genetrix.se
Sun Apr 29 14:40:23 CEST 2007


Well, after browsing the zoo documentation i found a wealth of information,
it's all there.
Solving my problem with differenth length of the benchmark index and stocks
i want to
compare the zoo documentation suggested the following

zoo(x, order.by = index(x), frequency = NULL)


Full documentation here:
http://rss.acs.unt.edu/Rdoc/library/zoo/html/zoo.html

Thank you



Gabor Grothendieck wrote:
> 
> the code shows two examples.  The first using "ts" class series and the
> second with "zoo" series.
> 
> On 4/27/07, genx <info at genetrix.se> wrote:
>>
>> Thank you for you reply,
>>
>> i am a novice when it comes to CRAN R, i haven't looked much outside
>> rMetrics so far.
>> My recurring problem is daily financial data of different length, the
>> procedure you
>> describe below are two separate ways to align timeseries or should it be
>> done as one
>> command? If it has to be done in two stages as you describe it is a very
>> time consuming
>> way to handle all the financial data that, i guess anyone, would put to
>> use
>> in finance R.
>>
>> Kind regards
>>
>>
>> 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#a10215187
>> Sent from the Rmetrics mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> 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.
>>
> 
> _______________________________________________
> 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#a10241460
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list