[R-SIG-Finance] functions for quarterly settlement dates

Jeff Ryan jeff.a.ryan at gmail.com
Sat Feb 23 17:22:33 CET 2008


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



More information about the R-SIG-Finance mailing list