private static final String GRID_VOMMA_FIELD = "gridVommaField";
@Override
public PDEResultCollection buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
final double[] strikes = deserializer.fieldValueToObject(double[].class, message.getByName(STRIKES_FIELD));
final PDEResultCollection result = new PDEResultCollection(strikes);
if (message.getByName(GRID_IMPLIED_VOLS_FIELD) != null) {
final double[] impliedVol = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_IMPLIED_VOLS_FIELD));
result.put(PDEResultCollection.GRID_IMPLIED_VOL, impliedVol);
}
//DEBUG trying to get a new number out
if (message.getByName(GRID_FOREX_PV_QUOTES_FIELD) != null) {
final double[] domesticAbsolute = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_FOREX_PV_QUOTES_FIELD));
result.put(PDEResultCollection.GRID_DOMESTIC_PV_QUOTE, domesticAbsolute);
}
if (message.getByName(GRID_PRICE_FIELD) != null) {
final double[] price = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_PRICE_FIELD));
result.put(PDEResultCollection.GRID_PRICE, price);
}
if (message.getByName(GRID_BLACK_PRICE_FIELD) != null) {
final double[] price = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_PRICE_FIELD));
result.put(PDEResultCollection.GRID_BLACK_PRICE, price);
}
if (message.getByName(GRID_BLACK_DELTA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_DELTA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_DELTA, greek);
}
if (message.getByName(GRID_BLACK_DUAL_DELTA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_DUAL_DELTA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_DUAL_DELTA, greek);
}
if (message.getByName(GRID_BLACK_GAMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_GAMMA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_GAMMA, greek);
}
if (message.getByName(GRID_BLACK_DUAL_GAMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_DUAL_GAMMA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_DUAL_GAMMA, greek);
}
if (message.getByName(GRID_BLACK_VEGA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_VEGA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_VEGA, greek);
}
if (message.getByName(GRID_BLACK_VANNA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_VANNA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_VANNA, greek);
}
if (message.getByName(GRID_BLACK_VOMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_BLACK_VOMMA_FIELD));
result.put(PDEResultCollection.GRID_BLACK_VOMMA, greek);
}
if (message.getByName(GRID_DELTA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_DELTA_FIELD));
result.put(PDEResultCollection.GRID_DELTA, greek);
}
if (message.getByName(GRID_DUAL_DELTA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_DUAL_DELTA_FIELD));
result.put(PDEResultCollection.GRID_DUAL_DELTA, greek);
}
if (message.getByName(GRID_GAMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_GAMMA_FIELD));
result.put(PDEResultCollection.GRID_GAMMA, greek);
}
if (message.getByName(GRID_DUAL_GAMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_DUAL_GAMMA_FIELD));
result.put(PDEResultCollection.GRID_DUAL_GAMMA, greek);
}
if (message.getByName(GRID_VEGA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_VEGA_FIELD));
result.put(PDEResultCollection.GRID_VEGA, greek);
}
if (message.getByName(GRID_VANNA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_VANNA_FIELD));
result.put(PDEResultCollection.GRID_VANNA, greek);
}
if (message.getByName(GRID_VOMMA_FIELD) != null) {
final double[] greek = deserializer.fieldValueToObject(double[].class, message.getByName(GRID_VOMMA_FIELD));
result.put(PDEResultCollection.GRID_VOMMA, greek);
}
return result;
}