Documentation Center

  • Trial Software
  • Product Updates

thirdwednesday

Find third Wednesday of month

Syntax

[BeginDates, EndDates] = thirdwednesday(Month, Year)

Arguments

Month

Month of delivery for Eurodollar futures.

Year

Four-digit year of delivery for Eurodollar futures, in sequence corresponding to a month in the Month input argument.

Inputs can be scalars or n-by-1 vectors.

Description

[BeginDates, EndDates] = thirdwednesday(Month, Year) computes the beginning and end period date for a LIBOR contract (third Wednesdays of delivery months).

BeginDates is the beginning of three-month period contract as specified by Month and Year.

EndDates is the end of three-month period contract as specified by Month and Year.

    Notes  

    • All dates are returned as serial date numbers. Convert to strings using datestr.

    • The function returns duplicates if you supply identical months and years.

    • The function supports dates from January 2000 to December 2099.

Examples

Find the third Wednesday dates for swaps commencing in the month of October in the years 2002, 2003, and 2004.

Months = [10; 10; 10];
Year = [2002; 2003; 2004];
[BeginDates, EndDates] = thirdwednesday(Months, Year);

datestr(BeginDates)
ans =

16-Oct-2002
15-Oct-2003
20-Oct-2004
datestr(EndDates)
ans =

16-Jan-2003
15-Jan-2004
20-Jan-2005
Was this topic helpful?