I and another fellow have written the code to figure out which day is valid.
The issue is of course that you also have to know the valid holidays for each year.
Then you need to be able to do this for other locales.
I would be happy to pass along the code, so the logic could be extracted.
Dave
-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of David Brown
Sent: Wednesday, October 18, 2006 2:30 PM
To: [hidden email]
Subject: [Quantlib-users] Simple Expiration Date Handling
Hi-
I've been browsing through the object hierarchy for a bit now and noticed that QuantLib has a great date handling system which handles internationalization and Holiday exceptions, but it appears to me that something is missing. There does not appear to be a built-in provision to simply calculate the expiration dates of options. The majority of options traded in the United States are traded on Exchanges with set expiration dates and an American Style expiry. Lets say that I had a list of options. Supposed all of these options have the same strike for simplicity. Let us pretend that these are Exchange-style options, not OTC options. How would one rapidly know how much time there is until the expiration date of these options? I could write up a OO-proposal for this functionality, I supposed, but first wanted to check in to see if th is had been done yet?
For instance:
Obj 1: Oct 30 Calls misc details
Obj 2: Oct 30 Puts misc details
Obj 3: Nov 30 Puts misc details
Obj 4: Nov 35 Calls misc details
Today is 10/18/06. Days_To_Expiry = Obj1.DaysToExpiry Now this is passable to the calculation engine.
Any thoughts?
David Brown
The information contained in and accompanying this communication is for your information only. Such information is strictly confidential and is intended solely for the use of the intended recipient (s) - recipient. If you are not the intended recipient (s) of this communication, please delete and destroy all copies immediately. This is not an offer or solicitation with respect to the purchase or sale of any security. The information is based upon information that TANSTAAFL Research & Trading, L.L.C believes to be reliable. TANSTAAFL Research & Trading, L.L.C does not accept responsibility to update any opinions or other information contained in this communication.
| Free forum by Nabble | Edit this page |