Package com.opengamma.financial.analytics

Examples of com.opengamma.financial.analytics.DoubleLabelledMatrix3D


    }

    @Override
    protected DoubleLabelledMatrix3D createMatrix(final Double[] xKeys, final Object[] xLabels, final Double[] yKeys, final Object[] yLabels, final Double[] zKeys, final Object[] zLabels,
        final double[][][] values) {
      return new DoubleLabelledMatrix3D(xKeys, xLabels, yKeys, yLabels, zKeys, zLabels, values);
    }
View Full Code Here


  @Test
  public void testDouble() {
    final Double[] X_KEYS = new Double[] {1., 2., 3., 4., 5. };
    final Double[] Y_KEYS = new Double[] {1., 2., 3., 4. };
    final Double[] Z_KEYS = new Double[] {1., 2., 3. };
    final DoubleLabelledMatrix3D matrix = new DoubleLabelledMatrix3D(X_KEYS, X_LABELS, Y_KEYS, Y_LABELS, Z_KEYS, Z_LABELS, VALUES);
    assertEquals(matrix, cycleObject(DoubleLabelledMatrix3D.class, matrix));
  }
View Full Code Here

    final Interpolator1D xInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(xInterpolatorName, xLeftExtrapolatorName, xRightExtrapolatorName);
    final Interpolator1D yInterpolator = CombinedInterpolatorExtrapolatorFactory.getInterpolator(yInterpolatorName, yLeftExtrapolatorName, yRightExtrapolatorName);
    final GridInterpolator2D nodeSensitivityCalculator = new GridInterpolator2D(xInterpolator, yInterpolator);
    final Map<Double, DoubleMatrix2D> result = SABRVegaCalculationUtils.getVegaCube(alpha, rho, nu, alphaDataBundle, rhoDataBundle, nuDataBundle, inverseJacobians, expiryMaturity,
        nodeSensitivityCalculator);
    final DoubleLabelledMatrix3D labelledMatrix = VegaMatrixUtils.getVegaSwaptionCubeQuoteMatrix(fittedDataPoints.getFittedPoints(), result);
    final ValueProperties properties = getResultProperties(createValueProperties().get(), currency.getCode(), desiredValue);
    final ValueSpecification spec = new ValueSpecification(getValueRequirement(), target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, labelledMatrix));
  }
View Full Code Here

    final Tenor[] zLabels = zLabelsList.toArray(new Tenor[zLabelsList.size()]);
    final double[][][] values = new double[zKeys.length][xKeys.length][yKeys.length];
    for (int i = 0; i < zKeys.length; i++) {
      values[i] = matrices.get(zKeys[i]).toArray();
    }
    return new DoubleLabelledMatrix3D(xKeys, xLabels, yKeys, yLabels, zKeys, zLabels, values);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.DoubleLabelledMatrix3D

Copyright © 2018 www.massapicom. 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.