In article <[EMAIL PROTECTED]>,
 "Laguna" <[EMAIL PROTECTED]> wrote:

> I want to find the expiration date of stock options (3rd Friday of the
> month) for an any give month and year. I have tried a few tricks with
> the functions provided by the built-in module time, but the problem was
> that the 9 element tuple need to be populated correctly. Can anyone
> help me out on this one?
...
> Requirements:
> 
> d0 = expiration(9, 2005) # d0 would be 16
> d1 = expiration(6, 2003) # d1 would be 20
> d2 = expiration(2, 2006) # d2 would be 17

What do you mean by, "the 9 element tuple need to be populated
correctly"?  Do you need someone to tell you what values it
needs?  What happens if you use (2005, 9, 1, 0, 0, 0, 0, 0, 0),
for example?  If you make this tuple with localtime or gmtime,
do you know what the 7th (tm[6]) element of the tuple is?
What tricks did you try, exactly?

   Donn Cave, [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to