[R-SIG-Finance] time series question

Jeff Ryan jeff.a.ryan at gmail.com
Wed Jul 16 14:32:07 CEST 2008

I am not entirely sure which package you are referring to, but I will
assume you mean the timeSeries class from fSeries.

>From almost any time-series class you can use the to.period function
in the 'xts' package.  See ?to.period


getSymbols("QQQQ", ret='timeSeries')
#will load QQQQ into your workspace

to.period(QQQQ, 'months')

#or for quarterly


to.period is smart enough to make sure the class you pass in is the
class you get back.

With respect to 'maximum correlation' I am not too sure what you mean
by that... but see ?lag and ?Lag for a start.


On Wed, Jul 16, 2008 at 6:55 AM, Yalla, Swaroop (FID)
<Swaroop.Yalla at morganstanley.com> wrote:
> I am using the time series package and have a regularly spaced daily
> time-series. How do I convert it to a monthly or quarterly time-series
> (i.e. up-sample the time series). Is there a method to do that??
> Also, as a side questions - what is the best method to find maximum
> correlation between two time-series, one of which lags the other.
> thanks
> --------------------------------------------------------
> This is not an offer (or solicitation of an offer) to bu...{{dropped:23}}
> _______________________________________________
> 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.

Jeffrey Ryan
jeffrey.ryan at insightalgo.com

ia: insight algorithmics

More information about the R-SIG-Finance mailing list