Caplin Trader 4.7.1

Class: module:caplin/fx/testing/BusinessDateGenerator

module:caplin/fx/testing/BusinessDateGenerator

Constructor

new module:caplin/fx/testing/BusinessDateGenerator()

Constructs a caplin.fx.testing.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