Products & Services Solutions Academia Support User Community Company

Learn more about Financial Toolbox   

daysadd - Date away from starting date for any day-count basis

Syntax

NumDays = daysadd(StartDate, NumDays, Basis)

Arguments

StartDate

Start date. Enter as serial date numbers or date strings.

NumDays

Integer number of days from start date. Enter a negative integer for dates before start date.

Basis

(Optional) Day-count basis of the instrument. A vector of integers.

  • 0 = actual/actual (default)

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ISMA)

  • 9 = actual/360 (ISMA)

  • 10 = actual/365 (ISMA)

  • 11 = 30/360E (ISMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

Description

NumDays = daysadd(StartDate, NumDays, Basis) returns a date NumDays number of days away from StartDate, using the given day-count basis.

Examples

NewDate = daysadd('01-Feb-2004', 31)

NewDate =

      732009

datestr(NewDate)

ans =

03-Mar-2004

NewDate = daysadd('01-Feb-2004', 31, 1)

NewDate =

      732008

datestr(NewDate)

ans =

02-Mar-2004

References

Stigum, Marcia L. and Franklin Robinson, Money Market and Bond Calculations, Richard D. Irwin, 1996, ISBN 1-55623-476-7

See Also

daysdif

  


Free Interactive Computational Finance CD

View demos and recorded presentations led by industry experts.

Now On Demand
Network with industry peers and learn the latest applications of the leading software product for computational finance.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS