Beispiel #1
0
        //Constructor
        public Index_Pricing()
        {
            //User Input of Trade Date
            TRADE_DATE = new DateTime(2014, 2, 13);
            NOTIONAL   = 1.0e6;

            //Contract Detail
            Read_Contract();

            //Index Market Data
            PRICES     = CDSIndexProvider.CDX_NA_HY_20140213_PRICES;
            PILLAR_PUF = new PointsUpFront[PRICES.Length];

            //Build the Interest Rate Curve
            Build_yield_curve(TRADE_DATE);

            //Read constituent features, build credit curves
            Build_credit_curves(TRADE_DATE);

            //Build Index data bundle
            INTRINSIC_DATA = new IntrinsicIndexDataBundle(CREDIT_CURVES, RECOVERY_RATES);

            //Create CDX class
            CdsAnalyticFactory FACTORY = new CdsAnalyticFactory(INDEX_RECOVERY);

            CDX = FACTORY.makeCdx(TRADE_DATE, CDSIndexProvider.INDEX_TENORS);
        }
Beispiel #2
0
        public CDXTest()
        {
            int a = 1;
            CdsAnalyticFactory FACTORY = new CdsAnalyticFactory(INDEX_RECOVERY);

            CDX = FACTORY.makeCdx(TRADE_DATE, CDSIndexProvider.INDEX_TENORS);
        }
        public Index_Pricing_725()
        {
            TRADE_DATE = new DateTime(2016, 7, 25);
            NOTIONAL   = 1.0e6;

            //Contract Detail
            Read_Contract();

            //Index Market Data
            PRICES     = CDSIndexProvider.CDX_NA_HY_20160725_PRICES;
            PILLAR_PUF = new PointsUpFront[PRICES.Length];

            //Build the Interest Rate Curve
            Build_yield_curve(TRADE_DATE);

            //Read constituent features, build credit curves
            Build_credit_curves(TRADE_DATE);

            //Build Index data bundle
            INTRINSIC_DATA = new IntrinsicIndexDataBundle(CREDIT_CURVES, RECOVERY_RATES);

            weights_ = new double[component_num];
            weights_ = Enumerable.Repeat((double)1.0 / component_num, component_num).ToArray();
            INTRINSIC_DATA._weights = weights_;
            //Create CDX class
            CdsAnalyticFactory FACTORY = new CdsAnalyticFactory(INDEX_RECOVERY);

            int[] CDX_Tenor = new int[] { 12, 24, 36, 60, 84, 120 };
            CDX = FACTORY.makeCdx(TRADE_DATE, CDX_Tenor);
        }