Skip to content
Prev 2540 / 15274 Next

Applying quarterly weights on daily returns

If I understand it then you want to lag rets by one day, mulitply that
by tsig and then sum over the quarter and mulitply that by wts:

z <- tsig * lag(rets)
rowsum(z, as.yearqtr(time(z))) * wts

The rowsum output is a matrix and wts is zoo so
this depends on them having the same shapes.
On Mon, Jun 9, 2008 at 12:19 PM, Murali Menon <feanor0 at hotmail.com> wrote: