[R-SIG-Finance] functions for quarterly settlement dates
Jeff Ryan
jeff.a.ryan at gmail.com
Sun Feb 24 04:00:49 CET 2008
Just to be complete:
March 2008 expiry is on the 22nd, but the last trading day for those
contracts is the 20th, as the 21st is an exchange holiday due to the
early Easter.
http://www.optionsclearing.com/publications/xcal/xcal2008.pdf
So futures.expiry and options.expiry will give the wrong day in that
particular case. In all cases they give the Friday before the
Saturday expiration.
Jeff
On Sat, Feb 23, 2008 at 10:22 AM, Jeff Ryan <jeff.a.ryan at gmail.com> wrote:
> There isn't much magic here btw:
>
> > futures.expiry
> function (x)
> {
> which(format(index(x), "%d") > 14 & format(index(x), "%d") <
> 22 & format(index(x), "%w") == 5 & as.numeric(months(x,
> TRUE)) %in% c(3, 6, 9, 12))
> }
> <environment: namespace:quantmod>
>
> It does need a zoo or a 'xts' object.
>
>
> On Sat, Feb 23, 2008 at 9:24 AM, tom soyer <tom.soyer at gmail.com> wrote:
>
>
> > Hi,
> >
> > Are there built-in R functions that return both the nearest and the next
> > nearest quarterly settlement dates for options and futures?
> >
> > Thanks,
> >
> > --
> > Tom
> >
> > [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > 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.
> >
>
>
>
>
>
> --
> There's a way to do it better - find it.
> Thomas A. Edison
>
--
There's a way to do it better - find it.
Thomas A. Edison
More information about the R-SIG-Finance
mailing list