public virtual void setupArguments(IPricingEngineArguments a) { OneAssetOption.Arguments args = a as OneAssetOption.Arguments; Utils.QL_REQUIRE(args != null, () => "incorrect argument type"); exerciseDate_ = args.exercise.lastDate(); payoff_ = args.payoff; }
public virtual void setupArguments(IPricingEngineArguments a) { OneAssetOption.Arguments args = a as OneAssetOption.Arguments; if (args == null) { throw new ApplicationException("incorrect argument type"); } exerciseDate_ = args.exercise.lastDate(); payoff_ = args.payoff; }
public virtual void setupArguments(IPricingEngineArguments a) { OneAssetOption.Arguments args = a as OneAssetOption.Arguments; if (args == null) { throw new ApplicationException("incorrect argument type"); } exerciseDate_ = args.exercise.lastDate(); payoff_ = args.payoff; requiredGridValue_ = ((StrikedTypePayoff)payoff_).strike(); }
public override void setupArguments(IPricingEngineArguments a) { base.setupArguments(a); OneAssetOption.Arguments args = a as OneAssetOption.Arguments; Utils.QL_REQUIRE(args != null, () => "incorrect argument type"); events_.Clear(); int n = args.exercise.dates().Count; stoppingTimes_ = new InitializedList <double>(n); for (int i = 0; i < n; ++i) { stoppingTimes_[i] = process_.time(args.exercise.date(i)); } }
public override void setupArguments(IPricingEngineArguments a) { base.setupArguments(a); OneAssetOption.Arguments args = a as OneAssetOption.Arguments; if (args == null) { throw new ApplicationException("incorrect argument type"); } events_.Clear(); int n = args.exercise.dates().Count; stoppingTimes_ = new InitializedList <double>(n); for (int i = 0; i < n; ++i) { stoppingTimes_[i] = process_.time(args.exercise.date(i)); } }