public AnalyticDoubleBarrierBinaryEngineHelper(
     GeneralizedBlackScholesProcess process,
     CashOrNothingPayoff payoff,
     DoubleBarrierOption.Arguments arguments)
 {
     process_   = process;
     payoff_    = payoff;
     arguments_ = arguments;
 }
        public DiscretizedDoubleBarrierOption(DoubleBarrierOption.Arguments args, StochasticProcess process, TimeGrid grid = null)
        {
            arguments_ = args;
            vanilla_   = new DiscretizedVanillaOption(arguments_, process, grid);

            Utils.QL_REQUIRE(args.exercise.dates().Count > 0, () => "specify at least one stopping date");

            stoppingTimes_ = new InitializedList <double>(args.exercise.dates().Count);
            for (int i = 0; i < stoppingTimes_.Count; ++i)
            {
                stoppingTimes_[i] = process.time(args.exercise.date(i));
                if (grid != null && !grid.empty())
                {
                    // adjust to the given grid
                    stoppingTimes_[i] = grid.closestTime(stoppingTimes_[i]);
                }
            }
        }
 public DiscretizedDermanKaniDoubleBarrierOption(DoubleBarrierOption.Arguments args,
                                                 StochasticProcess process, TimeGrid grid = null)
 {
     unenhanced_ = new DiscretizedDoubleBarrierOption(args, process, grid);
 }