BondRefDataBuilder.java

  1. package org.drip.product.creator;

  2. /*
  3.  * -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  4.  */

  5. /*!
  6.  * Copyright (C) 2020 Lakshmi Krishnamurthy
  7.  * Copyright (C) 2019 Lakshmi Krishnamurthy
  8.  * Copyright (C) 2018 Lakshmi Krishnamurthy
  9.  * Copyright (C) 2017 Lakshmi Krishnamurthy
  10.  * Copyright (C) 2016 Lakshmi Krishnamurthy
  11.  * Copyright (C) 2015 Lakshmi Krishnamurthy
  12.  * Copyright (C) 2014 Lakshmi Krishnamurthy
  13.  * Copyright (C) 2013 Lakshmi Krishnamurthy
  14.  * Copyright (C) 2012 Lakshmi Krishnamurthy
  15.  * Copyright (C) 2011 Lakshmi Krishnamurthy
  16.  *
  17.  *  This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
  18.  *      asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment
  19.  *      analytics, and portfolio construction analytics within and across fixed income, credit, commodity,
  20.  *      equity, FX, and structured products. It also includes auxiliary libraries for algorithm support,
  21.  *      numerical analysis, numerical optimization, spline builder, model validation, statistical learning,
  22.  *      and computational support.
  23.  *  
  24.  *      https://lakshmidrip.github.io/DROP/
  25.  *  
  26.  *  DROP is composed of three modules:
  27.  *  
  28.  *  - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/
  29.  *  - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
  30.  *  - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/
  31.  *
  32.  *  DROP Product Core implements libraries for the following:
  33.  *  - Fixed Income Analytics
  34.  *  - Loan Analytics
  35.  *  - Transaction Cost Analytics
  36.  *
  37.  *  DROP Portfolio Core implements libraries for the following:
  38.  *  - Asset Allocation Analytics
  39.  *  - Asset Liability Management Analytics
  40.  *  - Capital Estimation Analytics
  41.  *  - Exposure Analytics
  42.  *  - Margin Analytics
  43.  *  - XVA Analytics
  44.  *
  45.  *  DROP Computational Core implements libraries for the following:
  46.  *  - Algorithm Support
  47.  *  - Computation Support
  48.  *  - Function Analysis
  49.  *  - Model Validation
  50.  *  - Numerical Analysis
  51.  *  - Numerical Optimizer
  52.  *  - Spline Builder
  53.  *  - Statistical Learning
  54.  *
  55.  *  Documentation for DROP is Spread Over:
  56.  *
  57.  *  - Main                     => https://lakshmidrip.github.io/DROP/
  58.  *  - Wiki                     => https://github.com/lakshmiDRIP/DROP/wiki
  59.  *  - GitHub                   => https://github.com/lakshmiDRIP/DROP
  60.  *  - Repo Layout Taxonomy     => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
  61.  *  - Javadoc                  => https://lakshmidrip.github.io/DROP/Javadoc/index.html
  62.  *  - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
  63.  *  - Release Versions         => https://lakshmidrip.github.io/DROP/version.html
  64.  *  - Community Credits        => https://lakshmidrip.github.io/DROP/credits.html
  65.  *  - Issues Catalog           => https://github.com/lakshmiDRIP/DROP/issues
  66.  *  - JUnit                    => https://lakshmidrip.github.io/DROP/junit/index.html
  67.  *  - Jacoco                   => https://lakshmidrip.github.io/DROP/jacoco/index.html
  68.  *
  69.  *  Licensed under the Apache License, Version 2.0 (the "License");
  70.  *      you may not use this file except in compliance with the License.
  71.  *  
  72.  *  You may obtain a copy of the License at
  73.  *      http://www.apache.org/licenses/LICENSE-2.0
  74.  *  
  75.  *  Unless required by applicable law or agreed to in writing, software
  76.  *      distributed under the License is distributed on an "AS IS" BASIS,
  77.  *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  78.  *  
  79.  *  See the License for the specific language governing permissions and
  80.  *      limitations under the License.
  81.  */

  82. /**
  83.  * <i>BondRefDataBuilder</i> holds the entire set of static parameters for the bond product. In particular,
  84.  * it contains the bond identifier parameters (ISIN, CUSIP, BBG ID, name short name), the issuer level
  85.  * parameters (Ticker, category, industry, issue type, issuer country, issuer country code, collateral type,
  86.  * description, security type, unique Bloomberg ID, long company name, issuer name, SPN or the credit curve
  87.  * string), issue parameters (issue amount, issue price, outstanding amount, minimum piece, minimum
  88.  * increment, par amount, lead manager, exchange code, country of incorporation, country of guarantor,
  89.  * country of domicile, industry sector, industry group, industry sub-group, senior/sub), coupon parameters
  90.  * (coupon rate, coupon frequency, coupon type, day count), maturity parameters (maturity date, maturity
  91.  * type, final maturity, redemption value), date parameters (announce, first settle, first coupon, interest
  92.  * accrual start, next coupon, previous coupon, penultimate coupon, and issue dates), embedded option
  93.  * parameters (callable, putable, has been exercised), currency parameters (trade, coupon, and redemption
  94.  * currencies), floater parameters (floater flag, floating coupon convention, current coupon, rate index,
  95.  * spread), trade status, ratings (SnP, Moody, and Fitch), and whether the bond is private placement, is
  96.  * registered, is a bearer bond, is reverse convertible, is a structured note, can be unit traded, is
  97.  * perpetual or has defaulted.
  98.  *
  99.  *  <br><br>
  100.  *  <ul>
  101.  *      <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ProductCore.md">Product Core Module</a></li>
  102.  *      <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FixedIncomeAnalyticsLibrary.md">Fixed Income Analytics</a></li>
  103.  *      <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/product/README.md">Product Components/Baskets for Credit, FRA, FX, Govvie, Rates, and Option AssetClasses</a></li>
  104.  *      <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/product/creator/README.md">Streams and Products Construction Utilities</a></li>
  105.  *  </ul>
  106.  * <br><br>
  107.  *
  108.  * @author Lakshmi Krishnamurthy
  109.  */

  110. public class BondRefDataBuilder implements org.drip.product.params.Validatable {
  111.     private static final boolean m_bBlog = false;
  112.     private static final boolean m_bDisplayWarnings = true;

  113.     /**
  114.      * ISIN
  115.      */

  116.     public java.lang.String _strISIN = "";

  117.     /**
  118.      * CUSIP
  119.      */

  120.     public java.lang.String _strCUSIP = "";

  121.     /**
  122.      * Bloomberg ID
  123.      */

  124.     public java.lang.String _strBBGID = "";

  125.     /**
  126.      * Issuer Category
  127.      */

  128.     public java.lang.String _strIssuerCategory = "";

  129.     /**
  130.      * Ticker
  131.      */

  132.     public java.lang.String _strTicker = "";

  133.     /**
  134.      * Series
  135.      */

  136.     public java.lang.String _strSeries = "";

  137.     /**
  138.      * Name
  139.      */

  140.     public java.lang.String _strName = "";

  141.     /**
  142.      * Short Name
  143.      */

  144.     public java.lang.String _strShortName = "";

  145.     /**
  146.      * Issuer Industry
  147.      */

  148.     public java.lang.String _strIssuerIndustry = "";

  149.     /**
  150.      * Coupon Type
  151.      */

  152.     public java.lang.String _strCouponType = "";

  153.     /**
  154.      * Maturity Type
  155.      */

  156.     public java.lang.String _strMaturityType = "";

  157.     /**
  158.      * Calculation Type
  159.      */

  160.     public java.lang.String _strCalculationType = "";

  161.     /**
  162.      * Day Count Code
  163.      */

  164.     public java.lang.String _strDayCountCode = "";

  165.     /**
  166.      * Market Issue Type
  167.      */

  168.     public java.lang.String _strMarketIssueType = "";

  169.     /**
  170.      * Issue Country Code
  171.      */

  172.     public java.lang.String _strIssueCountryCode = "";

  173.     /**
  174.      * Issue Country
  175.      */

  176.     public java.lang.String _strIssueCountry = "";

  177.     /**
  178.      * Collateral Type
  179.      */

  180.     public java.lang.String _strCollateralType = "";

  181.     /**
  182.      * Issue Amount
  183.      */

  184.     public double _dblIssueAmount = java.lang.Double.NaN;

  185.     /**
  186.      * Outstanding Amount
  187.      */

  188.     public double _dblOutstandingAmount = java.lang.Double.NaN;

  189.     /**
  190.      * Minimum Piece
  191.      */

  192.     public double _dblMinimumPiece = java.lang.Double.NaN;

  193.     /**
  194.      * Minimum Increment
  195.      */

  196.     public double _dblMinimumIncrement = java.lang.Double.NaN;

  197.     /**
  198.      * Par Amount
  199.      */

  200.     public double _dblParAmount = java.lang.Double.NaN;

  201.     /**
  202.      * Lead Manager
  203.      */

  204.     public java.lang.String _strLeadManager = "";

  205.     /**
  206.      * Exchange Code
  207.      */

  208.     public java.lang.String _strExchangeCode = "";

  209.     /**
  210.      * Redemption Value
  211.      */

  212.     public double _dblRedemptionValue = java.lang.Double.NaN;

  213.     /**
  214.      * Announce Date
  215.      */

  216.     public org.drip.analytics.date.JulianDate _dtAnnounce = null;

  217.     /**
  218.      * First Settle Date
  219.      */

  220.     public org.drip.analytics.date.JulianDate _dtFirstSettle = null;

  221.     /**
  222.      * First Coupon Date
  223.      */

  224.     public org.drip.analytics.date.JulianDate _dtFirstCoupon = null;

  225.     /**
  226.      * Interest Accrual Start Date
  227.      */

  228.     public org.drip.analytics.date.JulianDate _dtInterestAccrualStart = null;

  229.     /**
  230.      * Issue Date
  231.      */

  232.     public org.drip.analytics.date.JulianDate _dtIssue = null;

  233.     /**
  234.      * Next Coupon Date
  235.      */

  236.     public org.drip.analytics.date.JulianDate _dtNextCouponDate = null;

  237.     /**
  238.      * Callable flag
  239.      */

  240.     public boolean _bIsCallable = false;

  241.     /**
  242.      * Putable flag
  243.      */

  244.     public boolean _bIsPutable = false;

  245.     /**
  246.      * Sinkable flag
  247.      */

  248.     public boolean _bIsSinkable = false;

  249.     /**
  250.      * Bloomberg Parent
  251.      */

  252.     public java.lang.String _strBBGParent = "";

  253.     /**
  254.      * Country of Incorporation
  255.      */

  256.     public java.lang.String _strCountryOfIncorporation = "";

  257.     /**
  258.      * Industry Sector
  259.      */

  260.     public java.lang.String _strIndustrySector = "";

  261.     /**
  262.      * Industry Group
  263.      */

  264.     public java.lang.String _strIndustryGroup = "";

  265.     /**
  266.      * Industry Sub Group
  267.      */

  268.     public java.lang.String _strIndustrySubgroup = "";

  269.     /**
  270.      * Country of Guarantor
  271.      */

  272.     public java.lang.String _strCountryOfGuarantor = "";

  273.     /**
  274.      * Country of Domicile
  275.      */

  276.     public java.lang.String _strCountryOfDomicile = "";

  277.     /**
  278.      * Description
  279.      */

  280.     public java.lang.String _strDescription = "";

  281.     /**
  282.      * Security Type
  283.      */

  284.     public java.lang.String _strSecurityType = "";

  285.     /**
  286.      * Previous Coupon Date
  287.      */

  288.     public org.drip.analytics.date.JulianDate _dtPrevCouponDate = null;

  289.     /**
  290.      * Unique Bloomberg ID
  291.      */

  292.     public java.lang.String _strBBGUniqueID = "";

  293.     /**
  294.      * Long Company Name
  295.      */

  296.     public java.lang.String _strLongCompanyName = "";

  297.     /**
  298.      * Flag indicating Structured Note
  299.      */

  300.     public boolean _bIsStructuredNote = false;

  301.     /**
  302.      * Flag indicating whether unit traded
  303.      */

  304.     public boolean _bIsUnitTraded = false;

  305.     /**
  306.      * Flag indicating is reverse convertible
  307.      */

  308.     public boolean _bIsReversibleConvertible = false;

  309.     /**
  310.      * Redemption Currency
  311.      */

  312.     public java.lang.String _strRedemptionCurrency = "";

  313.     /**
  314.      * Coupon Currency
  315.      */

  316.     public java.lang.String _strCouponCurrency = "";

  317.     /**
  318.      * Trade Currency
  319.      */

  320.     public java.lang.String _strTradeCurrency = "";

  321.     /**
  322.      * Is this a Bearer Bond
  323.      */

  324.     public boolean _bIsBearer = false;

  325.     /**
  326.      * Is this registered
  327.      */

  328.     public boolean _bIsRegistered = false;

  329.     /**
  330.      * Has this been called
  331.      */

  332.     public boolean _bHasBeenCalled = false;

  333.     /**
  334.      * Issuer Name
  335.      */

  336.     public java.lang.String _strIssuer = "";

  337.     /**
  338.      * Penultimate Coupon Date
  339.      */

  340.     public org.drip.analytics.date.JulianDate _dtPenultimateCouponDate = null;

  341.     /**
  342.      * Float Coupon Convention
  343.      */

  344.     public java.lang.String _strFloatCouponConvention = "";

  345.     /**
  346.      * Current Coupon
  347.      */

  348.     public double _dblCurrentCoupon = java.lang.Double.NaN;

  349.     /**
  350.      * Is this bond a floater
  351.      */

  352.     public boolean _bIsFloater = false;

  353.     /**
  354.      * Trade Status
  355.      */

  356.     public boolean _bTradeStatus = false;

  357.     /**
  358.      * CDR Country Code
  359.      */

  360.     public java.lang.String _strCDRCountryCode = "";

  361.     /**
  362.      * CDR Settle Code
  363.      */

  364.     public java.lang.String _strCDRSettleCode = "";

  365.     /**
  366.      * Final Maturity Date
  367.      */

  368.     public org.drip.analytics.date.JulianDate _dtFinalMaturity = null;

  369.     /**
  370.      * Is this a private placement
  371.      */

  372.     public boolean _bIsPrivatePlacement = false;

  373.     /**
  374.      * Is this bond perpetual
  375.      */

  376.     public boolean _bIsPerpetual = false;

  377.     /**
  378.      * Has this bond defaulted
  379.      */

  380.     public boolean _bIsDefaulted = false;

  381.     /**
  382.      * Spread over the floater index for this bond
  383.      */

  384.     public double _dblFloatSpread = java.lang.Double.NaN;

  385.     /**
  386.      * Floating rate index
  387.      */

  388.     public java.lang.String _strRateIndex = "";

  389.     /**
  390.      * Moody's Rating
  391.      */

  392.     public java.lang.String _strMoody = "";

  393.     /**
  394.      * SnP rating
  395.      */

  396.     public java.lang.String _strSnP = "";

  397.     /**
  398.      * Fitch Rating
  399.      */

  400.     public java.lang.String _strFitch = "";

  401.     /**
  402.      * Senior or Sub-ordinate
  403.      */

  404.     public java.lang.String _strSnrSub = "";

  405.     /**
  406.      * Issuer SPN
  407.      */

  408.     public java.lang.String _strIssuerSPN = "";

  409.     /**
  410.      * Issue Price
  411.      */

  412.     public double _dblIssuePrice = java.lang.Double.NaN;

  413.     /**
  414.      * Coupon
  415.      */

  416.     public double _dblCoupon = java.lang.Double.NaN;

  417.     /**
  418.      * Maturity
  419.      */

  420.     public org.drip.analytics.date.JulianDate _dtMaturity = null;

  421.     private org.drip.analytics.date.JulianDate reconcileStartDate()
  422.     {
  423.         if (null != _dtInterestAccrualStart) return _dtInterestAccrualStart;

  424.         if (null != _dtFirstCoupon) return _dtFirstCoupon;

  425.         if (null != _dtIssue) return _dtIssue;

  426.         if (null != _dtFirstSettle) return _dtFirstSettle;

  427.         return _dtAnnounce;
  428.     }

  429.     /**
  430.      * Create BondRefDataBuilder object from java ResultSet SQL
  431.      *
  432.      * @param rs SQL ResultSet
  433.      *
  434.      * @return BondRefDataBuilder object
  435.      */

  436.     public static final BondRefDataBuilder CreateFromResultSet (
  437.         final java.sql.ResultSet rs)
  438.     {
  439.         try {
  440.             BondRefDataBuilder brdb = new BondRefDataBuilder();

  441.             if (null == (brdb._strISIN = rs.getString ("ISIN"))) return null;

  442.             if (null == (brdb._strCUSIP = rs.getString ("CUSIP"))) return null;

  443.             brdb._strBBGID = rs.getString ("BBG_ID");

  444.             brdb._strIssuerCategory = rs.getString ("IssuerCategory");

  445.             brdb._strTicker = rs.getString ("Ticker");

  446.             if (!org.drip.numerical.common.NumberUtil.IsValid (brdb._dblCoupon = rs.getDouble ("Coupon")))
  447.                 return null;

  448.             brdb._dtMaturity = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate
  449.                 ("Maturity"));

  450.             brdb._strSeries = rs.getString ("Series");

  451.             brdb._strName = rs.getString ("Name");

  452.             brdb._strShortName = rs.getString ("ShortName");

  453.             brdb._strIssuerIndustry = rs.getString ("IssuerIndustry");

  454.             brdb._strCouponType = rs.getString ("CouponType");

  455.             brdb._strMaturityType = rs.getString ("MaturityType");

  456.             brdb._strCalculationType = rs.getString ("CalculationType");

  457.             brdb._strDayCountCode = rs.getString ("DayCountConv");

  458.             brdb._strMarketIssueType = rs.getString ("MarketIssueType");

  459.             brdb._strIssueCountryCode = rs.getString ("IssueCountryCode");

  460.             brdb._strIssueCountry = rs.getString ("IssueCountry");

  461.             brdb._strCollateralType = rs.getString ("CollateralType");

  462.             brdb._dblIssueAmount = rs.getDouble ("IssueAmount");

  463.             brdb._dblOutstandingAmount = rs.getDouble ("OutstandingAmount");

  464.             brdb._dblMinimumPiece = rs.getDouble ("MinimumPiece");

  465.             brdb._dblMinimumIncrement = rs.getDouble ("MinimumIncrement");

  466.             brdb._dblParAmount = rs.getDouble ("ParAmount");

  467.             brdb._strLeadManager = rs.getString ("LeadManager");

  468.             brdb._strExchangeCode = rs.getString ("ExchangeCode");

  469.             brdb._dblRedemptionValue = rs.getDouble ("RedemptionValue");

  470.             brdb._dtNextCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate
  471.                 ("NextCouponDate"));

  472.             if (null == (brdb._dtAnnounce = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry
  473.                 (rs.getDate ("AnnounceDate"))))
  474.                 return null;

  475.             if (null == (brdb._dtFirstSettle = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry
  476.                 (rs.getDate ("FirstSettleDate"))))
  477.                 return null;

  478.             if (null == (brdb._dtFirstCoupon = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry
  479.                 (rs.getDate ("FirstCouponDate"))))
  480.                 return null;

  481.             if (null == (brdb._dtInterestAccrualStart =
  482.                 org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate ("AccrualStartDate"))))
  483.                 return null;

  484.             if (null == (brdb._dtIssue = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate
  485.                 ("IssueDate"))))
  486.                 return null;

  487.             brdb._bIsCallable = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  488.                 ("IsCallable"));

  489.             brdb._bIsPutable = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  490.                 ("IsPutable"));

  491.             brdb._bIsSinkable = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  492.                 ("IsSinkable"));

  493.             brdb._strBBGParent = rs.getString ("BBGParent");

  494.             brdb._strCountryOfIncorporation = rs.getString ("CountryOfIncorporation");

  495.             brdb._strIndustrySector = rs.getString ("IndustrySector");

  496.             brdb._strIndustryGroup = rs.getString ("IndustryGroup");

  497.             brdb._strIndustrySubgroup = rs.getString ("IndustrySubgroup");

  498.             brdb._strCountryOfGuarantor = rs.getString ("CountryOfGuarantor");

  499.             brdb._strCountryOfDomicile = rs.getString ("CountryOfDomicile");

  500.             brdb._strDescription = rs.getString ("Description");

  501.             brdb._strSecurityType = rs.getString ("SecurityType");

  502.             brdb._dtPrevCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate
  503.                 ("PrevCouponDate"));

  504.             brdb._strBBGUniqueID = rs.getString ("BBUniqueID");

  505.             brdb._strLongCompanyName = rs.getString ("LongCompanyName");

  506.             brdb._strRedemptionCurrency = rs.getString ("RedemptionCurrency");

  507.             if (null == brdb._strRedemptionCurrency || brdb._strRedemptionCurrency.isEmpty()) return null;

  508.             brdb._strCouponCurrency = rs.getString ("CouponCurrency");

  509.             if (null == brdb._strCouponCurrency || brdb._strCouponCurrency.isEmpty()) return null;

  510.             brdb._bIsStructuredNote = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  511.                 ("StructuredNote"));

  512.             brdb._bIsUnitTraded = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  513.                 ("UnitTraded"));

  514.             brdb._bIsReversibleConvertible = org.drip.numerical.common.StringUtil.ParseFromUnitaryString
  515.                 (rs.getString ("ReverseConvertible"));

  516.             brdb._strTradeCurrency = rs.getString ("TradeCurrency");

  517.             if (null == brdb._strTradeCurrency || brdb._strTradeCurrency.isEmpty()) return null;

  518.             brdb._bIsBearer = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  519.                 ("Bearer"));

  520.             brdb._bIsRegistered = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  521.                 ("Registered"));

  522.             brdb._bHasBeenCalled = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  523.                 ("Called"));

  524.             brdb._strIssuer = rs.getString ("Issuer");

  525.             brdb._dtPenultimateCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry
  526.                 (rs.getDate ("PenultimateCouponDate"));

  527.             brdb._strFloatCouponConvention = rs.getString ("FloatCouponConvention");

  528.             brdb._dblCurrentCoupon = rs.getDouble ("CurrentCoupon");

  529.             brdb._bIsFloater = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  530.                 ("Floater"));

  531.             brdb._bTradeStatus = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  532.                 ("TradeStatus"));

  533.             brdb._strCDRCountryCode = rs.getString ("CDRCountryCode");

  534.             brdb._strCDRSettleCode = rs.getString ("CDRSettleCode");

  535.             brdb._strFloatCouponConvention = rs.getString ("FloatCouponConvention");

  536.             brdb._dtFinalMaturity = org.drip.analytics.date.DateUtil.MakeJulianFromRSEntry (rs.getDate
  537.                 ("FinalMaturity"));

  538.             brdb._bIsPrivatePlacement = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  539.                 ("PrivatePlacement"));

  540.             brdb._bIsPerpetual = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  541.                 ("Perpetual"));

  542.             brdb._bIsDefaulted = org.drip.numerical.common.StringUtil.ParseFromUnitaryString (rs.getString
  543.                 ("Defaulted"));

  544.             brdb._dblFloatSpread = rs.getDouble ("FloatSpread");

  545.             brdb._strRateIndex = rs.getString ("RateIndex");

  546.             brdb._strMoody = rs.getString ("Moody");

  547.             brdb._strSnP = rs.getString ("SnP");

  548.             brdb._strFitch = rs.getString ("Fitch");

  549.             brdb._strSnrSub = rs.getString ("SnrSub");

  550.             brdb._strIssuerSPN = rs.getString ("SPN");

  551.             brdb._dblIssuePrice = rs.getDouble ("IssuePrice");

  552.             return brdb;
  553.         } catch (java.lang.Exception e) {
  554.             e.printStackTrace();
  555.         }

  556.         return null;
  557.     }

  558.     /**
  559.      * Empty BondRefDataBuilder ctr - uninitialized members
  560.      */

  561.     public BondRefDataBuilder()
  562.     {
  563.     }

  564.     /**
  565.      * BondRefDataBuilder de-serialization from input JSON Map
  566.      *
  567.      * @param mapJSON Input JSON Map
  568.      *
  569.      * @throws java.lang.Exception Thrown if BondRefDataBuilder cannot be properly de-serialized
  570.      */

  571.     public BondRefDataBuilder (
  572.         final org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String> mapJSON)
  573.         throws java.lang.Exception
  574.     {
  575.         if (null == mapJSON || 0 == mapJSON.size())
  576.             throw new java.lang.Exception ("BondRefDataBuilder de-serializer: Invalid input JSON Map");

  577.         // double dblVersion = mapJSON.get ("version");

  578.         _strISIN = mapJSON.get ("isin");

  579.         _strCUSIP = mapJSON.get ("cusip");

  580.         _strBBGID = mapJSON.get ("bbgid");

  581.         _strIssuerCategory = mapJSON.get ("issuercategory");

  582.         _strTicker = mapJSON.get ("ticker");

  583.         _strSeries = mapJSON.get ("series");

  584.         _strName = mapJSON.get ("name");

  585.         _strShortName = mapJSON.get ("shortname");

  586.         _strIssuerIndustry = mapJSON.get ("issuerindustry");

  587.         _strCouponType = mapJSON.get ("coupontype");

  588.         _strMaturityType = mapJSON.get ("maturitytype");

  589.         _strCalculationType = mapJSON.get ("calculationtype");

  590.         _strDayCountCode = mapJSON.get ("daycountcode");

  591.         _strMarketIssueType = mapJSON.get ("marketissuetype");

  592.         _strIssueCountryCode = mapJSON.get ("issuecountrycode");

  593.         _strIssueCountry = mapJSON.get ("issuecountry");

  594.         _strCollateralType = mapJSON.get ("collateraltype");

  595.         _dblIssueAmount = java.lang.Double.parseDouble (mapJSON.get ("issueamount"));

  596.         _dblOutstandingAmount = java.lang.Double.parseDouble (mapJSON.get ("outstandingamount"));

  597.         _dblMinimumPiece = java.lang.Double.parseDouble (mapJSON.get ("minimumpiece"));

  598.         _dblMinimumIncrement = java.lang.Double.parseDouble (mapJSON.get ("minimumincrement"));

  599.         _dblParAmount = java.lang.Double.parseDouble (mapJSON.get ("paramount"));

  600.         _strLeadManager = mapJSON.get ("leadmanager");

  601.         _strExchangeCode = mapJSON.get ("exchangecode");

  602.         _dblRedemptionValue = java.lang.Double.parseDouble (mapJSON.get ("redemptionvalue"));

  603.         _dtAnnounce = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get ("announcedate"),
  604.             "-");

  605.         _dtFirstSettle = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  606.             ("firstsettledate"), "-");

  607.         _dtFirstCoupon = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  608.             ("firstcoupondate"), "-");

  609.         _dtInterestAccrualStart = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  610.             ("interestaccrualstartdate"), "-");

  611.         _dtIssue = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get ("issuedate"), "-");

  612.         _dtNextCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  613.             ("nextcoupondate"), "-");

  614.         _bIsCallable = java.lang.Boolean.parseBoolean (mapJSON.get ("iscallable"));

  615.         _bIsPutable = java.lang.Boolean.parseBoolean (mapJSON.get ("isputabale"));

  616.         _bIsSinkable = java.lang.Boolean.parseBoolean (mapJSON.get ("issinkable"));

  617.         _strBBGParent = mapJSON.get ("bbgparent");

  618.         _strCountryOfIncorporation = mapJSON.get ("countryofincorporation");

  619.         _strIndustrySector = mapJSON.get ("industrysector");

  620.         _strIndustryGroup = mapJSON.get ("industrygroup");

  621.         _strIndustrySubgroup = mapJSON.get ("industrysubgroup");

  622.         _strCountryOfGuarantor = mapJSON.get ("countryofguarantor");

  623.         _strCountryOfDomicile = mapJSON.get ("countryofdomicile");

  624.         _strDescription = mapJSON.get ("description");

  625.         _strSecurityType = mapJSON.get ("securitytype");

  626.         _dtPrevCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  627.             ("prevcoupondate"), "-");

  628.         _strBBGUniqueID = mapJSON.get ("bbguniqueid");

  629.         _strLongCompanyName = mapJSON.get ("longcompanyname");

  630.         _bIsStructuredNote = java.lang.Boolean.parseBoolean (mapJSON.get ("isstructurednote"));

  631.         _bIsUnitTraded = java.lang.Boolean.parseBoolean (mapJSON.get ("isunittraded"));

  632.         _bIsReversibleConvertible = java.lang.Boolean.parseBoolean (mapJSON.get ("isreversibleconvertible"));

  633.         _strRedemptionCurrency = mapJSON.get ("redemptioncurrency");

  634.         _strCouponCurrency = mapJSON.get ("couponcurrency");

  635.         _strTradeCurrency = mapJSON.get ("tradecurrency");

  636.         _bIsBearer = java.lang.Boolean.parseBoolean (mapJSON.get ("isbearer"));

  637.         _bIsRegistered = java.lang.Boolean.parseBoolean (mapJSON.get ("isregistered"));

  638.         _bHasBeenCalled = java.lang.Boolean.parseBoolean (mapJSON.get ("hasbeencalled"));

  639.         _strIssuer = mapJSON.get ("issuer");

  640.         _dtPenultimateCouponDate = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  641.             ("penultimatecoupondate"), "-");

  642.         _strFloatCouponConvention = mapJSON.get ("floatcouponconvention");

  643.         _dblCurrentCoupon = java.lang.Double.parseDouble (mapJSON.get ("currentcoupon"));

  644.         _bIsFloater = java.lang.Boolean.parseBoolean (mapJSON.get ("isfloater"));

  645.         _bTradeStatus = java.lang.Boolean.parseBoolean (mapJSON.get ("tradestatus"));

  646.         _strCDRCountryCode = mapJSON.get ("cdrcountrycode");

  647.         _strCDRSettleCode = mapJSON.get ("cdrsettlecode");

  648.         _dtFinalMaturity = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get
  649.             ("finalmaturitydate"), "-");

  650.         _bIsPrivatePlacement = java.lang.Boolean.parseBoolean (mapJSON.get ("isprivateplacement"));

  651.         _bIsPerpetual = java.lang.Boolean.parseBoolean (mapJSON.get ("isperpetual"));

  652.         _bIsDefaulted = java.lang.Boolean.parseBoolean (mapJSON.get ("isdefaulted"));

  653.         _dblFloatSpread = java.lang.Double.parseDouble (mapJSON.get ("floatspread"));

  654.         _strRateIndex = mapJSON.get ("rateindex");

  655.         _strMoody = mapJSON.get ("moody");

  656.         _strSnP = mapJSON.get ("snp");

  657.         _strFitch = mapJSON.get ("fitch");

  658.         _strSnrSub = mapJSON.get ("snrsub");

  659.         _strIssuerSPN = mapJSON.get ("issuerspn");

  660.         _dblIssuePrice = java.lang.Double.parseDouble (mapJSON.get ("issueprice"));

  661.         _dblCoupon = java.lang.Double.parseDouble (mapJSON.get ("coupon"));

  662.         _dtMaturity = org.drip.analytics.date.DateUtil.MakeJulianFromYYYYMMDD (mapJSON.get ("maturitydate"),
  663.             "-");
  664.     }

  665.     /**
  666.      * Set the ISIN
  667.      *
  668.      * @param strISIN ISIN
  669.      *
  670.      * @return True (success), false (failure)
  671.      */

  672.     public boolean setISIN (
  673.         final java.lang.String strISIN)
  674.     {
  675.         if (null == strISIN || strISIN.isEmpty()) return false;

  676.         _strISIN = strISIN;
  677.         return true;
  678.     }

  679.     /**
  680.      * Set the CUSIP
  681.      *
  682.      * @param strCUSIP CUSIP
  683.      *
  684.      * @return True (success), false (failure)
  685.      */

  686.     public boolean setCUSIP (
  687.         final java.lang.String strCUSIP)
  688.     {
  689.         if (null == strCUSIP || strCUSIP.isEmpty()) return false;

  690.         _strCUSIP = strCUSIP;
  691.         return true;
  692.     }

  693.     /**
  694.      * Set the Bloomberg ID
  695.      *
  696.      * @param strBBGID Bloomberg ID String
  697.      *
  698.      * @return True (success), false (failure)
  699.      */

  700.     public boolean setBBGID (
  701.         final java.lang.String strBBGID)
  702.     {
  703.         if (null == (_strBBGID = strBBGID)) _strBBGID = "";

  704.         return true;
  705.     }

  706.     /**
  707.      * Set the Issuer Category
  708.      *
  709.      * @param strIssuerCategory Issuer Category
  710.      *
  711.      * @return True (success), false (failure)
  712.      */

  713.     public boolean setIssuerCategory (
  714.         final java.lang.String strIssuerCategory)
  715.     {
  716.         if (null == (_strIssuerCategory = strIssuerCategory)) _strIssuerCategory = "";

  717.         return true;
  718.     }

  719.     /**
  720.      * Set the Issuer Ticker
  721.      *
  722.      * @param strTicker Ticker
  723.      *
  724.      * @return True (success), false (failure)
  725.      */

  726.     public boolean setTicker (
  727.         final java.lang.String strTicker)
  728.     {
  729.         if (null == (_strTicker = strTicker)) _strTicker = "";

  730.         return true;
  731.     }

  732.     /**
  733.      * Set the Issuer Series
  734.      *
  735.      * @param strSeries series
  736.      *
  737.      * @return True (success), false (failure)
  738.      */

  739.     public boolean setSeries (
  740.         final java.lang.String strSeries)
  741.     {
  742.         if (null == (_strSeries = strSeries)) _strSeries = "";

  743.         return true;
  744.     }

  745.     /**
  746.      * Set the Issuer Name
  747.      *
  748.      * @param strName Name
  749.      *
  750.      * @return True (success), false (failure)
  751.      */

  752.     public boolean setName (
  753.         final java.lang.String strName)
  754.     {
  755.         if (null == (_strName = strName)) _strName = "";

  756.         return true;
  757.     }

  758.     /**
  759.      * Set the Issuer Short Name
  760.      *
  761.      * @param strShortName Short Name
  762.      *
  763.      * @return True (success), false (failure)
  764.      */

  765.     public boolean setShortName (
  766.         final java.lang.String strShortName)
  767.     {
  768.         if (null == (_strShortName = strShortName)) _strShortName = "";

  769.         return true;
  770.     }

  771.     /**
  772.      * Set the Issuer Industry
  773.      *
  774.      * @param strIssuerIndustry Issuer Industry
  775.      *
  776.      * @return True (success), false (failure)
  777.      */

  778.     public boolean setIssuerIndustry (
  779.         final java.lang.String strIssuerIndustry)
  780.     {
  781.         if (null == (_strIssuerIndustry = strIssuerIndustry)) _strIssuerIndustry = "";

  782.         return true;
  783.     }

  784.     /**
  785.      * Set the Coupon Type
  786.      *
  787.      * @param strCouponType Coupon Type
  788.      *
  789.      * @return True (success), false (failure)
  790.      */

  791.     public boolean setCouponType (
  792.         final java.lang.String strCouponType)
  793.     {
  794.         if (null == (_strCouponType = strCouponType)) _strCouponType = "";

  795.         return true;
  796.     }

  797.     /**
  798.      * Set the Maturity Type
  799.      *
  800.      * @param strMaturityType Maturity Type
  801.      *
  802.      * @return True (success), false (failure)
  803.      */

  804.     public boolean setMaturityType (
  805.         final java.lang.String strMaturityType)
  806.     {
  807.         if (null == (_strMaturityType = strMaturityType)) _strMaturityType = "";

  808.         return true;
  809.     }

  810.     /**
  811.      * Set the Calculation Type
  812.      *
  813.      * @param strCalculationType Calculation Type
  814.      *
  815.      * @return True (success), false (failure)
  816.      */

  817.     public boolean setCalculationType (
  818.         final java.lang.String strCalculationType)
  819.     {
  820.         if (null == (_strCalculationType = strCalculationType)) _strCalculationType = "";

  821.         return true;
  822.     }

  823.     /**
  824.      * Set the Day Count Code
  825.      *
  826.      * @param strDayCountCode Day Count Code
  827.      *
  828.      * @return True (success), false (failure)
  829.      */

  830.     public boolean setDayCountCode (
  831.         final java.lang.String strDayCountCode)
  832.     {
  833.         _strDayCountCode = "Unknown DC";

  834.         try {
  835.             _strDayCountCode = org.drip.analytics.support.Helper.ParseFromBBGDCCode
  836.                 (strDayCountCode);
  837.         } catch (java.lang.Exception e) {
  838.             if (m_bBlog)
  839.                 System.out.println ("Bad dayCount " + strDayCountCode + " for ISIN " +
  840.                     _strISIN);

  841.             return false;
  842.         }

  843.         return true;
  844.     }

  845.     /**
  846.      * Set the Market Issue Type
  847.      *
  848.      * @param strMarketIssueType Market Issue Type
  849.      *
  850.      * @return True (success), false (failure)
  851.      */

  852.     public boolean setMarketIssueType (
  853.         final java.lang.String strMarketIssueType)
  854.     {
  855.         if (null == (_strMarketIssueType = strMarketIssueType)) _strMarketIssueType = "";

  856.         return true;
  857.     }

  858.     /**
  859.      * Set the Issue Country Code
  860.      *
  861.      * @param strIssueCountryCode Issue Country Code
  862.      *
  863.      * @return True (success), false (failure)
  864.      */

  865.     public boolean setIssueCountryCode (
  866.         final java.lang.String strIssueCountryCode)
  867.     {
  868.         if (null == (_strIssueCountryCode = strIssueCountryCode)) _strIssueCountryCode = "";

  869.         return true;
  870.     }

  871.     /**
  872.      * Set the Issue Country
  873.      *
  874.      * @param strIssueCountry Issue Country
  875.      *
  876.      * @return True (success), false (failure)
  877.      */

  878.     public boolean setIssueCountry (
  879.         final java.lang.String strIssueCountry)
  880.     {
  881.         if (null == (_strIssueCountry = strIssueCountry)) _strIssueCountry = "";

  882.         return true;
  883.     }

  884.     /**
  885.      * Set the Collateral Type
  886.      *
  887.      * @param strCollateralType Collateral Type
  888.      *
  889.      * @return True (success), false (failure)
  890.      */

  891.     public boolean setCollateralType (
  892.         final java.lang.String strCollateralType)
  893.     {
  894.         if (null == (_strCollateralType = strCollateralType)) _strCollateralType = "";

  895.         return true;
  896.     }

  897.     /**
  898.      * Set the Issue Amount
  899.      *
  900.      * @param strIssueAmount Issue Amount
  901.      *
  902.      * @return True (success), false (failure)
  903.      */

  904.     public boolean setIssueAmount (
  905.         final java.lang.String strIssueAmount)
  906.     {
  907.         try {
  908.             _dblIssueAmount = java.lang.Double.parseDouble (strIssueAmount.trim());

  909.             return true;
  910.         } catch (java.lang.Exception e) {
  911.             if (m_bBlog) System.out.println ("Bad Issue Amount " + strIssueAmount + " for ISIN " + _strISIN);
  912.         }

  913.         return false;
  914.     }

  915.     /**
  916.      * Set the Outstanding Amount
  917.      *
  918.      * @param strOutstandingAmount Outstanding Amount
  919.      *
  920.      * @return True (success), false (failure)
  921.      */

  922.     public boolean setOutstandingAmount (
  923.         final java.lang.String strOutstandingAmount)
  924.     {
  925.         try {
  926.             _dblOutstandingAmount = java.lang.Double.parseDouble (strOutstandingAmount.trim());

  927.             return true;
  928.         } catch (java.lang.Exception e) {
  929.             if (m_bBlog)
  930.                 System.out.println ("Bad Outstanding Amount " + strOutstandingAmount + " for ISIN " +
  931.                     _strISIN);
  932.         }

  933.         return false;
  934.     }

  935.     /**
  936.      * Set the Minimum Piece
  937.      *
  938.      * @param strMinimumPiece Minimum Piece
  939.      *
  940.      * @return True (success), false (failure)
  941.      */

  942.     public boolean setMinimumPiece (
  943.         final java.lang.String strMinimumPiece)
  944.     {
  945.         try {
  946.             _dblMinimumPiece = java.lang.Double.parseDouble (strMinimumPiece.trim());

  947.             return true;
  948.         } catch (java.lang.Exception e) {
  949.             if (m_bBlog)
  950.                 System.out.println ("Bad Minimum Piece " + strMinimumPiece + " for ISIN " + _strISIN);
  951.         }

  952.         return false;
  953.     }

  954.     /**
  955.      * Set the Minimum Increment
  956.      *
  957.      * @param strMinimumIncrement Minimum Increment
  958.      *
  959.      * @return True (success), false (failure)
  960.      */

  961.     public boolean setMinimumIncrement (
  962.         final java.lang.String strMinimumIncrement)
  963.     {
  964.         try {
  965.             _dblMinimumIncrement = java.lang.Double.parseDouble (strMinimumIncrement.trim());

  966.             return true;
  967.         } catch (java.lang.Exception e) {
  968.             if (m_bBlog)
  969.                 System.out.println ("Bad Minimum Increment " + strMinimumIncrement + " for ISIN " +
  970.                     _strISIN);
  971.         }

  972.         return false;
  973.     }

  974.     /**
  975.      * Set the Par Amount
  976.      *
  977.      * @param strParAmount Par Amount
  978.      *
  979.      * @return True (success), false (failure)
  980.      */

  981.     public boolean setParAmount (
  982.         final java.lang.String strParAmount)
  983.     {
  984.         try {
  985.             _dblParAmount = java.lang.Double.parseDouble (strParAmount.trim());

  986.             return true;
  987.         } catch (java.lang.Exception e) {
  988.             if (m_bBlog) System.out.println ("Bad Par Amount " + strParAmount + " for ISIN " + _strISIN);
  989.         }

  990.         return false;
  991.     }

  992.     /**
  993.      * Set the Lead Manager
  994.      *
  995.      * @param strLeadManager Lead Manager
  996.      *
  997.      * @return True (success), false (failure)
  998.      */

  999.     public boolean setLeadManager (
  1000.         final java.lang.String strLeadManager)
  1001.     {
  1002.         if (null == (_strLeadManager = strLeadManager)) _strLeadManager = "";

  1003.         return true;
  1004.     }

  1005.     /**
  1006.      * Set the Exchange Code
  1007.      *
  1008.      * @param strExchangeCode Exchange Code
  1009.      *
  1010.      * @return True (success), false (failure)
  1011.      */

  1012.     public boolean setExchangeCode (
  1013.         final java.lang.String strExchangeCode)
  1014.     {
  1015.         if (null == (_strExchangeCode = strExchangeCode)) _strExchangeCode = "";

  1016.         return true;
  1017.     }

  1018.     /**
  1019.      * Set the Redemption Value
  1020.      *
  1021.      * @param strRedemptionValue Redemption Value
  1022.      *
  1023.      * @return True (success), false (failure)
  1024.      */

  1025.     public boolean setRedemptionValue (
  1026.         final java.lang.String strRedemptionValue)
  1027.     {
  1028.         try {
  1029.             _dblRedemptionValue = java.lang.Double.parseDouble (strRedemptionValue.trim());

  1030.             return true;
  1031.         } catch (java.lang.Exception e) {
  1032.             if (m_bBlog)
  1033.                 System.out.println ("Bad Redemption Value " + strRedemptionValue + " for ISIN " + _strISIN);
  1034.         }

  1035.         return false;
  1036.     }

  1037.     /**
  1038.      * Set the Announce Date
  1039.      *
  1040.      * @param strAnnounce Announce Date String
  1041.      *
  1042.      * @return True (success), false (failure)
  1043.      */

  1044.     public boolean setAnnounce (
  1045.         final java.lang.String strAnnounce)
  1046.     {
  1047.         try {
  1048.             _dtAnnounce = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate (strAnnounce.trim());

  1049.             return true;
  1050.         } catch (java.lang.Exception e) {
  1051.             if (m_bBlog) System.out.println ("Bad Announce " + strAnnounce + " for ISIN " + _strISIN);
  1052.         }

  1053.         return false;
  1054.     }

  1055.     /**
  1056.      * Set the First Settle
  1057.      *
  1058.      * @param strFirstSettle First Settle
  1059.      *
  1060.      * @return True (success), false (failure)
  1061.      */

  1062.     public boolean setFirstSettle (
  1063.         final java.lang.String strFirstSettle)
  1064.     {
  1065.         try {
  1066.             _dtFirstSettle = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1067.                 (strFirstSettle.trim());

  1068.             return true;
  1069.         } catch (java.lang.Exception e) {
  1070.             if (m_bBlog) System.out.println ("Bad First Settle " + strFirstSettle + " for ISIN " + _strISIN);
  1071.         }

  1072.         return false;
  1073.     }

  1074.     /**
  1075.      * Set the First Coupon
  1076.      *
  1077.      * @param strFirstCoupon First Coupon
  1078.      *
  1079.      * @return True (success), false (failure)
  1080.      */

  1081.     public boolean setFirstCoupon (
  1082.         final java.lang.String strFirstCoupon)
  1083.     {
  1084.         try {
  1085.             _dtFirstCoupon = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1086.                 (strFirstCoupon.trim());

  1087.             return true;
  1088.         } catch (java.lang.Exception e) {
  1089.             if (m_bBlog) System.out.println ("Bad First Coupon " + strFirstCoupon + " for ISIN " + _strISIN);
  1090.         }

  1091.         return false;
  1092.     }

  1093.     /**
  1094.      * Set the Interest Accrual Start Date
  1095.      *
  1096.      * @param strInterestAccrualStart Interest Accrual Start Date
  1097.      *
  1098.      * @return True (success), false (failure)
  1099.      */

  1100.     public boolean setInterestAccrualStart (
  1101.         final java.lang.String strInterestAccrualStart)
  1102.     {
  1103.         try {
  1104.             _dtInterestAccrualStart = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1105.                 (strInterestAccrualStart.trim());

  1106.             return true;
  1107.         } catch (java.lang.Exception e) {
  1108.             if (m_bBlog)
  1109.                 System.out.println ("Bad Announce " + strInterestAccrualStart + " for ISIN " + _strISIN);
  1110.         }

  1111.         return false;
  1112.     }

  1113.     /**
  1114.      * Set the Issue Date
  1115.      *
  1116.      * @param strIssue Issue Date
  1117.      *
  1118.      * @return True (success), false (failure)
  1119.      */

  1120.     public boolean setIssue (
  1121.         final java.lang.String strIssue)
  1122.     {
  1123.         try {
  1124.             _dtIssue = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate (strIssue.trim());

  1125.             return true;
  1126.         } catch (java.lang.Exception e) {
  1127.             if (m_bBlog) System.out.println ("Bad Issue " + strIssue + " for ISIN " + _strISIN);
  1128.         }

  1129.         return false;
  1130.     }

  1131.     /**
  1132.      * Set the Next Coupon Date
  1133.      *
  1134.      * @param strNextCouponDate Next Coupon Date
  1135.      *
  1136.      * @return True (success), false (failure)
  1137.      */

  1138.     public boolean setNextCouponDate (
  1139.         final java.lang.String strNextCouponDate)
  1140.     {
  1141.         try {
  1142.             _dtNextCouponDate = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1143.                 (strNextCouponDate.trim());

  1144.             return true;
  1145.         } catch (java.lang.Exception e) {
  1146.             if (m_bBlog)
  1147.                 System.out.println ("Bad Next Coupon Date " + strNextCouponDate + " for ISIN " + _strISIN);
  1148.         }

  1149.         return false;
  1150.     }

  1151.     /**
  1152.      * Set whether is Callable
  1153.      *
  1154.      * @param strCallable Callable?
  1155.      *
  1156.      * @return True (success), false (failure)
  1157.      */

  1158.     public boolean setIsCallable (
  1159.         final java.lang.String strCallable)
  1160.     {
  1161.         if (null == strCallable) _bIsCallable = false;

  1162.         if ("1".equalsIgnoreCase (strCallable))
  1163.             _bIsCallable = true;
  1164.         else
  1165.             _bIsCallable = false;

  1166.         return true;
  1167.     }

  1168.     /**
  1169.      * Set whether is Putable
  1170.      *
  1171.      * @param strPutable Putable?
  1172.      *
  1173.      * @return True (success), false (failure)
  1174.      */

  1175.     public boolean setIsPutable (
  1176.         final java.lang.String strPutable)
  1177.     {
  1178.         if (null == strPutable) _bIsPutable = false;

  1179.         if ("1".equalsIgnoreCase (strPutable))
  1180.             _bIsPutable = true;
  1181.         else
  1182.             _bIsPutable = false;

  1183.         return true;
  1184.     }

  1185.     /**
  1186.      * Set whether is Sinkable
  1187.      *
  1188.      * @param strSinkable Sinkable?
  1189.      *
  1190.      * @return True (success), false (failure)
  1191.      */

  1192.     public boolean setIsSinkable (
  1193.         final java.lang.String strSinkable)
  1194.     {
  1195.         if (null == strSinkable) _bIsSinkable = false;

  1196.         if ("1".equalsIgnoreCase (strSinkable))
  1197.             _bIsSinkable = true;
  1198.         else
  1199.             _bIsSinkable = false;

  1200.         return true;
  1201.     }

  1202.     /**
  1203.      * Set the Bloomberg Parent
  1204.      *
  1205.      * @param strBBGParent Bloomberg Parent?
  1206.      *
  1207.      * @return True (success), false (failure)
  1208.      */

  1209.     public boolean setBBGParent (
  1210.         final java.lang.String strBBGParent)
  1211.     {
  1212.         if (null == (_strBBGParent = strBBGParent)) _strBBGParent = "";

  1213.         return true;
  1214.     }

  1215.     /**
  1216.      * Set the Country Of Incorporation
  1217.      *
  1218.      * @param strCountryOfIncorporation Country Of Incorporation
  1219.      *
  1220.      * @return True (success), false (failure)
  1221.      */

  1222.     public boolean setCountryOfIncorporation (
  1223.         final java.lang.String strCountryOfIncorporation)
  1224.     {
  1225.         if (null == (_strCountryOfIncorporation = strCountryOfIncorporation))
  1226.             _strCountryOfIncorporation = "";

  1227.         return true;
  1228.     }

  1229.     /**
  1230.      * Set the Industry Sector
  1231.      *
  1232.      * @param strIndustrySector Industry Sector
  1233.      *
  1234.      * @return True (success), false (failure)
  1235.      */

  1236.     public boolean setIndustrySector (
  1237.         final java.lang.String strIndustrySector)
  1238.     {
  1239.         if (null == (_strIndustrySector = strIndustrySector)) _strIndustrySector = "";

  1240.         return true;
  1241.     }

  1242.     /**
  1243.      * Set the Industry Group
  1244.      *
  1245.      * @param strIndustryGroup Industry Group
  1246.      *
  1247.      * @return True (success), false (failure)
  1248.      */

  1249.     public boolean setIndustryGroup (
  1250.         final java.lang.String strIndustryGroup)
  1251.     {
  1252.         if (null == (_strIndustryGroup = strIndustryGroup)) _strIndustryGroup = "";

  1253.         return true;
  1254.     }

  1255.     /**
  1256.      * Set the Industry Subgroup
  1257.      *
  1258.      * @param strIndustrySubgroup Industry Subgroup
  1259.      *
  1260.      * @return True (success), false (failure)
  1261.      */

  1262.     public boolean setIndustrySubgroup (
  1263.         final java.lang.String strIndustrySubgroup)
  1264.     {
  1265.         if (null == (_strIndustrySubgroup = strIndustrySubgroup)) _strIndustrySubgroup = "";

  1266.         return true;
  1267.     }

  1268.     /**
  1269.      * Set the Country Of Guarantor
  1270.      *
  1271.      * @param strCountryOfGuarantor Country Of Guarantor
  1272.      *
  1273.      * @return True (success), false (failure)
  1274.      */

  1275.     public boolean setCountryOfGuarantor (
  1276.         final java.lang.String strCountryOfGuarantor)
  1277.     {
  1278.         if (null == (_strCountryOfGuarantor = strCountryOfGuarantor)) _strCountryOfGuarantor = "";

  1279.         return true;
  1280.     }

  1281.     /**
  1282.      * Set the Country Of Domicile
  1283.      *
  1284.      * @param strCountryOfDomicile Country Of Domicile
  1285.      *
  1286.      * @return True (success), false (failure)
  1287.      */

  1288.     public boolean setCountryOfDomicile (
  1289.         final java.lang.String strCountryOfDomicile)
  1290.     {
  1291.         if (null == (_strCountryOfDomicile = strCountryOfDomicile)) _strCountryOfDomicile = "";

  1292.         return true;
  1293.     }

  1294.     /**
  1295.      * Set the Description
  1296.      *
  1297.      * @param strDescription Description
  1298.      *
  1299.      * @return True (success), false (failure)
  1300.      */

  1301.     public boolean setDescription (
  1302.         final java.lang.String strDescription)
  1303.     {
  1304.         if (null == (_strDescription = strDescription)) _strDescription = "";

  1305.         return true;
  1306.     }

  1307.     /**
  1308.      * Set the Security Type
  1309.      *
  1310.      * @param strSecurityType Security Type
  1311.      *
  1312.      * @return True (success), false (failure)
  1313.      */

  1314.     public boolean setSecurityType (
  1315.         final java.lang.String strSecurityType)
  1316.     {
  1317.         if (null == (_strSecurityType = strSecurityType)) _strSecurityType = "";

  1318.         return true;
  1319.     }

  1320.     /**
  1321.      * Set the Previous Coupon Date
  1322.      *
  1323.      * @param strPrevCouponDate Previous Coupon Date
  1324.      *
  1325.      * @return True (success), false (failure)
  1326.      */

  1327.     public boolean setPrevCouponDate (
  1328.         final java.lang.String strPrevCouponDate)
  1329.     {
  1330.         try {
  1331.             _dtPrevCouponDate = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1332.                 (strPrevCouponDate.trim());

  1333.             return true;
  1334.         } catch (java.lang.Exception e) {
  1335.             if (m_bBlog)
  1336.                 System.out.println ("Bad Prev Coupon Date " + strPrevCouponDate + " for ISIN " + _strISIN);
  1337.         }

  1338.         return false;
  1339.     }

  1340.     /**
  1341.      * Set the Unique Bloomberg ID
  1342.      *
  1343.      * @param strBBGUniqueID BBGUniqueID
  1344.      *
  1345.      * @return True (success), false (failure)
  1346.      */

  1347.     public boolean setBBGUniqueID (
  1348.         final java.lang.String strBBGUniqueID)
  1349.     {
  1350.         if (null == (_strBBGUniqueID = strBBGUniqueID)) _strBBGUniqueID = "";

  1351.         return true;
  1352.     }

  1353.     /**
  1354.      * Set the Long Company Name
  1355.      *
  1356.      * @param strLongCompanyName Long Company Name
  1357.      *
  1358.      * @return True (success), false (failure)
  1359.      */

  1360.     public boolean setLongCompanyName (
  1361.         final java.lang.String strLongCompanyName)
  1362.     {
  1363.         if (null == (_strLongCompanyName = strLongCompanyName)) _strLongCompanyName = "";

  1364.         return true;
  1365.     }

  1366.     /**
  1367.      * Set the Flag indicating Structured Note
  1368.      *
  1369.      * @param strIsStructuredNote Flag indicating Structured Note
  1370.      *
  1371.      * @return True (success), false (failure)
  1372.      */

  1373.     public boolean setIsStructuredNote (
  1374.         final java.lang.String strIsStructuredNote)
  1375.     {
  1376.         if (null == strIsStructuredNote) _bIsStructuredNote = false;

  1377.         if ("1".equalsIgnoreCase (strIsStructuredNote))
  1378.             _bIsStructuredNote = true;
  1379.         else
  1380.             _bIsStructuredNote = false;

  1381.         return true;
  1382.     }

  1383.     /**
  1384.      * Set the Flag indicating Unit Traded
  1385.      *
  1386.      * @param strIsUnitTraded Flag indicating Unit Traded
  1387.      *
  1388.      * @return True (success), false (failure)
  1389.      */

  1390.     public boolean setIsUnitTraded (
  1391.         final java.lang.String strIsUnitTraded)
  1392.     {
  1393.         if (null == strIsUnitTraded) _bIsUnitTraded = false;

  1394.         if ("1".equalsIgnoreCase (strIsUnitTraded))
  1395.             _bIsUnitTraded = true;
  1396.         else
  1397.             _bIsUnitTraded = false;

  1398.         return true;
  1399.     }

  1400.     /**
  1401.      * Set the Flag indicating Reverse Convertible
  1402.      *
  1403.      * @param strIsReversibleConvertible Flag indicating Reverse Convertible
  1404.      *
  1405.      * @return True (success), false (failure)
  1406.      */

  1407.     public boolean setIsReversibleConvertible (
  1408.         final java.lang.String strIsReversibleConvertible)
  1409.     {
  1410.         if (null == strIsReversibleConvertible) _bIsReversibleConvertible = false;

  1411.         if ("1".equalsIgnoreCase (strIsReversibleConvertible))
  1412.             _bIsReversibleConvertible = true;
  1413.         else
  1414.             _bIsReversibleConvertible = false;

  1415.         return true;
  1416.     }

  1417.     /**
  1418.      * Set the Redemption Currency
  1419.      *
  1420.      * @param strRedemptionCurrency Redemption Currency
  1421.      *
  1422.      * @return True (success), false (failure)
  1423.      */

  1424.     public boolean setRedemptionCurrency (
  1425.         final java.lang.String strRedemptionCurrency)
  1426.     {
  1427.         if (null == (_strRedemptionCurrency = strRedemptionCurrency)) return false;

  1428.         return true;
  1429.     }

  1430.     /**
  1431.      * Set the Coupon Currency
  1432.      *
  1433.      * @param strCouponCurrency Coupon Currency
  1434.      *
  1435.      * @return True (success), false (failure)
  1436.      */

  1437.     public boolean setCouponCurrency (
  1438.         final java.lang.String strCouponCurrency)
  1439.     {
  1440.         if (null == (_strCouponCurrency = strCouponCurrency)) return false;

  1441.         return true;
  1442.     }

  1443.     /**
  1444.      * Set the Trade Currency
  1445.      *
  1446.      * @param strTradeCurrency Trade Currency
  1447.      *
  1448.      * @return True (success), false (failure)
  1449.      */

  1450.     public boolean setTradeCurrency (
  1451.         final java.lang.String strTradeCurrency)
  1452.     {
  1453.         if (null == (_strTradeCurrency = strTradeCurrency)) return false;

  1454.         return true;
  1455.     }

  1456.     /**
  1457.      * Set the Flag indicating Bearer Bond
  1458.      *
  1459.      * @param strIsBearer Flag indicating Bearer Bond
  1460.      *
  1461.      * @return True (success), false (failure)
  1462.      */

  1463.     public boolean setIsBearer (
  1464.         final java.lang.String strIsBearer)
  1465.     {
  1466.         if (null == strIsBearer) _bIsBearer = false;

  1467.         if ("1".equalsIgnoreCase (strIsBearer))
  1468.             _bIsBearer = true;
  1469.         else
  1470.             _bIsBearer = false;

  1471.         return true;
  1472.     }

  1473.     /**
  1474.      * Set the Flag Registered
  1475.      *
  1476.      * @param strIsRegistered Flag indicating Is Registered
  1477.      *
  1478.      * @return True (success), false (failure)
  1479.      */

  1480.     public boolean setIsRegistered (
  1481.         final java.lang.String strIsRegistered)
  1482.     {
  1483.         if (null == strIsRegistered) _bIsRegistered = false;

  1484.         if ("1".equalsIgnoreCase (strIsRegistered))
  1485.             _bIsRegistered = true;
  1486.         else
  1487.             _bIsRegistered = false;

  1488.         return true;
  1489.     }

  1490.     /**
  1491.      * Set the Flag indicating If bond has been called
  1492.      *
  1493.      * @param strHasBeenCalled Flag indicating If bond has been called
  1494.      *
  1495.      * @return True (success), false (failure)
  1496.      */

  1497.     public boolean setHasBeenCalled (
  1498.         final java.lang.String strHasBeenCalled)
  1499.     {
  1500.         if (null == strHasBeenCalled) _bHasBeenCalled = false;

  1501.         if ("1".equalsIgnoreCase (strHasBeenCalled))
  1502.             _bHasBeenCalled = true;
  1503.         else
  1504.             _bHasBeenCalled = false;

  1505.         return true;
  1506.     }

  1507.     /**
  1508.      * Set the Issuer
  1509.      *
  1510.      * @param strIssuer Issuer Name
  1511.      *
  1512.      * @return True (success), false (failure)
  1513.      */

  1514.     public boolean setIssuer (
  1515.         final java.lang.String strIssuer)
  1516.     {
  1517.         if (null == (_strIssuer = strIssuer)) _strIssuer = "";

  1518.         return true;
  1519.     }

  1520.     /**
  1521.      * Set the Penultimate Coupon Date
  1522.      *
  1523.      * @param strPenultimateCouponDate setPenultimateCouponDate
  1524.      *
  1525.      * @return True (success), false (failure)
  1526.      */

  1527.     public boolean setPenultimateCouponDate (
  1528.         final java.lang.String strPenultimateCouponDate)
  1529.     {
  1530.         try {
  1531.             _dtPenultimateCouponDate = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1532.                 (strPenultimateCouponDate.trim());

  1533.             return true;
  1534.         } catch (java.lang.Exception e) {
  1535.             if (m_bBlog)
  1536.                 System.out.println ("Bad Penultimate Coupon Date " + strPenultimateCouponDate + " for ISIN "
  1537.                     + _strISIN);
  1538.         }

  1539.         return false;
  1540.     }

  1541.     /**
  1542.      * Set the Float Coupon Convention
  1543.      *
  1544.      * @param strFloatCouponConvention Float Coupon Convention
  1545.      *
  1546.      * @return True (success), false (failure)
  1547.      */

  1548.     public boolean setFloatCouponConvention (
  1549.         final java.lang.String strFloatCouponConvention)
  1550.     {
  1551.         if (null == (_strFloatCouponConvention = strFloatCouponConvention)) _strFloatCouponConvention = "";

  1552.         return true;
  1553.     }

  1554.     /**
  1555.      * Set the Current Coupon
  1556.      *
  1557.      * @param strCurrentCoupon Current Coupon
  1558.      *
  1559.      * @return True (success), false (failure)
  1560.      */

  1561.     public boolean setCurrentCoupon (
  1562.         final java.lang.String strCurrentCoupon)
  1563.     {
  1564.         if (null == strCurrentCoupon || strCurrentCoupon.isEmpty() || "null".equalsIgnoreCase
  1565.             (strCurrentCoupon))
  1566.             _dblCurrentCoupon = 0.;
  1567.         else {
  1568.             try {
  1569.                 _dblCurrentCoupon = java.lang.Double.parseDouble (strCurrentCoupon.trim());

  1570.                 return true;
  1571.             } catch (java.lang.Exception e) {
  1572.                 if (m_bBlog)
  1573.                     System.out.println ("Bad Current Coupon " + strCurrentCoupon + " for ISIN " + _strISIN);
  1574.             }
  1575.         }

  1576.         return false;
  1577.     }

  1578.     /**
  1579.      * Set the Floater Flag
  1580.      *
  1581.      * @param strIsFloater Flag indicating Is Floater
  1582.      *
  1583.      * @return True (success), false (failure)
  1584.      */

  1585.     public boolean setIsFloater (
  1586.         final java.lang.String strIsFloater)
  1587.     {
  1588.         if (null == strIsFloater) _bIsFloater = false;

  1589.         if ("1".equalsIgnoreCase (strIsFloater))
  1590.             _bIsFloater = true;
  1591.         else
  1592.             _bIsFloater = false;

  1593.         return true;
  1594.     }

  1595.     /**
  1596.      * Set Trade Status
  1597.      *
  1598.      * @param strTradeStatus Trade Status
  1599.      *
  1600.      * @return True (success), false (failure)
  1601.      */

  1602.     public boolean setTradeStatus (
  1603.         final java.lang.String strTradeStatus)
  1604.     {
  1605.         if (null == strTradeStatus) _bTradeStatus = false;

  1606.         if ("1".equalsIgnoreCase (strTradeStatus))
  1607.             _bTradeStatus = true;
  1608.         else
  1609.             _bTradeStatus = false;

  1610.         return true;
  1611.     }

  1612.     /**
  1613.      * Set the CDR Country Code
  1614.      *
  1615.      * @param strCDRCountryCode CDR Country Code
  1616.      *
  1617.      * @return True (success), false (failure)
  1618.      */

  1619.     public boolean setCDRCountryCode (
  1620.         final java.lang.String strCDRCountryCode)
  1621.     {
  1622.         if (null == (_strCDRCountryCode = strCDRCountryCode)) _strCDRCountryCode = "";

  1623.         return true;
  1624.     }

  1625.     /**
  1626.      * Set the CDR Settle Code
  1627.      *
  1628.      * @param strCDRSettleCode CDR Settle Code
  1629.      *
  1630.      * @return True (success), false (failure)
  1631.      */

  1632.     public boolean setCDRSettleCode (
  1633.         final java.lang.String strCDRSettleCode)
  1634.     {
  1635.         if (null == (_strCDRSettleCode = strCDRSettleCode)) _strCDRSettleCode = "";

  1636.         return true;
  1637.     }

  1638.     /**
  1639.      * Set the Final Maturity
  1640.      *
  1641.      * @param strFinalMaturity Final Maturity
  1642.      *
  1643.      * @return True (success), false (failure)
  1644.      */

  1645.     public boolean setFinalMaturity (
  1646.         final java.lang.String strFinalMaturity)
  1647.     {
  1648.         try {
  1649.             _dtFinalMaturity = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1650.                 (strFinalMaturity.trim());

  1651.             return true;
  1652.         } catch (java.lang.Exception e) {
  1653.             if (m_bBlog)
  1654.                 System.out.println ("Bad Final Maturity " + strFinalMaturity + " for ISIN " + _strISIN);
  1655.         }

  1656.         return false;
  1657.     }

  1658.     /**
  1659.      * Set the Private Placement Flag
  1660.      *
  1661.      * @param strIsPrivatePlacement Flag indicating Is Private Placement
  1662.      *
  1663.      * @return True (success), false (failure)
  1664.      */

  1665.     public boolean setIsPrivatePlacement (
  1666.         final java.lang.String strIsPrivatePlacement)
  1667.     {
  1668.         if (null == strIsPrivatePlacement) _bIsPrivatePlacement = false;

  1669.         if ("1".equalsIgnoreCase (strIsPrivatePlacement))
  1670.             _bIsPrivatePlacement = true;
  1671.         else
  1672.             _bIsPrivatePlacement = false;

  1673.         return true;
  1674.     }

  1675.     /**
  1676.      * Set the Perpetual Flag
  1677.      *
  1678.      * @param strIsPerpetual Flag indicating Is Perpetual
  1679.      *
  1680.      * @return True (success), false (failure)
  1681.      */

  1682.     public boolean setIsPerpetual (
  1683.         final java.lang.String strIsPerpetual)
  1684.     {
  1685.         if (null == strIsPerpetual) _bIsPerpetual = false;

  1686.         if ("1".equalsIgnoreCase (strIsPerpetual))
  1687.             _bIsPerpetual = true;
  1688.         else
  1689.             _bIsPerpetual = false;

  1690.         return true;
  1691.     }

  1692.     /**
  1693.      * Set the Defaulted Flag
  1694.      *
  1695.      * @param strIsDefaulted Flag indicating Is Defaulted
  1696.      *
  1697.      * @return True (success), false (failure)
  1698.      */

  1699.     public boolean setIsDefaulted (
  1700.         final java.lang.String strIsDefaulted)
  1701.     {
  1702.         if (null == strIsDefaulted) _bIsDefaulted = false;

  1703.         if ("1".equalsIgnoreCase (strIsDefaulted))
  1704.             _bIsDefaulted = true;
  1705.         else
  1706.             _bIsDefaulted = false;

  1707.         return true;
  1708.     }

  1709.     /**
  1710.      * Set the Float Spread
  1711.      *
  1712.      * @param strFloatSpread Float Spread
  1713.      *
  1714.      * @return True (success), false (failure)
  1715.      */

  1716.     public boolean setFloatSpread (
  1717.         final java.lang.String strFloatSpread)
  1718.     {
  1719.         try {
  1720.             _dblFloatSpread = java.lang.Double.parseDouble (strFloatSpread.trim());

  1721.             return true;
  1722.         } catch (java.lang.Exception e) {
  1723.             if (m_bBlog) System.out.println ("Bad Float Spread " + strFloatSpread + " for ISIN " + _strISIN);
  1724.         }

  1725.         return false;
  1726.     }

  1727.     /**
  1728.      * Set the Rate Index
  1729.      *
  1730.      * @param strRateIndex Rate Index
  1731.      *
  1732.      * @return True (success), false (failure)
  1733.      */

  1734.     public boolean setRateIndex (
  1735.         final java.lang.String strRateIndex)
  1736.     {
  1737.         if (null == (_strRateIndex = strRateIndex)) _strRateIndex = "";

  1738.         return true;
  1739.     }

  1740.     /**
  1741.      * Set the Moodys Rating
  1742.      *
  1743.      * @param strMoody Moodys Rating
  1744.      *
  1745.      * @return True (success), false (failure)
  1746.      */

  1747.     public boolean setMoody (
  1748.         final java.lang.String strMoody)
  1749.     {
  1750.         if (null == (_strMoody = strMoody)) _strMoody = "";

  1751.         return true;
  1752.     }

  1753.     /**
  1754.      * Set the SnP Rating
  1755.      *
  1756.      * @param strSnP SnP Rating
  1757.      *
  1758.      * @return True (success), false (failure)
  1759.      */

  1760.     public boolean setSnP (
  1761.         final java.lang.String strSnP)
  1762.     {
  1763.         if (null == (_strSnP = strSnP)) _strSnP = "";

  1764.         return true;
  1765.     }

  1766.     /**
  1767.      * Set the Fitch Rating
  1768.      *
  1769.      * @param strFitch Fitch Rating
  1770.      *
  1771.      * @return True (success), false (failure)
  1772.      */

  1773.     public boolean setFitch (
  1774.         final java.lang.String strFitch)
  1775.     {
  1776.         if (null == (_strFitch = strFitch)) _strFitch = "";

  1777.         return true;
  1778.     }

  1779.     /**
  1780.      * Set Senior or Sub-ordinate
  1781.      *
  1782.      * @param strSnrSub Senior or Sub-ordinate
  1783.      *
  1784.      * @return True (success), false (failure)
  1785.      */

  1786.     public boolean setSnrSub (
  1787.         final java.lang.String strSnrSub)
  1788.     {
  1789.         if (null == (_strSnrSub = strSnrSub)) _strSnrSub = "";

  1790.         return true;
  1791.     }

  1792.     /**
  1793.      * Set Issuer SPN
  1794.      *
  1795.      * @param strIssuerSPN Issuer SPN
  1796.      *
  1797.      * @return True (success), false (failure)
  1798.      */

  1799.     public boolean setIssuerSPN (
  1800.         final java.lang.String strIssuerSPN)
  1801.     {
  1802.         if (null == (_strIssuerSPN = strIssuerSPN)) _strIssuerSPN = "";

  1803.         return true;
  1804.     }

  1805.     /**
  1806.      * Set Issue Price
  1807.      *
  1808.      * @param strIssuePrice Issue Price
  1809.      *
  1810.      * @return True (success), false (failure)
  1811.      */

  1812.     public boolean setIssuePrice (
  1813.         final java.lang.String strIssuePrice)
  1814.     {
  1815.         try {
  1816.             _dblIssuePrice = java.lang.Double.parseDouble (strIssuePrice.trim());

  1817.             return true;
  1818.         } catch (java.lang.Exception e) {
  1819.             if (m_bBlog) System.out.println ("Bad Issue Price " + strIssuePrice + " for ISIN " + _strISIN);
  1820.         }

  1821.         return false;
  1822.     }

  1823.     /**
  1824.      * Set the coupon
  1825.      *
  1826.      * @param strCoupon Coupon
  1827.      *
  1828.      * @return True (success), false (failure)
  1829.      */

  1830.     public boolean setCoupon (
  1831.         final java.lang.String strCoupon)
  1832.     {
  1833.         if (null == strCoupon || strCoupon.isEmpty() || "null".equalsIgnoreCase (strCoupon)) _dblCoupon = 0.;

  1834.         try {
  1835.             _dblCoupon = java.lang.Double.parseDouble (strCoupon.trim());

  1836.             return true;
  1837.         } catch (java.lang.Exception e) {
  1838.             if (m_bBlog) System.out.println ("Bad coupon " + strCoupon + " for ISIN " + _strISIN);
  1839.         }

  1840.         return false;
  1841.     }

  1842.     /**
  1843.      * Set the maturity
  1844.      *
  1845.      * @param strMaturity maturity
  1846.      *
  1847.      * @return True (success), false (failure)
  1848.      */

  1849.     public boolean setMaturity (
  1850.         final java.lang.String strMaturity)
  1851.     {
  1852.         try {
  1853.             if (null == (_dtMaturity = org.drip.analytics.date.DateUtil.MakeJulianDateFromBBGDate
  1854.                 (strMaturity.trim())))
  1855.                 return false;

  1856.             return true;
  1857.         } catch (java.lang.Exception e) {
  1858.             if (m_bBlog) System.out.println ("Bad Maturity " + strMaturity + " for ISIN " + _strISIN);
  1859.         }

  1860.         return false;
  1861.     }

  1862.     @Override public boolean validate()
  1863.     {
  1864.         if (null == _strISIN || _strISIN.isEmpty() || null == _strCUSIP || _strCUSIP.isEmpty()) {
  1865.             if (m_bDisplayWarnings)
  1866.                 System.out.println ("Check ISIN[" + _strISIN + "] or CUSIP[" + _strCUSIP + "]");

  1867.             return false;
  1868.         }

  1869.         if (null == _dtInterestAccrualStart) {
  1870.             if (null == (_dtInterestAccrualStart = reconcileStartDate())) {
  1871.                 if (m_bDisplayWarnings)
  1872.                     System.out.println ("All possible date init candidates are null for ISIN " + _strISIN);

  1873.                 return false;
  1874.             }
  1875.         }

  1876.         if (null == _dtFirstCoupon) _dtFirstCoupon = reconcileStartDate();

  1877.         if (null == _dtIssue) _dtIssue = reconcileStartDate();

  1878.         if (null == _dtFirstSettle) _dtFirstSettle = reconcileStartDate();

  1879.         if (null == _dtAnnounce) _dtAnnounce = reconcileStartDate();

  1880.         return true;
  1881.     }

  1882.     /**
  1883.      * Create an SQL Insert string for the given object
  1884.      *
  1885.      * @return SQL Insert string
  1886.      */

  1887.     public java.lang.String makeSQLInsert()
  1888.     {
  1889.         java.lang.StringBuilder sb = new java.lang.StringBuilder();

  1890.         sb.append ("insert into BondRefData values(");

  1891.         sb.append ("'").append (_strISIN).append ("', ");

  1892.         sb.append ("'").append (_strCUSIP).append ("', ");

  1893.         sb.append ("'").append (_strBBGID).append ("', ");

  1894.         sb.append ("'").append (_strIssuerCategory).append ("', ");

  1895.         sb.append ("'").append (_strTicker).append ("', ");

  1896.         sb.append ("'").append (_strSeries).append ("', ");

  1897.         sb.append ("'").append (_strName).append ("', ");

  1898.         sb.append ("'").append (_strShortName).append ("', ");

  1899.         sb.append ("'").append (_strIssuerIndustry).append ("', ");

  1900.         sb.append ("'").append (_strCouponType).append ("', ");

  1901.         sb.append ("'").append (_strMaturityType).append ("', ");

  1902.         sb.append ("'").append (_strCalculationType).append ("', ");

  1903.         sb.append ("'").append (_strDayCountCode).append ("', ");

  1904.         sb.append ("'").append (_strMarketIssueType).append ("', ");

  1905.         sb.append ("'").append (_strIssueCountryCode).append ("', ");

  1906.         sb.append ("'").append (_strIssueCountry).append ("', ");

  1907.         sb.append ("'").append (_strCollateralType).append ("', ");

  1908.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblIssueAmount))
  1909.             sb.append ("null, ");
  1910.         else
  1911.             sb.append (_dblIssueAmount).append (", ");

  1912.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblOutstandingAmount))
  1913.             sb.append ("null, ");
  1914.         else
  1915.             sb.append (_dblOutstandingAmount).append (", ");

  1916.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblMinimumPiece))
  1917.             sb.append ("null, ");
  1918.         else
  1919.             sb.append (_dblMinimumPiece).append (", ");

  1920.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblMinimumIncrement))
  1921.             sb.append ("null, ");
  1922.         else
  1923.             sb.append (_dblMinimumIncrement).append (", ");

  1924.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblParAmount))
  1925.             sb.append ("null, ");
  1926.         else
  1927.             sb.append (_dblParAmount).append (", ");

  1928.         sb.append ("'").append (_strLeadManager).append ("', ");

  1929.         sb.append ("'").append (_strExchangeCode).append ("', ");

  1930.         sb.append (_dblRedemptionValue).append (", ");

  1931.         sb.append ("'").append (_dtAnnounce.toOracleDate()).append ("', ");

  1932.         sb.append ("'").append (_dtFirstSettle.toOracleDate()).append ("', ");

  1933.         sb.append ("'").append (_dtFirstCoupon.toOracleDate()).append ("', ");

  1934.         sb.append ("'").append (_dtInterestAccrualStart.toOracleDate()).append ("', ");

  1935.         sb.append ("'").append (_dtIssue.toOracleDate()).append ("', ");

  1936.         if (null == _dtNextCouponDate)
  1937.             sb.append ("null, ");
  1938.         else
  1939.             sb.append ("'").append (_dtNextCouponDate.toOracleDate()).append ("', ");

  1940.         sb.append ("'").append (_bIsCallable ? 1 : 0).append ("', ");

  1941.         sb.append ("'").append (_bIsPutable ? 1 : 0).append ("', ");

  1942.         sb.append ("'").append (_bIsSinkable ? 1 : 0).append ("', ");

  1943.         sb.append ("'").append (_strBBGParent).append ("', "); // Done

  1944.         sb.append ("'").append (_strCountryOfIncorporation).append ("', ");

  1945.         sb.append ("'").append (_strIndustrySector).append ("', ");

  1946.         sb.append ("'").append (_strIndustryGroup).append ("', ");

  1947.         sb.append ("'").append (_strIndustrySubgroup).append ("', ");

  1948.         sb.append ("'").append (_strCountryOfGuarantor).append ("', ");

  1949.         sb.append ("'").append (_strCountryOfDomicile).append ("', ");

  1950.         sb.append ("'").append (_strDescription).append ("', ");

  1951.         sb.append ("'").append (_strSecurityType).append ("', ");

  1952.         if (null == _dtPrevCouponDate)
  1953.             sb.append ("null, ");
  1954.         else
  1955.             sb.append ("'").append (_dtPrevCouponDate.toOracleDate()).append ("', ");

  1956.         sb.append ("'").append (_strBBGUniqueID).append ("', ");

  1957.         sb.append ("'").append (_strLongCompanyName).append ("', ");

  1958.         sb.append ("'").append (_strRedemptionCurrency).append ("', ");

  1959.         sb.append ("'").append (_strCouponCurrency).append ("', ");

  1960.         sb.append ("'").append (_bIsStructuredNote ? 1 : 0).append ("', ");

  1961.         sb.append ("'").append (_bIsUnitTraded ? 1 : 0).append ("', ");

  1962.         sb.append ("'").append (_bIsReversibleConvertible ? 1 : 0).append ("', ");

  1963.         sb.append ("'").append (_strTradeCurrency).append ("', ");

  1964.         sb.append ("'").append (_bIsBearer ? 1 : 0).append ("', ");

  1965.         sb.append ("'").append (_bIsRegistered ? 1 : 0).append ("', ");

  1966.         sb.append ("'").append (_bHasBeenCalled ? 1 : 0).append ("', ");

  1967.         sb.append ("'").append (_strIssuer).append ("', ");

  1968.         if (null == _dtPenultimateCouponDate)
  1969.             sb.append ("null, ");
  1970.         else
  1971.             sb.append ("'").append (_dtPenultimateCouponDate.toOracleDate()).append ("', ");

  1972.         sb.append ("'").append (_strFloatCouponConvention).append ("', ");

  1973.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblCurrentCoupon))
  1974.             sb.append ("null, ");
  1975.         else
  1976.             sb.append (_dblCurrentCoupon).append (", ");

  1977.         sb.append ("'").append (_bIsFloater ? 1 : 0).append ("', ");

  1978.         sb.append ("'").append (_bTradeStatus ? 1 : 0).append ("', ");

  1979.         sb.append ("'").append (_strCDRCountryCode).append ("', ");

  1980.         sb.append ("'").append (_strCDRSettleCode).append ("', ");

  1981.         if (null == _dtFinalMaturity)
  1982.             sb.append ("null, ");
  1983.         else
  1984.             sb.append ("'").append (_dtFinalMaturity.toOracleDate()).append ("', ");

  1985.         sb.append ("'").append (_bIsPrivatePlacement ? 1 : 0).append ("', ");

  1986.         sb.append ("'").append (_bIsPerpetual ? 1 : 0).append ("', ");

  1987.         sb.append ("'").append (_bIsDefaulted ? 1 : 0).append ("', ");

  1988.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblFloatSpread))
  1989.             sb.append ("null, ");
  1990.         else
  1991.             sb.append (_dblFloatSpread).append (", ");

  1992.         sb.append ("'").append (_strRateIndex).append ("', ");

  1993.         sb.append ("'").append (_strMoody).append ("', ");

  1994.         sb.append ("'").append (_strSnP).append ("', ");

  1995.         sb.append ("'").append (_strFitch).append ("', ");

  1996.         sb.append ("'").append (_strSnrSub).append ("', ");

  1997.         sb.append ("'").append (_strIssuerSPN).append ("', ");

  1998.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblIssuePrice))
  1999.             sb.append ("null, ");
  2000.         else
  2001.             sb.append (_dblIssuePrice).append (", ");

  2002.         if (!org.drip.numerical.common.NumberUtil.IsValid (_dblCoupon))
  2003.             sb.append ("null, ");
  2004.         else
  2005.             sb.append (_dblCoupon).append (", ");

  2006.         if (null == _dtMaturity)
  2007.             sb.append ("null");
  2008.         else
  2009.             sb.append ("'").append (_dtMaturity.toOracleDate()).append ("'");

  2010.         return sb.append (")").toString();
  2011.     }

  2012.     /**
  2013.      * Create an SQL Delete string for the given object
  2014.      *
  2015.      * @return SQL Delete string
  2016.      */

  2017.     public java.lang.String makeSQLDelete()
  2018.     {
  2019.         java.lang.StringBuilder sb = new java.lang.StringBuilder();

  2020.         sb.append ("delete from BondRefData where ISIN = '").append (_strISIN).append
  2021.             ("' or CUSIP = '").append (_strCUSIP).append ("'");

  2022.         return sb.toString();
  2023.     }

  2024.     public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String> toJSON()
  2025.     {
  2026.         org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String> mapJSON = new
  2027.             org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.String>();

  2028.         mapJSON.put ("version", "" + org.drip.numerical.common.StringUtil.VERSION);

  2029.         if (null == _strISIN || _strISIN.isEmpty())
  2030.             mapJSON.put ("isin", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2031.         else
  2032.             mapJSON.put ("isin", _strISIN);

  2033.         if (null == _strCUSIP || _strCUSIP.isEmpty())
  2034.             mapJSON.put ("cusip", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2035.         else
  2036.             mapJSON.put ("cusip", _strCUSIP);

  2037.         if (null == _strBBGID || _strBBGID.isEmpty())
  2038.             mapJSON.put ("bbgid", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2039.         else
  2040.             mapJSON.put ("bbgid", _strBBGID);

  2041.         if (null == _strIssuerCategory || _strIssuerCategory.isEmpty())
  2042.             mapJSON.put ("issuercategory", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2043.         else
  2044.             mapJSON.put ("issuercategory", _strIssuerCategory);

  2045.         if (null == _strTicker || _strTicker.isEmpty())
  2046.             mapJSON.put ("ticker", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2047.         else
  2048.             mapJSON.put ("ticker", _strTicker);

  2049.         if (null == _strSeries || _strSeries.isEmpty())
  2050.             mapJSON.put ("series", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2051.         else
  2052.             mapJSON.put ("series", _strSeries);

  2053.         if (null == _strName || _strName.isEmpty())
  2054.             mapJSON.put ("name", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2055.         else
  2056.             mapJSON.put ("name", _strName);

  2057.         if (null == _strShortName || _strShortName.isEmpty())
  2058.             mapJSON.put ("shortname", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2059.         else
  2060.             mapJSON.put ("shortname", _strShortName);

  2061.         if (null == _strIssuerIndustry || _strIssuerIndustry.isEmpty())
  2062.             mapJSON.put ("issuerindustry", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2063.         else
  2064.             mapJSON.put ("issuerindustry", _strIssuerIndustry);

  2065.         if (null == _strCouponType || _strCouponType.isEmpty())
  2066.             mapJSON.put ("coupontype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2067.         else
  2068.             mapJSON.put ("coupontype", _strCouponType);

  2069.         if (null == _strMaturityType || _strMaturityType.isEmpty())
  2070.             mapJSON.put ("maturitytype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2071.         else
  2072.             mapJSON.put ("maturitytype", _strMaturityType);

  2073.         if (null == _strCalculationType || _strCalculationType.isEmpty())
  2074.             mapJSON.put ("calculationtype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2075.         else
  2076.             mapJSON.put ("calculationtype", _strCalculationType);

  2077.         if (null == _strDayCountCode || _strDayCountCode.isEmpty())
  2078.             mapJSON.put ("daycountcode", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2079.         else
  2080.             mapJSON.put ("daycountcode", _strDayCountCode);

  2081.         if (null == _strMarketIssueType || _strMarketIssueType.isEmpty())
  2082.             mapJSON.put ("marketissuetype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2083.         else
  2084.             mapJSON.put ("marketissuetype", _strMarketIssueType);

  2085.         if (null == _strIssueCountryCode || _strIssueCountryCode.isEmpty())
  2086.             mapJSON.put ("issuecountrycode", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2087.         else
  2088.             mapJSON.put ("issuecountrycode", _strIssueCountryCode);

  2089.         if (null == _strIssueCountry || _strIssueCountry.isEmpty())
  2090.             mapJSON.put ("issuecountry", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2091.         else
  2092.             mapJSON.put ("issuecountry", _strIssueCountry);

  2093.         if (null == _strCollateralType || _strCollateralType.isEmpty())
  2094.             mapJSON.put ("collateraltype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2095.         else
  2096.             mapJSON.put ("collateraltype", _strCollateralType);

  2097.         mapJSON.put ("issueamount", "" + _dblIssueAmount);

  2098.         mapJSON.put ("outstandingamount", "" + _dblOutstandingAmount);

  2099.         mapJSON.put ("minimumpiece", "" + _dblMinimumPiece);

  2100.         mapJSON.put ("minimumincrement", "" + _dblMinimumIncrement);

  2101.         mapJSON.put ("paramount", "" + _dblParAmount);

  2102.         if (null == _strLeadManager || _strLeadManager.isEmpty())
  2103.             mapJSON.put ("leadmanager", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2104.         else
  2105.             mapJSON.put ("leadmanager", _strLeadManager);

  2106.         if (null == _strExchangeCode || _strExchangeCode.isEmpty())
  2107.             mapJSON.put ("exchangecode", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2108.         else
  2109.             mapJSON.put ("exchangecode", _strExchangeCode);

  2110.         mapJSON.put ("redemptionvalue", "" + _dblRedemptionValue);

  2111.         if (null == _dtAnnounce)
  2112.             mapJSON.put ("announcedate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2113.         else
  2114.             mapJSON.put ("announcedate", _dtAnnounce.toYYYYMMDD ("-"));

  2115.         if (null == _dtFirstSettle)
  2116.             mapJSON.put ("firstsettledate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2117.         else
  2118.             mapJSON.put ("firstsettledate", _dtFirstSettle.toYYYYMMDD ("-"));

  2119.         if (null == _dtFirstCoupon)
  2120.             mapJSON.put ("firstcoupondate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2121.         else
  2122.             mapJSON.put ("firstcoupondate", _dtFirstCoupon.toYYYYMMDD ("-"));

  2123.         if (null == _dtInterestAccrualStart)
  2124.             mapJSON.put ("interestaccrualstartdate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2125.         else
  2126.             mapJSON.put ("interestaccrualstartdate", _dtInterestAccrualStart.toYYYYMMDD ("-"));

  2127.         if (null == _dtIssue)
  2128.             mapJSON.put ("issuedate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2129.         else
  2130.             mapJSON.put ("issuedate", _dtIssue.toYYYYMMDD ("-"));

  2131.         if (null == _dtNextCouponDate)
  2132.             mapJSON.put ("nextcoupondate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2133.         else
  2134.             mapJSON.put ("nextcoupondate", _dtNextCouponDate.toYYYYMMDD ("-"));

  2135.         mapJSON.put ("iscallable", "" + _bIsCallable);

  2136.         mapJSON.put ("isputable", "" + _bIsPutable);

  2137.         mapJSON.put ("issinkable", "" + _bIsSinkable);

  2138.         if (null == _strBBGParent || _strBBGParent.isEmpty())
  2139.             mapJSON.put ("bbgparent", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2140.         else
  2141.             mapJSON.put ("bbgparent", _strBBGParent);

  2142.         if (null == _strCountryOfIncorporation || _strCountryOfIncorporation.isEmpty())
  2143.             mapJSON.put ("countryofincorporation", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2144.         else
  2145.             mapJSON.put ("countryofincorporation", _strCountryOfIncorporation);

  2146.         if (null == _strIndustrySector || _strIndustrySector.isEmpty())
  2147.             mapJSON.put ("industrysector", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2148.         else
  2149.             mapJSON.put ("industrysector", _strIndustrySector);

  2150.         if (null == _strIndustryGroup || _strIndustryGroup.isEmpty())
  2151.             mapJSON.put ("industrygroup", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2152.         else
  2153.             mapJSON.put ("industrygroup", _strIndustryGroup);

  2154.         if (null == _strIndustrySubgroup || _strIndustrySubgroup.isEmpty())
  2155.             mapJSON.put ("industrysubgroup", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2156.         else
  2157.             mapJSON.put ("industrysubgroup", _strIndustrySubgroup);

  2158.         if (null == _strCountryOfGuarantor || _strCountryOfGuarantor.isEmpty())
  2159.             mapJSON.put ("countryofguarantor", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2160.         else
  2161.             mapJSON.put ("countryofguarantor", _strCountryOfGuarantor);

  2162.         if (null == _strCountryOfDomicile || _strCountryOfDomicile.isEmpty())
  2163.             mapJSON.put ("countryofdomicile", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2164.         else
  2165.             mapJSON.put ("countryofdomicile", _strCountryOfDomicile);

  2166.         if (null == _strDescription || _strDescription.isEmpty())
  2167.             mapJSON.put ("description", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2168.         else
  2169.             mapJSON.put ("description", _strDescription);

  2170.         if (null == _strSecurityType || _strSecurityType.isEmpty())
  2171.             mapJSON.put ("securitytype", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2172.         else
  2173.             mapJSON.put ("securitytype", _strSecurityType);

  2174.         if (null == _dtPrevCouponDate)
  2175.             mapJSON.put ("prevcoupondate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2176.         else
  2177.             mapJSON.put ("prevcoupondate", _dtPrevCouponDate.toYYYYMMDD ("-"));

  2178.         if (null == _strBBGUniqueID || _strBBGUniqueID.isEmpty())
  2179.             mapJSON.put ("bbguniqueid", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2180.         else
  2181.             mapJSON.put ("bbguniqueid", _strBBGUniqueID);

  2182.         if (null == _strLongCompanyName || _strLongCompanyName.isEmpty())
  2183.             mapJSON.put ("longcompanyname", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2184.         else
  2185.             mapJSON.put ("longcompanyname", _strLongCompanyName);

  2186.         mapJSON.put ("isstructurednote", "" + _bIsStructuredNote);

  2187.         mapJSON.put ("isunittraded", "" + _bIsUnitTraded);

  2188.         mapJSON.put ("isreversibleconvertible", "" + _bIsReversibleConvertible);

  2189.         if (null == _strRedemptionCurrency || _strRedemptionCurrency.isEmpty())
  2190.             mapJSON.put ("redemptioncurrency", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2191.         else
  2192.             mapJSON.put ("redemptioncurrency", _strRedemptionCurrency);

  2193.         if (null == _strCouponCurrency || _strCouponCurrency.isEmpty())
  2194.             mapJSON.put ("couponcurrency", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2195.         else
  2196.             mapJSON.put ("couponcurrency", _strCouponCurrency);

  2197.         if (null == _strTradeCurrency || _strTradeCurrency.isEmpty())
  2198.             mapJSON.put ("tradecurrency", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2199.         else
  2200.             mapJSON.put ("tradecurrency", _strTradeCurrency);

  2201.         mapJSON.put ("isbearer", "" + _bIsBearer);

  2202.         mapJSON.put ("isregistered", "" + _bIsRegistered);

  2203.         mapJSON.put ("hasbeencalled", "" + _bHasBeenCalled);

  2204.         if (null == _strIssuer || _strIssuer.isEmpty())
  2205.             mapJSON.put ("issuer", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2206.         else
  2207.             mapJSON.put ("issuer", _strIssuer);

  2208.         if (null == _dtPenultimateCouponDate)
  2209.             mapJSON.put ("penultimatecoupondate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2210.         else
  2211.             mapJSON.put ("penultimatecoupondate", _dtPenultimateCouponDate.toYYYYMMDD ("-"));

  2212.         if (null == _strFloatCouponConvention || _strFloatCouponConvention.isEmpty())
  2213.             mapJSON.put ("floatcouponconvention", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2214.         else
  2215.             mapJSON.put ("floatcouponconvention", _strFloatCouponConvention);

  2216.         mapJSON.put ("currentcoupon", "" + _dblCurrentCoupon);

  2217.         mapJSON.put ("isfloater", "" + _bIsFloater);

  2218.         mapJSON.put ("tradestatus", "" + _bTradeStatus);

  2219.         if (null == _strCDRCountryCode || _strCDRCountryCode.isEmpty())
  2220.             mapJSON.put ("cdrcountrycode", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2221.         else
  2222.             mapJSON.put ("cdrcountrycode", _strCDRCountryCode);

  2223.         if (null == _strCDRSettleCode || _strCDRSettleCode.isEmpty())
  2224.             mapJSON.put ("cdrsettlecode", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2225.         else
  2226.             mapJSON.put ("cdrsettlecode", _strCDRSettleCode);

  2227.         if (null == _dtFinalMaturity)
  2228.             mapJSON.put ("finalmaturitydate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2229.         else
  2230.             mapJSON.put ("finalmaturitydate", _dtFinalMaturity.toYYYYMMDD ("-"));

  2231.         mapJSON.put ("isprivateplacement", "" + _bIsPrivatePlacement);

  2232.         mapJSON.put ("isperpetual", "" + _bIsPerpetual);

  2233.         mapJSON.put ("isdefaulted", "" + _bIsDefaulted);

  2234.         mapJSON.put ("floatspread", "" + _dblFloatSpread);

  2235.         if (null == _strRateIndex || _strRateIndex.isEmpty())
  2236.             mapJSON.put ("rateindex", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2237.         else
  2238.             mapJSON.put ("rateindex", _strRateIndex);

  2239.         if (null == _strMoody || _strMoody.isEmpty())
  2240.             mapJSON.put ("moody", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2241.         else
  2242.             mapJSON.put ("moody", _strMoody);

  2243.         if (null == _strSnP || _strSnP.isEmpty())
  2244.             mapJSON.put ("snp", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2245.         else
  2246.             mapJSON.put ("snp", _strSnP);

  2247.         if (null == _strFitch || _strFitch.isEmpty())
  2248.             mapJSON.put ("fitch", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2249.         else
  2250.             mapJSON.put ("fitch", _strFitch);

  2251.         if (null == _strSnrSub || _strSnrSub.isEmpty())
  2252.             mapJSON.put ("snrsub", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2253.         else
  2254.             mapJSON.put ("snrsub", _strSnrSub);

  2255.         if (null == _strIssuerSPN || _strIssuerSPN.isEmpty())
  2256.             mapJSON.put ("issuerspn", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2257.         else
  2258.             mapJSON.put ("issuerspn", _strIssuerSPN);

  2259.         mapJSON.put ("issueprice", "" + _dblIssuePrice);

  2260.         mapJSON.put ("coupon", "" + _dblCoupon);

  2261.         if (null == _dtMaturity)
  2262.             mapJSON.put ("maturitydate", org.drip.numerical.common.StringUtil.NULL_SER_STRING);
  2263.         else
  2264.             mapJSON.put ("maturitydate", _dtMaturity.toYYYYMMDD ("-"));

  2265.         return mapJSON;
  2266.     }
  2267. }