Package com.opengamma.financial.security.future

Examples of com.opengamma.financial.security.future.BondFutureSecurity.accept()


  @Override
  public Set<ComputedValue> execute(final FunctionExecutionContext executionContext, final FunctionInputs inputs, final ComputationTarget target, final Set<ValueRequirement> desiredValues) {
    final ZonedDateTime date = ZonedDateTime.now(executionContext.getValuationClock());
    final ValueRequirement desiredValue = Iterables.getOnlyElement(desiredValues);
    final BondFutureSecurity security = (BondFutureSecurity) target.getSecurity();
    final BondFutureDefinition definition = (BondFutureDefinition) security.accept(_visitor);
    final Double referencePrice = 0.0; // TODO Futures Refactor
    final String[] curveNames = getCurveNames(desiredValue);
    final BondFuture bondFuture = definition.toDerivative(date, referencePrice, curveNames);
    return calculate(security, bondFuture, getData(desiredValue, inputs, target), target);
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.