finMath.net

Daycounting and Swap Leg Schedule Generation

Methodology

The Java package net.finmath.time.daycount provides a bunch of day count conventions used in interest rate products.

The Java package net.finmath.time provides a swap leg schedule generator and schedules and periods.

Spreadsheet

The spreadsheets are given in Excel (xls) and OpenOffice (ods) format.

In order to run the spreadsheet you have to install the Java Object Handler for Spreadsheets, "Obba".

Day Count Fractions.zip
Day Count Fractions (see package net.finmath.time.daycount).

The sheet tests several day count conventions against its native spreadsheet implementation using the YEARFRAC function.

Swap Leg Schedule.zip
Swap Leg Schedule (see package net.finmath.time).

The generates a swap leg schedule, i.e., a sequence of periods with period start date, period end date, fixing date, payment date and period day count fractions, from given meta date, like spot, frequency, date roll convention, holiday calendars, day count convetions.

Source Code

Source code is available from the finmath lib repository, see http://www.finmath.net/finmath-lib.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.