Modular, flexible, open trade processing for interest rate, fx, credit and equity derivatives. The datemath module provides implementations of ten different day count fraction calculations, sophisticated schedule generation, holiday calendars, date offset and date adjustment. The trade module provides models of derivative and exchange trades with a common API for creating and handling the details of the trade schedule.