Re: Simple Expiration Date Handling

Posted by David Brown-27 on
URL: http://quantlib.414.s1.nabble.com/Simple-Expiration-Date-Handling-tp5105p5111.html

OK.  So if this already object already exists, all we need to do, as D. Palmer said, is to somehow create a new object which inherrits these properties and creates a few new ones using:
  1)  Logic about third Friday after the third Thursday.  This is cake and a simple conditional-if or case statement will work fine.
  2)  Incorporate holiday checking and handling into step one above and determine when the rearranged expiration time is set.  Does anyone know the rule for this?
  3)  As D. Palmer was saying, depending on the object being evaluated, change the expiration times appropriately.

  Finally, we must recall that this typically only coordinates to American-Style exchange traded options on certain exchanges in the USA.  What is to be done for other countries.  Assuming we could get complete information on when options expire in different parts of the world, could this then be handled inside of the localization classes?  I see this as the only long-term way to handle multiple currencies and options across the world reliably and quickly.

   Please chime in here with any thoughts.

DB


p.s. Two years ago I wrote about working with a FpML/XML parser.  A large list of exchange traded options could be handled smoothly if these things were implemented properly.



On 10/20/06, David Brown <[hidden email]> wrote:
The rule isn't the third friday.  The rule is the third friday after the third thursday.  its a subtle but very important difference.  Therefore, there is a 1/7 chance that it could be the fourth friday.  Get what I'm saying?

DB



On 10/19/06, David Palmer <[hidden email]> wrote:
All that needs to be done is check for holidays. The CBOT has a different set of rules for their financial products than does the US equity single stock world. In addition there are some indices that expire at the open on Friday i.e. NDX whereby the Friday expiration and settlement is actually untradable. So when vauling the derivative, while you are getting Friday, you are getting Friday and 8:30 AM CST / 9:30 AM EST as opposed to 3:00 CST / 4:00 EST.

In the event that the Friday is a holiday the Thursday is used. This is for single stock options.

Dave

________________________________

From: [hidden email] on behalf of Ferdinando Ametrano
Sent: Thu 10/19/2006 4:57 AM
To: Vangipuram, Satish
Cc: [hidden email]
Subject: Re: [Quantlib-users] Simple Expiration Date Handling



Hi all

> Since the option expiration falls on the 3rd Friday of each
> month it may be possible to determine this day without any hardcoding.

the function
static Date nthWeekday(Size n, Weekday, Month m, Year y);
is already available, and could be used as in e.g.
nthWeekday(3, Friday, Octrober, 2006)
to get the option expiry for this month.

Is there more than this in your proposals?

You might also want to look at
static Date IMMdate(const std::string& IMMcode, const Date&
referenceDate = Date());
for an example about how to go from "Z6" -> 20-Dec-2006

ciao -- Nando

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
QuantLib-users mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://lists.sourceforge.net/lists/listinfo/quantlib-users



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.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
<a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
QuantLib-users mailing list
[hidden email]
<a href="https://lists.sourceforge.net/lists/listinfo/quantlib-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> https://lists.sourceforge.net/lists/listinfo/quantlib-users