Exemple #1
0
        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;
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        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));
            }
        }
Exemple #5
0
        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));
            }
        }