# Created by Octave 3.2.4, Tue Nov 23 12:53:18 2010 EST <mockbuild@jetta.math.Princeton.EDU.private>
# name: cache
# type: cell
# rows: 3
# columns: 24
# name: <cell-element>
# type: string
# elements: 1
# length: 7
busdate
# name: <cell-element>
# type: string
# elements: 1
# length: 833
 -- Function File: b = busdate (refdate)
 -- Function File: b = busdate (refdate, direction)
 -- Function File: b = busdate (refdate, direction, holiday)
 -- Function File: b = busdate (refdate, direction, holiday, weekend)
     Return the datenum of the next or previous business day from
     REFDATE. DIRECTION indicates the next day (default) if 1 and the
     previous day if -1.  HOLIDAY is a vector of datenums that defines
     the holidays observed (the holidays function is used if not
     given).  WEEKEND defines the days of the week that should be
     considered weekends; [1 0 0 0 0 0 1] (default) indicates that
     Sunday and Saturday are holidays.

     If any of the optional inputs (DIRECTION, HOLIDAY, WEEKEND) are
     empty, then the default is used.

     See also: holidays, lbusdate, isbusday, fbusdate



# name: <cell-element>
# type: string
# elements: 1
# length: 69
Return the datenum of the next or previous business day from REFDATE.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
datefind
# name: <cell-element>
# type: string
# elements: 1
# length: 203
 -- Function File: indices = datefind (subset, superset, tol)
     Find any instances of the `subset' in the `superset' with the
     `tol'erance.  `tol' is 0 by default.

     See also: date, datenum



# name: <cell-element>
# type: string
# elements: 1
# length: 74
Find any instances of the `subset' in the `superset' with the
`tol'erance.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
datesplit
# name: <cell-element>
# type: string
# elements: 1
# length: 3210
 -- Function File: Y = datesplit(date, P)
 -- Function File: [Y,M,D,h,m,s] = datesplit(date, P)
     Split a date string into the Year, Month, Day, hour, minute, and
     second.  This routine tries to be as forgiving as possible to the
     date input while requiring that the date is not ambiguous.

     Anywhere possible where it would not be ambiguous, efforts were
     made to make times possible with seconds and AM/PM as optional.
     Also, along the same lines, where possible, commas were allowed
     with spaces, and the year/month/day separators were allowed as
     period (.), slash (/), and dash (-).  Not all format possibilities
     are shown in the following table, but a date like `dd-mmm-yyyy
     HH:MM:SS' is parsed just as well as `d/mmm.yyyy,  ,H:MM, AM'.

     Supported `date' formats include (the same as datestr):
     *Code*  *Format*                       *Example*
     0       dd-mmm-yyyy HH:MM:SS           07-Sep-2000 15:38:09
     1       dd-mmm-yyyy                    07-Sep-2000
     2       mm/dd/yy                       09/07/00
     3       mmm                            Sep
     6       mm/dd                          09/13
     10      yyyy                           2000
     12      mmmyy                          Sep00
     13      HH:MM:SS                       15:38:09
     14      HH:MM:SS PM                    03:38:09 PM
     15      HH:MM                          15:38
     16      HH:MM PM                       03:38 PM
     17      QQ-YY                          Q3-00
     19      dd/mm                          13/03
     20      dd/mm/yy                       13/03/95
     21      mmm.dd.yyyy HH:MM:SS           Mar.03.1962 13:53:06
     22      mmm.dd.yyyy                    Mar.03.1962
     23      mm/dd/yyyy                     03/13/1962
     24      dd/mm/yyyy                     12/03/1962
     25      yy/mm/dd                       95/03/13
     26      yyyy/mm/dd                     1995/03/13
     27      QQ-YYYY                        Q4-2132
     28      mmmyyyy                        Mar2047
     29      yyyymmdd                       20470313
     30      yyyymmddTHHMMSS                20470313T132603
     31      yyyy-mm-dd HH:MM:SS            1047-03-13 13:26:03

     The parameter `P' is needed to convert date strings with 2 digit
     years into dates with 4 digit years.  2 digit years are assumed to
     be between `P' and `P+99'. If `P' is not given then the current
     year - 50 is used, so that dates are centered on the present.  For
     birthdates, you would want `P' to be current year - 99.  For
     appointments, you would want `P' to be current year.

     This function makes no strong attempt to verify the accuracy of the
     numbers that it returns in that it doesn't (currently) check to see
     that you're not trying to use the date Feb 30.  When applicable, it
     tries to make your input work, though.  It will try to determine if
     you're using the date "03/13/95" that the date is "March 13, 1995",
     but if there is doubt, datesplit will return an error instead of
     trying to guess the wrong value.

     See also: date, clock, now, datestr, datenum, calendar, weekday



