SingleStretchCurveBuilder.java

  1. package org.drip.sample.overnight;

  2. import org.drip.analytics.date.*;
  3. import org.drip.function.r1tor1.QuadraticRationalShapeControl;
  4. import org.drip.market.otc.*;
  5. import org.drip.numerical.common.FormatUtil;
  6. import org.drip.param.creator.*;
  7. import org.drip.param.valuation.*;
  8. import org.drip.product.creator.*;
  9. import org.drip.product.definition.CalibratableComponent;
  10. import org.drip.product.rates.*;
  11. import org.drip.service.env.EnvManager;
  12. import org.drip.spline.basis.PolynomialFunctionSetParams;
  13. import org.drip.spline.params.*;
  14. import org.drip.spline.stretch.*;
  15. import org.drip.state.creator.ScenarioDiscountCurveBuilder;
  16. import org.drip.state.discount.*;
  17. import org.drip.state.estimator.LatentStateStretchBuilder;
  18. import org.drip.state.identifier.*;
  19. import org.drip.state.inference.*;

  20. /*
  21.  * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  22.  */

  23. /*!
  24.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  25.  * Copyright (C) 2017 Lakshmi Krishnamurthy
  26.  * Copyright (C) 2016 Lakshmi Krishnamurthy
  27.  * Copyright (C) 2015 Lakshmi Krishnamurthy
  28.  *
  29.  *  This file is part of DRIP, a free-software/open-source library for buy/side financial/trading model
  30.  *      libraries targeting analysts and developers
  31.  *      https://lakshmidrip.github.io/DRIP/
  32.  *  
  33.  *  DRIP is composed of four main libraries:
  34.  *  
  35.  *  - DRIP Fixed Income - https://lakshmidrip.github.io/DRIP-Fixed-Income/
  36.  *  - DRIP Asset Allocation - https://lakshmidrip.github.io/DRIP-Asset-Allocation/
  37.  *  - DRIP Numerical Optimizer - https://lakshmidrip.github.io/DRIP-Numerical-Optimizer/
  38.  *  - DRIP Statistical Learning - https://lakshmidrip.github.io/DRIP-Statistical-Learning/
  39.  *
  40.  *  - DRIP Fixed Income: Library for Instrument/Trading Conventions, Treasury Futures/Options,
  41.  *      Funding/Forward/Overnight Curves, Multi-Curve Construction/Valuation, Collateral Valuation and XVA
  42.  *      Metric Generation, Calibration and Hedge Attributions, Statistical Curve Construction, Bond RV
  43.  *      Metrics, Stochastic Evolution and Option Pricing, Interest Rate Dynamics and Option Pricing, LMM
  44.  *      Extensions/Calibrations/Greeks, Algorithmic Differentiation, and Asset Backed Models and Analytics.
  45.  *
  46.  *  - DRIP Asset Allocation: Library for model libraries for MPT framework, Black Litterman Strategy
  47.  *      Incorporator, Holdings Constraint, and Transaction Costs.
  48.  *
  49.  *  - DRIP Numerical Optimizer: Library for Numerical Optimization and Spline Functionality.
  50.  *
  51.  *  - DRIP Statistical Learning: Library for Statistical Evaluation and Machine Learning.
  52.  *
  53.  *  Licensed under the Apache License, Version 2.0 (the "License");
  54.  *      you may not use this file except in compliance with the License.
  55.  *  
  56.  *  You may obtain a copy of the License at
  57.  *      http://www.apache.org/licenses/LICENSE-2.0
  58.  *  
  59.  *  Unless required by applicable law or agreed to in writing, software
  60.  *      distributed under the License is distributed on an "AS IS" BASIS,
  61.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  62.  *  
  63.  *  See the License for the specific language governing permissions and
  64.  *      limitations under the License.
  65.  */

  66. /**
  67.  * SingleStretchCurveBuilder contains a sample of the construction and usage of the Overnight Curve built
  68.  *  using the Overnight Indexed Swap Product Instruments inside a single stretch. The Tenors/Quotes to
  69.  *  replicate are taken from:
  70.  *
  71.  *  - Ametrano, F., and M. Bianchetti (2013): Everything You Always Wanted to Know About Multiple Interest
  72.  *      Rate Curve Bootstrapping but Were Afraid to Ask,
  73.  *          http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2219548
  74.  *
  75.  * @author Lakshmi Krishnamurthy
  76.  */

  77. public class SingleStretchCurveBuilder {

  78.     private static final FixFloatComponent OTCOISFixFloat (
  79.         final JulianDate dtSpot,
  80.         final String strCurrency,
  81.         final String strMaturityTenor,
  82.         final double dblCoupon)
  83.     {
  84.         FixedFloatSwapConvention ffConv = OvernightFixedFloatContainer.FundConventionFromJurisdiction (
  85.             strCurrency
  86.         );

  87.         return ffConv.createFixFloatComponent (
  88.             dtSpot,
  89.             strMaturityTenor,
  90.             dblCoupon,
  91.             0.,
  92.             1.
  93.         );
  94.     }

  95.     /*
  96.      * Construct the Array of Deposit Instruments from the given set of parameters
  97.      *
  98.      *      USE WITH CARE: This sample ignores errors and does not handle exceptions.
  99.      */

  100.     private static final SingleStreamComponent[] DepositInstrumentsFromMaturityDays (
  101.         final JulianDate dtEffective,
  102.         final String strCurrency,
  103.         final int[] aiDay)
  104.         throws Exception
  105.     {
  106.         SingleStreamComponent[] aDeposit = new SingleStreamComponent[aiDay.length];

  107.         for (int i = 0; i < aiDay.length; ++i)
  108.             aDeposit[i] = SingleStreamComponentBuilder.Deposit (
  109.                 dtEffective,
  110.                 dtEffective.addBusDays (
  111.                     aiDay[i],
  112.                     strCurrency
  113.                 ),
  114.                 OvernightLabel.Create (
  115.                     strCurrency
  116.                 )
  117.             );

  118.         return aDeposit;
  119.     }

  120.     /*
  121.      * Construct the Array of Overnight Index Instruments from the given set of parameters
  122.      *
  123.      *      USE WITH CARE: This sample ignores errors and does not handle exceptions.
  124.      */

  125.     private static final FixFloatComponent[] OISFromMaturityTenor (
  126.         final JulianDate dtSpot,
  127.         final String strCurrency,
  128.         final String[] astrMaturityTenor,
  129.         final double[] adblCoupon)
  130.         throws Exception
  131.     {
  132.         FixFloatComponent[] aOIS = new FixFloatComponent[astrMaturityTenor.length];

  133.         for (int i = 0; i < astrMaturityTenor.length; ++i)
  134.             aOIS[i] = OTCOISFixFloat (
  135.                 dtSpot,
  136.                 strCurrency,
  137.                 astrMaturityTenor[i],
  138.                 adblCoupon[i]
  139.             );

  140.         return aOIS;
  141.     }

  142.     private static final FixFloatComponent[] OISFuturesFromMaturityTenor (
  143.         final JulianDate dtSpot,
  144.         final String strCurrency,
  145.         final String[] astrStartTenor,
  146.         final String[] astrMaturityTenor,
  147.         final double[] adblCoupon)
  148.         throws Exception
  149.     {
  150.         FixFloatComponent[] aOISFutures = new FixFloatComponent[astrMaturityTenor.length];

  151.         for (int i = 0; i < astrMaturityTenor.length; ++i)
  152.             aOISFutures[i] = OTCOISFixFloat (
  153.                 dtSpot.addTenor (astrStartTenor[i]),
  154.                 strCurrency,
  155.                 astrMaturityTenor[i],
  156.                 adblCoupon[i]
  157.             );

  158.         return aOISFutures;
  159.     }

  160.     private static final CalibratableComponent[] MergeComp (
  161.         final CalibratableComponent[] aDepositComp,
  162.         final CalibratableComponent[] aShortEndOISComp,
  163.         final CalibratableComponent[] aOISFutureComp,
  164.         final CalibratableComponent[] aLongEndOISComp)
  165.         throws Exception
  166.     {
  167.         CalibratableComponent[] aComp = new CalibratableComponent[aDepositComp.length + aShortEndOISComp.length + aOISFutureComp.length + aLongEndOISComp.length];

  168.         for (int i = 0; i < aComp.length; ++i) {
  169.             if (i < aDepositComp.length)
  170.                 aComp[i] = aDepositComp[i];
  171.             else if (i < aDepositComp.length + aShortEndOISComp.length)
  172.                 aComp[i] = aShortEndOISComp[i - aDepositComp.length];
  173.             else if (i < aDepositComp.length + aShortEndOISComp.length + aOISFutureComp.length)
  174.                 aComp[i] = aOISFutureComp[i - aDepositComp.length - aShortEndOISComp.length];
  175.             else
  176.                 aComp[i] = aLongEndOISComp[i - aDepositComp.length - aShortEndOISComp.length - aOISFutureComp.length];
  177.         }

  178.         return aComp;
  179.     }

  180.     private static final String[] MergeMeasures (
  181.         final String[] astrDepositMeasure,
  182.         final String[] astrShortEndOISMeasure,
  183.         final String[] astrOISFutureMeasure,
  184.         final String[] astrLongEndOISMeasure)
  185.         throws Exception
  186.     {
  187.         String[] astrMeasure = new String[astrDepositMeasure.length + astrShortEndOISMeasure.length + astrOISFutureMeasure.length + astrLongEndOISMeasure.length];

  188.         for (int i = 0; i < astrMeasure.length; ++i) {
  189.             if (i < astrDepositMeasure.length)
  190.                 astrMeasure[i] = astrDepositMeasure[i];
  191.             else if (i < astrDepositMeasure.length + astrShortEndOISMeasure.length)
  192.                 astrMeasure[i] = astrShortEndOISMeasure[i - astrDepositMeasure.length];
  193.             else if (i < astrDepositMeasure.length + astrShortEndOISMeasure.length + astrOISFutureMeasure.length)
  194.                 astrMeasure[i] = astrOISFutureMeasure[i - astrDepositMeasure.length - astrShortEndOISMeasure.length];
  195.             else
  196.                 astrMeasure[i] = astrLongEndOISMeasure[i - astrDepositMeasure.length - astrShortEndOISMeasure.length - astrOISFutureMeasure.length];
  197.         }

  198.         return astrMeasure;
  199.     }

  200.     private static final double[] MergeQuotes (
  201.         final double[] adblDepositQuote,
  202.         final double[] adblShortEndOISQuote,
  203.         final double[] adblOISFutureQuote,
  204.         final double[] adblLongEndOISQuote)
  205.         throws Exception
  206.     {
  207.         double[] adblQuote = new double[adblDepositQuote.length + adblShortEndOISQuote.length + adblOISFutureQuote.length + adblLongEndOISQuote.length];

  208.         for (int i = 0; i < adblQuote.length; ++i) {
  209.             if (i < adblDepositQuote.length)
  210.                 adblQuote[i] = adblDepositQuote[i];
  211.             else if (i < adblDepositQuote.length + adblShortEndOISQuote.length)
  212.                 adblQuote[i] = adblShortEndOISQuote[i - adblDepositQuote.length];
  213.             else if (i < adblDepositQuote.length + adblShortEndOISQuote.length + adblOISFutureQuote.length)
  214.                 adblQuote[i] = adblOISFutureQuote[i - adblDepositQuote.length - adblShortEndOISQuote.length];
  215.             else
  216.                 adblQuote[i] = adblLongEndOISQuote[i - adblDepositQuote.length - adblShortEndOISQuote.length - adblOISFutureQuote.length];
  217.         }

  218.         return adblQuote;
  219.     }

  220.     /*
  221.      * Construct the Array of Overnight Index Future Instruments from the given set of parameters
  222.      *
  223.      *      USE WITH CARE: This sample ignores errors and does not handle exceptions.
  224.      */

  225.     private static final void CustomOISCurveBuilderSample (
  226.         final JulianDate dtSpot,
  227.         final String strCurrency,
  228.         final String strHeaderComment)
  229.         throws Exception
  230.     {
  231.         System.out.println ("\n\t----------------------------------------------------------------");

  232.         System.out.println ("\t     " + strHeaderComment);

  233.         System.out.println ("\t----------------------------------------------------------------");

  234.         /*
  235.          * Construct the Array of Deposit Instruments and their Quotes from the given set of parameters
  236.          */

  237.         SingleStreamComponent[] aDepositComp = DepositInstrumentsFromMaturityDays (
  238.             dtSpot,
  239.             strCurrency,
  240.             new int[] {
  241.                 1, 2, 3
  242.             }
  243.         );

  244.         double[] adblDepositQuote = new double[] {
  245.             0.0004, 0.0004, 0.0004       // Deposit
  246.         };

  247.         String[] astrDepositMeasure = new String[] {
  248.             "Rate", "Rate", "Rate"       // Deposit
  249.         };

  250.         /*
  251.          * Construct the Array of Short End OIS Instruments and their Quotes from the given set of parameters
  252.          */

  253.         double[] adblShortEndOISQuote = new double[] {
  254.             0.00070,    //   1W
  255.             0.00069,    //   2W
  256.             0.00078,    //   3W
  257.             0.00074     //   1M
  258.         };

  259.         CalibratableComponent[] aShortEndOISComp = OISFromMaturityTenor (
  260.             dtSpot,
  261.             strCurrency,
  262.             new java.lang.String[] {
  263.                 "1W", "2W", "3W", "1M"
  264.             },
  265.             adblShortEndOISQuote
  266.         );

  267.         String[] astrShortEndOISMeasure = new String[] {
  268.             "SwapRate",    //   1W
  269.             "SwapRate",    //   2W
  270.             "SwapRate",    //   3W
  271.             "SwapRate"     //   1M
  272.         };

  273.         /*
  274.          * Construct the Array of OIS Futures Instruments and their Quotes from the given set of parameters
  275.          */

  276.         double[] adblOISFutureQuote = new double[] {
  277.              0.00046,    //   1M x 1M
  278.              0.00016,    //   2M x 1M
  279.             -0.00007,    //   3M x 1M
  280.             -0.00013,    //   4M x 1M
  281.             -0.00014     //   5M x 1M
  282.         };

  283.         CalibratableComponent[] aOISFutureComp = OISFuturesFromMaturityTenor (
  284.             dtSpot,
  285.             strCurrency,
  286.             new java.lang.String[] {
  287.                 "1M", "2M", "3M", "4M", "5M"
  288.             },
  289.             new java.lang.String[] {
  290.                 "1M", "1M", "1M", "1M", "1M"
  291.             },
  292.             adblOISFutureQuote
  293.         );

  294.         String[] astrOISFutureMeasure = new String[] {
  295.             "SwapRate",    //   1M
  296.             "SwapRate",    //   2M
  297.             "SwapRate",    //   3M
  298.             "SwapRate",    //   4M
  299.             "SwapRate"     //   5M
  300.         };

  301.         /*
  302.          * Construct the Array of Long End OIS Instruments and their Quotes from the given set of parameters
  303.          */

  304.         double[] adblLongEndOISQuote = new double[] {
  305.             0.00002,    //  15M
  306.             0.00008,    //  18M
  307.             0.00021,    //  21M
  308.             0.00036,    //   2Y
  309.             0.00127,    //   3Y
  310.             0.00274,    //   4Y
  311.             0.00456,    //   5Y
  312.             0.00647,    //   6Y
  313.             0.00827,    //   7Y
  314.             0.00996,    //   8Y
  315.             0.01147,    //   9Y
  316.             0.01280,    //  10Y
  317.             0.01404,    //  11Y
  318.             0.01516,    //  12Y
  319.             0.01764,    //  15Y
  320.             0.01939,    //  20Y
  321.             0.02003,    //  25Y
  322.             0.02038     //  30Y
  323.         };

  324.         String[] astrLongEndOISMeasure = new String[] {
  325.             "SwapRate",    //  15M
  326.             "SwapRate",    //  18M
  327.             "SwapRate",    //  21M
  328.             "SwapRate",    //   2Y
  329.             "SwapRate",    //   3Y
  330.             "SwapRate",    //   4Y
  331.             "SwapRate",    //   5Y
  332.             "SwapRate",    //   6Y
  333.             "SwapRate",    //   7Y
  334.             "SwapRate",    //   8Y
  335.             "SwapRate",    //   9Y
  336.             "SwapRate",    //  10Y
  337.             "SwapRate",    //  11Y
  338.             "SwapRate",    //  12Y
  339.             "SwapRate",    //  15Y
  340.             "SwapRate",    //  20Y
  341.             "SwapRate",    //  25Y
  342.             "SwapRate"     //  30Y
  343.         };

  344.         CalibratableComponent[] aLongEndOISComp = OISFromMaturityTenor (
  345.             dtSpot,
  346.             strCurrency,
  347.             new java.lang.String[] {
  348.                 "15M",
  349.                 "18M",
  350.                 "21M",
  351.                 "2Y",
  352.                 "3Y",
  353.                 "4Y",
  354.                 "5Y",
  355.                 "6Y",
  356.                 "7Y",
  357.                 "8Y",
  358.                 "9Y",
  359.                 "10Y",
  360.                 "11Y",
  361.                 "12Y",
  362.                 "15Y",
  363.                 "20Y",
  364.                 "25Y",
  365.                 "30Y"
  366.             },
  367.             adblLongEndOISQuote
  368.         );

  369.         LatentStateStretchSpec oisSingleStretch = LatentStateStretchBuilder.ForwardFundingStretchSpec (
  370.             "OIS_SINGLE_STRETCH",
  371.             MergeComp (
  372.                 aDepositComp,
  373.                 aShortEndOISComp,
  374.                 aOISFutureComp,aLongEndOISComp
  375.             ),
  376.             MergeMeasures (
  377.                 astrDepositMeasure,
  378.                 astrShortEndOISMeasure,
  379.                 astrOISFutureMeasure,
  380.                 astrLongEndOISMeasure
  381.             ),
  382.             MergeQuotes (
  383.                 adblDepositQuote,
  384.                 adblShortEndOISQuote,
  385.                 adblOISFutureQuote,
  386.                 adblLongEndOISQuote
  387.             )
  388.         );

  389.         LatentStateStretchSpec[] aStretchSpec = new LatentStateStretchSpec[] {
  390.             oisSingleStretch
  391.         };

  392.         /*
  393.          * Set up the Linear Curve Calibrator using the following parameters:
  394.          *  - Cubic Exponential Mixture Basis Spline Set
  395.          *  - Ck = 2, Segment Curvature Penalty = 2
  396.          *  - Quadratic Rational Shape Controller
  397.          *  - Natural Boundary Setting
  398.          */

  399.         LinearLatentStateCalibrator lcc = new LinearLatentStateCalibrator (
  400.             new SegmentCustomBuilderControl (
  401.                 MultiSegmentSequenceBuilder.BASIS_SPLINE_POLYNOMIAL,
  402.                 new PolynomialFunctionSetParams (4),
  403.                 SegmentInelasticDesignControl.Create (
  404.                     2,
  405.                     2
  406.                 ),
  407.                 new ResponseScalingShapeControl (
  408.                     true,
  409.                     new QuadraticRationalShapeControl (0.)
  410.                 ),
  411.                 null
  412.             ),
  413.             BoundarySettings.NaturalStandard(),
  414.             MultiSegmentSequence.CALIBRATE,
  415.             null,
  416.             null
  417.         );

  418.         /*
  419.          * Construct the Shape Preserving Discount Curve by applying the linear curve calibrator to the array
  420.          *  of Deposit and Swap Stretches.
  421.          */

  422.         ValuationParams valParams = new ValuationParams (
  423.             dtSpot,
  424.             dtSpot,
  425.             strCurrency
  426.         );

  427.         MergedDiscountForwardCurve dc = ScenarioDiscountCurveBuilder.ShapePreservingDFBuild (
  428.             strCurrency,
  429.             lcc,
  430.             aStretchSpec,
  431.             valParams,
  432.             null,
  433.             null,
  434.             null,
  435.             1.
  436.         );

  437.         /*
  438.          * Cross-Comparison of the Deposit Calibration Instrument "Rate" metric across the different curve
  439.          *  construction methodologies.
  440.          */

  441.         System.out.println ("\t----------------------------------------------------------------");

  442.         System.out.println ("\t     DEPOSIT INSTRUMENTS CALIBRATION RECOVERY");

  443.         System.out.println ("\t----------------------------------------------------------------");

  444.         for (int i = 0; i < aDepositComp.length; ++i)
  445.             System.out.println ("\t[" + aDepositComp[i].effectiveDate() + " => " + aDepositComp[i].maturityDate() + "] = " +
  446.                 FormatUtil.FormatDouble (aDepositComp[i].measureValue (valParams, null,
  447.                     MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  448.                         null, "Rate"), 1, 6, 1.) + " | " + FormatUtil.FormatDouble (adblDepositQuote[i], 1, 6, 1.));

  449.         /*
  450.          * Cross-Comparison of the Short End OIS Calibration Instrument "Rate" metric across the different curve
  451.          *  construction methodologies.
  452.          */

  453.         System.out.println ("\n\t----------------------------------------------------------------");

  454.         System.out.println ("\t     OIS SHORT END INSTRUMENTS CALIBRATION RECOVERY");

  455.         System.out.println ("\t----------------------------------------------------------------");

  456.         for (int i = 0; i < aShortEndOISComp.length; ++i)
  457.             System.out.println ("\t[" + aShortEndOISComp[i].effectiveDate() + " => " + aShortEndOISComp[i].maturityDate() + "] = " +
  458.                 FormatUtil.FormatDouble (aShortEndOISComp[i].measureValue (valParams, null,
  459.                     MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  460.                         null, "CalibSwapRate"), 1, 6, 1.) + " | " + FormatUtil.FormatDouble (adblShortEndOISQuote[i], 1, 6, 1.) + " | " +
  461.                             FormatUtil.FormatDouble (aShortEndOISComp[i].measureValue (valParams, null,
  462.                                 MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  463.                                     null, "FairPremium"), 1, 6, 1.));

  464.         /*
  465.          * Cross-Comparison of the OIS Future Calibration Instrument "Rate" metric across the different curve
  466.          *  construction methodologies.
  467.          */

  468.         System.out.println ("\n\t----------------------------------------------------------------");

  469.         System.out.println ("\t     OIS FUTURE INSTRUMENTS CALIBRATION RECOVERY");

  470.         System.out.println ("\t----------------------------------------------------------------");

  471.         for (int i = 0; i < aOISFutureComp.length; ++i)
  472.             System.out.println ("\t[" + aOISFutureComp[i].effectiveDate() + " => " + aOISFutureComp[i].maturityDate() + "] = " +
  473.                 FormatUtil.FormatDouble (aOISFutureComp[i].measureValue (valParams, null,
  474.                     MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  475.                         null, "SwapRate"), 1, 6, 1.) + " | " + FormatUtil.FormatDouble (adblOISFutureQuote[i], 1, 6, 1.) + " | " +
  476.                             FormatUtil.FormatDouble (aOISFutureComp[i].measureValue (valParams, null,
  477.                                 MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  478.                                     null, "FairPremium"), 1, 6, 1.));

  479.         /*
  480.          * Cross-Comparison of the Long End OIS Calibration Instrument "Rate" metric across the different curve
  481.          *  construction methodologies.
  482.          */

  483.         System.out.println ("\n\t----------------------------------------------------------------");

  484.         System.out.println ("\t     OIS LONG END INSTRUMENTS CALIBRATION RECOVERY");

  485.         System.out.println ("\t----------------------------------------------------------------");

  486.         for (int i = 0; i < aLongEndOISComp.length; ++i)
  487.             System.out.println ("\t[" + aLongEndOISComp[i].effectiveDate() + " => " + aLongEndOISComp[i].maturityDate() + "] = " +
  488.                 FormatUtil.FormatDouble (aLongEndOISComp[i].measureValue (valParams, null,
  489.                     MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  490.                         null, "CalibSwapRate"), 1, 6, 1.) + " | " + FormatUtil.FormatDouble (adblLongEndOISQuote[i], 1, 6, 1.) + " | " +
  491.                             FormatUtil.FormatDouble (aLongEndOISComp[i].measureValue (valParams, null,
  492.                                 MarketParamsBuilder.Create (dc, null, null, null, null, null, null),
  493.                                     null, "FairPremium"), 1, 6, 1.));
  494.     }

  495.     public static final void main (
  496.         final String[] astrArgs)
  497.         throws Exception
  498.     {
  499.         /*
  500.          * Initialize the Credit Analytics Library
  501.          */

  502.         EnvManager.InitEnv ("");

  503.         String strCurrency = "EUR";

  504.         JulianDate dtToday = DateUtil.CreateFromYMD (
  505.             2012,
  506.             DateUtil.DECEMBER,
  507.             11
  508.         );

  509.         CustomOISCurveBuilderSample (
  510.             dtToday,
  511.             strCurrency,
  512.             "OVERNIGHT INDEX RUN RECONCILIATION"
  513.         );
  514.     }
  515. }