Caplin Trader 5.1.0

Class: module:ct-fx/testing/BusinessDateGenerator

module:ct-fx/testing/BusinessDateGenerator()

new module:ct-fx/testing/BusinessDateGenerator()

Constructs a BusinessDateGenerator.

The BusinessDateGenerator serves to create settlement dates and calendars.

Methods

getSettlementCalendar(startDate, days) → {Array}

Retrieves an array of formatted dates.

Parameters:
Name Type Description
startDate Date

The date to start from.

days Int

The number of days to create.

Returns:

Array of formatted dates.

Type
Array

getSettlementDates(startDate) → {Map}

Returns a map of settlement dates.

Parameters:
Name Type Description
startDate Date

The date to start from.

Returns:

The settlement dates. Keys are tenors and values are the corresponding date.

Type
Map