Package it.unimi.dsi.fastutil.doubles

Examples of it.unimi.dsi.fastutil.doubles.DoubleList.toDoubleArray()


        } else {
          s_logger.error("Value was null when getting required input data " + factor.getExposureExternalId());
        }
      }
    }
    final StringLabelledMatrix1D labelledMatrix = new StringLabelledMatrix1D(indices.toArray(new String[] {}), labels.toArray(), values.toDoubleArray());
    final ValueSpecification valueSpecification = new ValueSpecification(CREDIT_SENSITIVITIES_REQUIREMENT, target.toSpecification(), createCurrencyValueProperties(target).get());
    return Collections.singleton(new ComputedValue(valueSpecification, labelledMatrix));
  }

  private List<FactorExposureData> decodeSensitivities(final SecuritySource secSource, final RawSecurity rawSecurity) {
View Full Code Here


      }
      if (availableVols.size() == 0) {
        throw new OpenGammaRuntimeException("No volatility values found for expiry " + expiries[i]);
      }
      fullStrikes[i] = availableStrikes.toDoubleArray();
      fullValues[i] = availableVols.toDoubleArray();
    }
    return Pair.of(fullStrikes, fullValues);
  }

  public static Triple<double[], double[][], double[][]> getStrikesAndValues(final double[] expiries, final double[] strikes, final VolatilitySurfaceData<Object, Object> volatilitySurface,
View Full Code Here

      if (availableVols.size() == 0) {
        throw new OpenGammaRuntimeException("No volatility values found for expiry " + expiries[i]);
      } else if (availableVols.size() >= minNumberOfStrikes) {
        availableExpiries.add(expiries[i]);
        fullStrikes.add(availableStrikes.toDoubleArray());
        fullValues.add(availableVols.toDoubleArray());
      }
    }
    return new Triple<>(availableExpiries.toDoubleArray(), fullStrikes.toArray(new double[0][]), fullValues.toArray(new double[0][]));
  }
View Full Code Here

          availableStrikes.add((Double) strikeValues[j]);
          availableVols.add(vol);
        }
      }
      strikes[i] = availableStrikes.toDoubleArray();
      values[i] = availableVols.toDoubleArray();
    }
    return new Triple<>(getArrayOfDoubles(expiries), strikes, values);
  }

  public static SmileSurfaceDataBundle getDataFromStandardQuotes(final ForwardCurve forwardCurve, final VolatilitySurfaceData<Object, Object> volatilitySurface) {
View Full Code Here

        } else {
          s_logger.error("Value was null when getting required input data " + factor.getExposureExternalId());
        }
      }
    }
    final StringLabelledMatrix1D labelledMatrix = new StringLabelledMatrix1D(indices.toArray(new String[] {}), labels.toArray(), values.toDoubleArray());
    final ValueSpecification valueSpecification = new ValueSpecification(EXTERNAL_SENSITIVITIES_REQUIREMENT, target.toSpecification(), createCurrencyValueProperties(target).get());
    return Collections.singleton(new ComputedValue(valueSpecification, labelledMatrix));
  }

  private List<FactorExposureData> decodeSensitivities(final SecuritySource secSource, final RawSecurity rawSecurity) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.