# name: <cell-element>
# type: string
# elements: 1
# length: 72
Split a date string into the Year, Month, Day, hour, minute, and
second.

# name: <cell-element>
# type: string
# elements: 1
# length: 3
day
# name: <cell-element>
# type: string
# elements: 1
# length: 169
 -- Function File: dom = day (Date)
     Returns the day of the month from a serial date number or a date
     string.

     See also: date, datevec, now, month, year



# name: <cell-element>
# type: string
# elements: 1
# length: 72
Returns the day of the month from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
daysact
# name: <cell-element>
# type: string
# elements: 1
# length: 578
 -- Function File:  daysact (D1)
 -- Function File:  daysact (D1, D2)
     Calculates the number of days between two dates. If the second
     date is not given, calculate the number of days since 1-Jan-0000.
     The variables D1 and D2 can either be strings or an N-row string
     matrix. If both D1 and D2 are string matrices, then the number of
     rows must match. An example of the use of `daysact' is

          daysact ("01-Jan-2007", ["10-Jan-2007"; "23-Feb-2007"; "23-Jul-2007"])
          =>      9
                 53
                203

     See also: datenum



# name: <cell-element>
# type: string
# elements: 1
# length: 48
Calculates the number of days between two dates.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
easter
# name: <cell-element>
# type: string
# elements: 1
# length: 211
 -- Function File: [m, d] = easter (y)
 -- Function File: datenum = easter (y)
     Return the month (M) and day (D) of Easter in the Gregorial
     calendar on a given year or years.

     See also: holidays



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Return the month (M) and day (D) of Easter in the Gregorial calendar on
a given 

# name: <cell-element>
# type: string
# elements: 1
# length: 7
eomdate
# name: <cell-element>
# type: string
# elements: 1
# length: 169
 -- Function File: E = eomdate (Y, M)
     Return the last day of the month M for the year Y in datenum
     format.

     See also: datenum, datevec, weekday, eomday



# name: <cell-element>
# type: string
# elements: 1
# length: 68
Return the last day of the month M for the year Y in datenum format.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
fbusdate
# name: <cell-element>
# type: string
# elements: 1
# length: 679
 -- Function File: b = fbusdate (year, month)
 -- Function File: b = fbusdate (year, month, holiday)
 -- Function File: b = fbusdate (year, month, holiday, weekend)
     Return the datenum of the first business day of the YEAR and
     MONTH.  HOLIDAY is a vector of datenums that defines the holidays
     observed (the holidays function is used if not given).  WEEKEND
     defines the days of the week that should be considered weekends;
     [1 0 0 0 0 0 1] (default) indicates that Sunday and Saturday are
     holidays.

     If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
     the default is used.

     See also: holidays, lbusdate, isbusday, busdate



# name: <cell-element>
# type: string
# elements: 1
# length: 67
Return the datenum of the first business day of the YEAR and MONTH.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
holidays
# name: <cell-element>
# type: string
# elements: 1
# length: 586
 -- Function File: h = holidays (startdate, enddate)
     Return a vector of datenums that were holidays between STARTDATE
     and ENDDATE, inclusive.  These holidays are trading holidays
     observed by the NYSE according to its rule 51.10. It does not take
     into account the exceptions for "unusual business conditions" or
     for additional days that have been called as holidays for one-time
     purposes.

     The complete list can be found at
     http://www.chronos-st.org/NYSE_Observed_Holidays-1885-Present.html

     See also: busdate, lbusdate, isbusday, fbusdate



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Return a vector of datenums that were holidays between STARTDATE and
ENDDATE, in

# name: <cell-element>
# type: string
# elements: 1
# length: 4
hour
# name: <cell-element>
# type: string
# elements: 1
# length: 154
 -- Function File: h = hour (Date)
     Returns the hour from a serial date number or a date string.

     See also: date, datevec, now, minute, second



# name: <cell-element>
# type: string
# elements: 1
# length: 60
Returns the hour from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
isbusday
# name: <cell-element>
# type: string
# elements: 1
# length: 551
 -- Function File: r = isbusday (refdate)
 -- Function File: r = isbusday (refdate, holiday)
 -- Function File: r = isbusday (refdate, holiday, weekend)
     Return true if the REFDATE is a business date REFDATE.  HOLIDAY is
     a vector of datenums that defines the holidays observed (the
     holidays function is used if not given). WEEKEND defines the days
     of the week that should be considered weekends; [1 0 0 0 0 0 1]
     (default) indicates that Sunday and Saturday are weekends.

     See also: holidays, lbusdate, busdate, fbusdate



# name: <cell-element>
# type: string
# elements: 1
# length: 54
Return true if the REFDATE is a business date REFDATE.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
lbusdate
# name: <cell-element>
# type: string
# elements: 1
# length: 672
 -- Function File: b = lbusdate (year, month)
 -- Function File: b = lbusdate (year, month, holiday)
 -- Function File: b = lbusdate (year, month, holiday, weekend)
     Return the datenum of the last business day of the YEAR and MONTH.
     HOLIDAY is a vector of datenums that defines the holidays observed
     (the holidays function is used if not given).  WEEKEND defines the
     days of the week that should be considered weekends; [1 0 0 0 0 0
     1] (default) indicates that Sunday and Saturday are holidays.

     If any of the optional inputs (HOLIDAY, WEEKEND) are empty, then
     the default is used.

     See also: holidays, fbusdate, isbusday, busdate



# name: <cell-element>
# type: string
# elements: 1
# length: 66
Return the datenum of the last business day of the YEAR and MONTH.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
lweekdate
# name: <cell-element>
# type: string
# elements: 1
# length: 277
 -- Function File: last = lweekdate (weekday, year, month, nextday)
     Returns the last occurrence of WEEKDAY from the MONTH and YEAR.
     If the optional NEXTDAY argument is given, then the week must also
     contain NEXTDAY.

     See also: eomdate, nweekdate, weekday



# name: <cell-element>
# type: string
# elements: 1
# length: 63
Returns the last occurrence of WEEKDAY from the MONTH and YEAR.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
m2xdate
# name: <cell-element>
# type: string
# elements: 1
# length: 966
 -- Function File: exceldatenums = m2xdate (datenums)
 -- Function File: exceldatenums = m2xdate (datenums, convention)
 -- Function File: exceldatenums = m2xdate (datenums, convention,
          "ExcelBug")
     Convert DATENUMS from the internal date format to the format used
     by Microsoft Excel.  If set to 0 (default, Excel for Windows),
     CONVENTION specifies to use the Excel 1900 convention where Jan 1,
     1900 corresponds to Excel serial date number 1.  If set to 1
     (Excel for Mac), CONVENTION specifies to use the Excel 1904
     convention where Jan 1, 1904 corresponds to Excel serial date
     number 0.

     Note that this does not take into account the Excel bug where 1900
     is considered to be a leap year unless you give the "ExcelBug"
     option.

     Excel does not represent dates prior to 1 January 1900 using this
     format, so a warning will be issued if any dates preceed this date.

     See also: datenum, x2mdate



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Convert DATENUMS from the internal date format to the format used by
Microsoft E

# name: <cell-element>
# type: string
# elements: 1
# length: 6
minute
# name: <cell-element>
# type: string
# elements: 1
# length: 156
 -- Function File: m = minute (Date)
     Returns the minute from a serial date number or a date string.

     See also: date, datevec, now, hour, second



# name: <cell-element>
# type: string
# elements: 1
# length: 62
Returns the minute from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 5
month
# name: <cell-element>
# type: string
# elements: 1
# length: 169
 -- Function File: mon = month (Date)
     Returns the day of the month from a serial date number or a date
     string.

     See also: date, datevec, now, day, year



# name: <cell-element>
# type: string
# elements: 1
# length: 72
Returns the day of the month from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
months
# name: <cell-element>
# type: string
# elements: 1
# length: 514
 -- Function File: mos = months (startdate, enddate)
 -- Function File: mos = months (startdate, enddate, endmonthflag)
     Return the number of whole months between STARTDATE and ENDDATE.
     ENDMONTHFLAG defaults to 1.

     If ENDMONTHFLAG is true, then if both the STARTDATE and the
     ENDDATE are end of month dates and ENDDATE has fewer days in the
     month than STARTDATE, ENDMONTHFLAG = 1 treats ENDDATE as the end
     of a month, but ENDMONTHFLAG = 0 does not.

     See also: yeardays, yearfrac



# name: <cell-element>
# type: string
# elements: 1
# length: 64
Return the number of whole months between STARTDATE and ENDDATE.

# name: <cell-element>
# type: string
# elements: 1
# length: 9
nweekdate
# name: <cell-element>
# type: string
# elements: 1
# length: 374
 -- Function File: last = nweekdate (n, weekday, year, month, nextday)
     Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR.  If
     the optional NEXTDAY argument is given, then the week must also
     contain NEXTDAY.  If N is greater than the number of occurrences
     of that day in the month, 0 is returned.

     See also: eomdate, lweekdate, weekday



# name: <cell-element>
# type: string
# elements: 1
# length: 62
Returns the Nth occurrence of WEEKDAY from the MONTH and YEAR.

# name: <cell-element>
# type: string
# elements: 1
# length: 6
second
# name: <cell-element>
# type: string
# elements: 1
# length: 156
 -- Function File: s = second (Date)
     Returns the second from a serial date number or a date string.

     See also: date, datevec, now, hour, minute



# name: <cell-element>
# type: string
# elements: 1
# length: 62
Returns the second from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 14
thirdwednesday
# name: <cell-element>
# type: string
# elements: 1
# length: 391
 -- Function File: [begindate, enddate] = thirdwednesday (month, year)
     Find the third Wednesday of the month specified by the MONTH and
     YEAR.  The BEGINDATE is the third Wednesday of the month, and the
     ENDDATE is three months after that.  Outputs are in the form of
     datenums.

     The third Wednesday is used for Eurodollar futures.

     See also: nweekdate, datenum



# name: <cell-element>
# type: string
# elements: 1
# length: 70
Find the third Wednesday of the month specified by the MONTH and YEAR.

# name: <cell-element>
# type: string
# elements: 1
# length: 5
today
# name: <cell-element>
# type: string
# elements: 1
# length: 360
 -- Function File: datenum = today ()
     Returns the current local date as the number of days since Jan 1,
     0000.  By this reckoning, Jan 1, 1970 is day number 719529.

     The returned number corresponds to 00:00:00 today.

     The returned value is also called a "serial date number" (see
     `datenum').

     See also: clock, date, datenum, now



