@Override public MoneynessPiecewiseSABRSurfaceFitter buildObject( final FudgeDeserializer deserializer, final FudgeMsg message) { final boolean useLogTime = message.getBoolean(TIME_FIELD_NAME); final boolean useIntegratedVar = message.getBoolean(SPACE_FIELD_NAME); final double lambda = message.getDouble(LAMBDA_FIELD_NAME); return new MoneynessPiecewiseSABRSurfaceFitter(useLogTime, useIntegratedVar, lambda); }
public static void fromFudgeMsg( FudgeDeserializer deserializer, FudgeMsg msg, EquitySecurity object) { FinancialSecurityFudgeBuilder.fromFudgeMsg(deserializer, msg, object); object.setShortName(msg.getString(SHORT_NAME_FIELD_NAME)); object.setExchange(msg.getString(EXCHANGE_FIELD_NAME)); object.setExchangeCode(msg.getString(EXCHANGE_CODE_FIELD_NAME)); object.setCompanyName(msg.getString(COMPANY_NAME_FIELD_NAME)); object.setCurrency(msg.getValue(Currency.class, CURRENCY_FIELD_NAME)); object.setGicsCode(msg.getValue(GICSCode.class, GICS_CODE_FIELD_NAME)); object.setPreferred(BooleanUtils.isTrue(msg.getBoolean(PREFERRED_FIELD_NAME))); }
@Override public IborIndex buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) { final Currency currency = Currency.of(message.getString(CURRENCY_FIELD)); final int spotLag = message.getInt(SPOT_LAG_FIELD); final DayCount dayCount = DayCountFactory.INSTANCE.getDayCount(message.getString(DAY_COUNT_FIELD)); final BusinessDayConvention businessDayConvention = BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention( message.getString(BUSINESS_DAY_CONVENTION_FIELD)); final boolean isEOM = message.getBoolean(EOM_FIELD); final Period tenor = Period.parse(message.getString(TENOR_FIELD)); final String name = message.getString(NAME_FIELD); return new IborIndex(currency, tenor, spotLag, dayCount, businessDayConvention, isEOM, name); }
public static void fromFudgeMsg( FudgeDeserializer deserializer, FudgeMsg msg, FXOptionSecurity object) { FinancialSecurityFudgeBuilder.fromFudgeMsg(deserializer, msg, object); object.setPutCurrency(msg.getValue(Currency.class, PUT_CURRENCY_FIELD_NAME)); object.setCallCurrency(msg.getValue(Currency.class, CALL_CURRENCY_FIELD_NAME)); object.setPutAmount(msg.getDouble(PUT_AMOUNT_FIELD_NAME)); object.setCallAmount(msg.getDouble(CALL_AMOUNT_FIELD_NAME)); object.setExpiry( ExpiryFudgeBuilder.fromFudgeMsg(deserializer, msg.getMessage(EXPIRY_FIELD_NAME))); object.setSettlementDate( ZonedDateTimeFudgeBuilder.fromFudgeMsg( deserializer, msg.getMessage(SETTLEMENT_DATE_FIELD_NAME))); object.setLongShort(LongShort.ofLong(msg.getBoolean(IS_LONG_FIELD_NAME))); }
@Override public StandardSmileSurfaceDataBundle buildObject( final FudgeDeserializer deserializer, final FudgeMsg message) { final ForwardCurve forwardCurve = deserializer.fieldValueToObject( ForwardCurve.class, message.getByName(FORWARD_CURVE_FIELD_NAME)); final double[] expiries = deserializer.fieldValueToObject(double[].class, message.getByName(EXPIRIES_FIELD_NAME)); final double[][] strikes = deserializer.fieldValueToObject(double[][].class, message.getByName(STRIKES_FIELD_NAME)); final double[][] vols = deserializer.fieldValueToObject(double[][].class, message.getByName(VOLS_FIELD_NAME)); final boolean isCallData = message.getBoolean(IS_CALL_FIELD_NAME); return new StandardSmileSurfaceDataBundle(forwardCurve, expiries, strikes, vols, isCallData); }