//-------------------------------------------------------------------------
        // Check market data computation
        public virtual void market_data()
        {
            RatesCurveGroupDefinition group             = GROUPS_SYN_EUR;
            RatesProvider             multicurveTsLarge = MULTICURVE_INPUT_EUR_TSEMPTY.toBuilder().timeSeries(TS_LARGE).build();
            MarketData madTsEmpty = CALIBRATOR_SYNTHETIC.marketData(group, MULTICURVE_INPUT_EUR_TSEMPTY, REF_DATA);
            MarketData madTsLarge = CALIBRATOR_SYNTHETIC.marketData(group, multicurveTsLarge, REF_DATA);

            assertEquals(madTsEmpty.ValuationDate, VALUATION_DATE);
            foreach (CurveDefinition entry in group.CurveDefinitions)
            {
                ImmutableList <CurveNode> nodes = entry.Nodes;
                foreach (CurveNode node in nodes)
                {
                    ResolvedTrade tradeTsEmpty = node.resolvedTrade(1d, madTsEmpty, REF_DATA);
                    double        mqTsEmpty    = MQ_MEASURES.value(tradeTsEmpty, MULTICURVE_INPUT_EUR_TSEMPTY);
                    assertEquals(mqTsEmpty, (double?)madTsEmpty.getValue(node.requirements().GetEnumerator().next()), TOLERANCE_MQ);
                    ResolvedTrade tradeTsLarge = node.resolvedTrade(1d, madTsLarge, REF_DATA);
                    double        mqTsLarge    = MQ_MEASURES.value(tradeTsLarge, multicurveTsLarge);
                    assertEquals(mqTsLarge, (double?)madTsLarge.getValue(node.requirements().GetEnumerator().next()), TOLERANCE_MQ);
                    // Market Quote for Fixed v ibor swaps should have changed with the fixing
                    if ((tradeTsLarge is ResolvedSwapTrade) && (((ResolvedSwapTrade)tradeTsLarge)).Product.getLegs(SwapLegType.IBOR).size() == 1)
                    {
                        assertTrue(Math.Abs(mqTsEmpty - mqTsLarge) > TOLERANCE_MQ);
                    }
                }
            }
            assertEquals(madTsEmpty.TimeSeriesIds, ImmutableSet.of());
            assertEquals(madTsLarge.TimeSeriesIds, ImmutableSet.of(IndexQuoteId.of(EUR_EURIBOR_3M), IndexQuoteId.of(EUR_EURIBOR_6M)));
        }
        // Check synthetic calibration in the case of existing time-series with fixing on the valuation date
        public virtual void calibrate_ts_vd()
        {
            SyntheticRatesCurveCalibrator calibratorDefault = SyntheticRatesCurveCalibrator.standard();
            MarketData    mad           = calibratorDefault.marketData(GROUPS_SYN_EUR, MULTICURVE_INPUT_EUR_TSLARGE, REF_DATA);
            RatesProvider multicurveSyn = CALIBRATOR_SYNTHETIC.calibrate(GROUPS_SYN_EUR, MULTICURVE_INPUT_EUR_TSLARGE, REF_DATA);

            foreach (CurveDefinition entry in GROUPS_SYN_EUR.CurveDefinitions)
            {
                ImmutableList <CurveNode> nodes = entry.Nodes;
                foreach (CurveNode node in nodes)
                {
                    ResolvedTrade trade = node.resolvedTrade(1d, mad, REF_DATA);
                    double        mqIn  = MQ_MEASURES.value(trade, MULTICURVE_INPUT_EUR_TSLARGE);
                    double        mqSy  = MQ_MEASURES.value(trade, multicurveSyn);
                    assertEquals(mqIn, mqSy, TOLERANCE_MQ);
                }
            }
        }