protected override PathPricer <IPath> pathPricer() { AutocallPayoff payoff = arguments_.payoff as AutocallPayoff; if (payoff == null) { throw new ApplicationException("non-plain payoff given"); } AutocallExercise exercise = arguments_.exercise as AutocallExercise; if (payoff == null) { throw new ApplicationException("non-plain payoff given"); } GeneralizedBlackScholesProcess process = process_ as GeneralizedBlackScholesProcess; if (process == null) { throw new ApplicationException("Black-Scholes process required"); } // return new EuropeanAutocallPathPricer(payoff, exercise, process.riskFreeRate().link.discount(timeGrid().Last())); return(new EuropeanAutocallPathPricer(payoff, exercise, process)); //, process.riskFreeRate().link.discount(timeGrid().Last())); }
public EuropeanAutocallPathPricer(AutocallPayoff autocallPayoff, AutocallExercise autocallExercise, GeneralizedBlackScholesProcess process) { payoff_ = autocallPayoff; exercise_ = autocallExercise; //payoff_ = new AutocallPayoff(type, strike); process_ = process; //if (!(strike >= 0.0)) // throw new ApplicationException("strike less than zero not allowed"); }
public myAutocall(QLNet.Date valuationDate, AutocallExercise exercise, AutocallPayoff payoff) : base() { // Assign dates base.valuationDate_ = valuationDate; Settings.setEvaluationDate(valuationDate); // Assign payoff and exercise exercise_ = exercise; payoff_ = payoff; // @TODO : valuation date chould not be here, this is not part of the instrument itself. Belongs to valuation methods... @TODO }