ABSTRACT

This chapter implements a simple Visual Basic for Applications (VBA) program that can generate regular payment dates of an interest rate swap according to a business calendar. It shows the interface of the payment schedule generator. When a payment date falls on a holiday or weekend according to a specified business calendar, we need to adjust the payment date forward or backward in time, such that it falls on a business day in the same business calendar. The chapter implements the business calendar of the United States. A business day convention refers to a convention for adjusting any payment date that falls on a nonbusiness day (e.g., holidays or weekends). The chapter splits VBA code into three modules: MInterface, MDate, and MHoliday. The module MInterface contains VBA code for the button. The module MDate contains VBA code for manipulating dates. The module MHoliday contains code for handling business calendars and generating payment date schedules.