if(!optionEvent.getUnderlyingInstrument().equals(getUnderlyingInstrument())) { WRONG_UNDERLYING_FOR_OPTION_CHAIN.warn(OptionChain.class, optionEvent.getUnderlyingInstrument(), getUnderlyingInstrument()); return false;
call = new OptionContract(inOptionEvent.getUnderlyingInstrument(), inOptionEvent.getInstrument(), inOptionEvent.getInstrument().getType(), put = new OptionContract(inOptionEvent.getUnderlyingInstrument(), inOptionEvent.getInstrument(), inOptionEvent.getInstrument().getType(),
/** * Builds an <code>OptionBean</code> based on the values of * the given event. * * @param inOptionEvent an <code>OptionEvent</code> value * @return an <code>OptionBean</code> value */ public static OptionBean getOptionBeanFromEvent(OptionEvent inOptionEvent) { OptionBean option = new OptionBean(); option.setExpirationType(inOptionEvent.getExpirationType()); option.setHasDeliverable(inOptionEvent.hasDeliverable()); option.setInstrument(inOptionEvent.getInstrument()); option.setMultiplier(inOptionEvent.getMultiplier()); option.setUnderlyingInstrument(inOptionEvent.getUnderlyingInstrument()); option.setProviderSymbol(inOptionEvent.getProviderSymbol()); return option; } /**
ExchangeRequestBuilder topOfBookRequestBuilder = ExchangeRequestBuilder.newRequest().withInstrument(quoteEvent.getInstrument()); if(quoteEvent instanceof OptionEvent) { topOfBookRequestBuilder.withUnderlyingInstrument(((OptionEvent)quoteEvent).getUnderlyingInstrument());