001/*
002 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
003 *
004 * Based in London, we are world leaders in the design and development
005 * of bespoke applications for the securities financing markets.
006 *
007 * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a>
008 *           ___  _     _           _   _          _
009 *          / _ \| |__ (_) ___  ___| |_| |    __ _| |__
010 *         | | | | '_ \| |/ _ \/ __| __| |   / _` | '_ \
011 *         | |_| | |_) | |  __/ (__| |_| |__| (_| | |_) |
012 *          \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
013 *                   |__/
014 *
015 *                     www.ObjectLab.co.uk
016 *
017 * $Id$
018 *
019 * Copyright 2006 the original author or authors.
020 *
021 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
022 * use this file except in compliance with the License. You may obtain a copy of
023 * the License at
024 *
025 * http://www.apache.org/licenses/LICENSE-2.0
026 *
027 * Unless required by applicable law or agreed to in writing, software
028 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
029 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
030 * License for the specific language governing permissions and limitations under
031 * the License.
032 */
033package net.objectlab.kit.datecalc.common;
034
035/**
036 * Defines some standard Day Count bases.
037 *
038 * To read about the most common Day Count Conventions, you can refer to the
039 * <a href="http://www.fincad.com/support/developerfunc/mathref/Daycount.htm">
040 * following document</a> or <a href="https://en.wikipedia.org/wiki/Day_count_convention">here</a>.
041 *
042 * @author Benoit Xhenseval
043 */
044public enum PeriodCountBasis {
045    /**
046     * 30/360, means that day count fractions are calculated assuming 30 day
047     * months and 360 days in a year. The second date is only adjusted if the
048     * first date is on the 31st of a month.
049     */
050    CONV_30_360,
051
052    /**
053     * 30E/360, means that day count fractions are calculated assuming 30 day
054     * months and 360 days in a year. In this case, the second date is always
055     * adjusted to the 30th, if it is the 31st.
056     */
057    CONV_360E_ISDA,
058
059    /**
060     * 30E+/360, means that day count fractions are calculated assuming 30 day
061     * months and 360 days in a year. If the second date is on the 31st, it is
062     * adjusted to the 30th and a second month is incremented by one.
063     */
064    CONV_360E_ISMA,
065
066    // -----------------------------------------------------------------------
067    //
068    // ObjectLab, world leaders in the design and development of bespoke
069    // applications for the securities financing markets.
070    // www.ObjectLab.co.uk
071    //
072    // -----------------------------------------------------------------------
073
074    /**
075     * Actual/Actual, means that the numerator is the number of days between the
076     * two dates. The denominator is the actual number of days in the coupon
077     * period multiplied by the coupon frequency. This is mainly relates to
078     * bonds. This normally results in day count factors of 1.0 for annual
079     * coupons, 0.5 for semi annual coupons and 0.25 for quarterly coupons.
080     */
081    ACT_ACT,
082
083    /**
084     * Actual/360, known in the United States as money market basis, has a day
085     * count fraction equal to the number of days between the payment dates,
086     * divided by 360.
087     */
088    ACT_360,
089
090    /**
091     * Actual/365(Fixed), known as bond basis in the United States, means that
092     * the day count fraction is equal to the number of days between the last
093     * payment date and the next date divided by 365.
094     */
095    ACT_365
096}
097
098/*
099 * ObjectLab, http://www.objectlab.co.uk/open is sponsoring the ObjectLab Kit.
100 *
101 * Based in London, we are world leaders in the design and development
102 * of bespoke applications for the securities financing markets.
103 *
104 * <a href="http://www.objectlab.co.uk/open">Click here to learn more about us</a>
105 *           ___  _     _           _   _          _
106 *          / _ \| |__ (_) ___  ___| |_| |    __ _| |__
107 *         | | | | '_ \| |/ _ \/ __| __| |   / _` | '_ \
108 *         | |_| | |_) | |  __/ (__| |_| |__| (_| | |_) |
109 *          \___/|_.__// |\___|\___|\__|_____\__,_|_.__/
110 *                   |__/
111 *
112 *                     www.ObjectLab.co.uk
113 */