# name: <cell-element>
# type: string
# elements: 1
# length: 71
Returns the current local date as the number of days since Jan 1, 0000.

# name: <cell-element>
# type: string
# elements: 1
# length: 7
x2mdate
# name: <cell-element>
# type: string
# elements: 1
# length: 967
 -- Function File: datenums = x2mdate (exceldatenums)
 -- Function File: datenums = x2mdate (exceldatenums, convention)
 -- Function File: datenums = x2mdate (exceldatenums, convention,
          "ExcelBug")
     Convert DATENUMS from the Microsoft Excel date format to the
     format used by `datenum'.  If set to 0 (default, Excel for
     Windows), CONVENTION specifies to use the Excel 1900 convention
     where Jan 1, 1900 corresponds to Excel serial date number 1.  If
     set to 1 (Excel for Mac), CONVENTION specifies to use the Excel
     1904 convention where Jan 1, 1904 corresponds to Excel serial date
     number 0.

     Note that this does not take into account the Excel bug where 1900
     is considered to be a leap year unless you give the "ExcelBug"
     option.

     Excel does not represent dates prior to 1 January 1900 using this
     format, so a warning will be issued if any dates preceed this date.

     See also: datenum, x2mdate



# name: <cell-element>
# type: string
# elements: 1
# length: 80
Convert DATENUMS from the Microsoft Excel date format to the format
used by `dat

# name: <cell-element>
# type: string
# elements: 1
# length: 4
year
# name: <cell-element>
# type: string
# elements: 1
# length: 150
 -- Function File: y = year (Date)
     Returns the year from a serial date number or a date string.

     See also: date, datevec, now, day, month



# name: <cell-element>
# type: string
# elements: 1
# length: 60
Returns the year from a serial date number or a date string.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
yeardays
# name: <cell-element>
# type: string
# elements: 1
# length: 596
 -- Function File: D = yeardays (Y)
 -- Function File: D = yeardays (Y, B)
     Return the number of days in the year Y with an optional basis B.

     Valid bases
        * 0   actual/actual (default)

        * 1   30/360 (SIA)

        * 2   actual/360

        * 3   actual/365

        * 4   30/360 (PSA)

        * 5   30/360 (IDSA)

        * 6   30/360 (European)

        * 7   actual/365 (Japanese)

        * 8   actual/actual (ISMA)

        * 9   actual/360 (ISMA)

        * 10   actual/365 (ISMA)

        * 11   30/360E (ISMA)

     See also: days365, days360, daysact, daysdif



# name: <cell-element>
# type: string
# elements: 1
# length: 65
Return the number of days in the year Y with an optional basis B.

