[R-SIG-Finance] [R-sig-finance] troubles with the weights in the VaR function
Brian G. Peterson
brian at braverock.com
Fri Apr 27 15:25:07 CEST 2007
On Friday 27 April 2007 03:31, genx wrote:
> 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.
Non-aligned timeseries data is *always* a problem, in any statistical
language or data environment which I have ever been introduced to.
As Gabor points out, all timeseries classes in R can handle timeseries of
different lengths. In the zoo library, there are many na.rm function
parameters to tell zoo what you want to do with missing data. See the
zoo documentation for more information, but I assume in most cases with
daily data, you'd want to use na.contiguous or na.interp to fill in the
blanks. Of course, this all depends on your data, and what you are
trying to accomplish.
Regards,
- Brian
--
773-459-4973 mobile
http://braverock.com/brian/resume-quant.pdf
More information about the R-SIG-Finance
mailing list