class RawOptionData implements ImmutableBean, Serializable {

  public static RawOptionData of(
      List<Period> expiries,
      DoubleArray strikes,
      ValueType strikeType,
      DoubleMatrix data,
      ValueType dataType) {

    ArgChecker.isTrue(expiries.size() == data.rowCount(),
        "expiries list should be of the same size as the external data dimension");
    for (int i = 0; i < expiries.size(); i++) {
      ArgChecker.isTrue(strikes.size() == data.columnCount(),
          "strikes should be of the same size as the inner data dimension");
    }
    return new RawOptionData(expiries, strikes, strikeType, data, null, dataType, 0.0);
  }

  private  RawOptionData(
      List<Period> expiries,
      DoubleArray strikes,
      ValueType strikeType,
      DoubleMatrix data,
      DoubleMatrix error,
      ValueType dataType,
      Double shift);

}