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

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


Hi Tom,

This gets the job done in almost all cases - there is an exception in
08, of which I don't have in front of me. At the very least it will
get you started.

> library(quantmod)
Loading required package: xts
Loading required package: zoo
Loading required package: Defaults
quantmod: Quantitative Financial Modelling Framework

Version 0.3-2
http://www.quantmod.com

> getSymbols("QQQQ")
[1] "QQQQ"
> index(QQQQ)[futures.expiry(QQQQ)]
[1] "2007-03-16" "2007-06-15" "2007-09-21" "2007-12-21"
> index(QQQQ)[options.expiry(QQQQ)]
 [1] "2007-01-19" "2007-02-16" "2007-03-16" "2007-04-20" "2007-05-18"
 [6] "2007-06-15" "2007-07-20" "2007-08-17" "2007-09-21" "2007-10-19"
[11] "2007-11-16" "2007-12-21" "2008-01-18" "2008-02-15"
>

Jeff

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