コード例 #1
0
  @Override
  public java.util.List<org.drip.analytics.cashflow.CompositePeriod> couponPeriods() {
    java.util.List<org.drip.analytics.cashflow.CompositePeriod> lsCP =
        new java.util.ArrayList<org.drip.analytics.cashflow.CompositePeriod>();

    if (null != _aCompFixedStream && 0 != _aCompFixedStream.length) {
      for (org.drip.product.rates.Stream fixedStream : _aCompFixedStream)
        lsCP.addAll(fixedStream.cashFlowPeriod());
    }

    if (null != _aCompFloatStream && 0 != _aCompFloatStream.length) {
      for (org.drip.product.rates.Stream floatStream : _aCompFloatStream)
        lsCP.addAll(floatStream.cashFlowPeriod());
    }

    return lsCP;
  }
コード例 #2
0
  @Override
  public org.drip.state.identifier.CreditLabel creditLabel() {
    if (null != _aCompFixedStream && 0 != _aCompFixedStream.length) {
      for (org.drip.product.rates.Stream fixedStream : _aCompFixedStream) {
        org.drip.state.identifier.CreditLabel creditLabel = fixedStream.creditLabel();

        if (null != creditLabel) return creditLabel;
      }
    }

    if (null != _aCompFloatStream && 0 != _aCompFloatStream.length) {
      for (org.drip.product.rates.Stream floatStream : _aCompFloatStream) {
        org.drip.state.identifier.CreditLabel creditLabel = floatStream.creditLabel();

        if (null != creditLabel) return creditLabel;
      }
    }

    return null;
  }
コード例 #3
0
  @Override
  public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> value(
      final org.drip.param.valuation.ValuationParams valParams,
      final org.drip.param.pricer.CreditPricerParams pricerParams,
      final org.drip.param.market.CurveSurfaceQuoteSet csqs,
      final org.drip.param.valuation.ValuationCustomizationParams quotingParams) {
    long lStart = System.nanoTime();

    org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapResult =
        new org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double>();

    if (null != _aCompFixedStream && 0 != _aCompFixedStream.length) {
      for (org.drip.product.rates.Stream fixedStream : _aCompFixedStream) {
        org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFixedStreamResult =
            fixedStream.value(valParams, pricerParams, csqs, quotingParams);

        if (!org.drip.analytics.support.AnalyticsHelper.AccumulateMeasures(
            mapResult, fixedStream.name(), mapFixedStreamResult)) return null;
      }
    }

    if (null != _aCompFloatStream && 0 != _aCompFloatStream.length) {
      for (org.drip.product.rates.Stream floatStream : _aCompFloatStream) {
        org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapFixedStreamResult =
            floatStream.value(valParams, pricerParams, csqs, quotingParams);

        if (!org.drip.analytics.support.AnalyticsHelper.AccumulateMeasures(
            mapResult, floatStream.name(), mapFixedStreamResult)) return null;
      }
    }

    mapResult.put("CalcTime", (System.nanoTime() - lStart) * 1.e-09);

    return mapResult;
  }