23 using PricingEngineFuncEx = Func<Symbol, GeneralizedBlackScholesProcess, IPricingEngine>;
36 private const int _timeStepsBinomial = 100;
37 private const int _timeStepsFD = 100;
48 var type = AppDomain.CurrentDomain.GetAssemblies()
49 .Where(a => !a.IsDynamic)
50 .SelectMany(a => a.GetTypes())
51 .Where(s => s.Implements(typeof(IPricingEngine)))
52 .FirstOrDefault(t => t.FullName?.EndsWith(priceEngineName, StringComparison.InvariantCulture) ==
true);
54 return new QLOptionPriceModel(process => (IPricingEngine)Activator.CreateInstance(type, process),
56 allowedOptionStyles: allowedOptionStyles);
67 allowedOptionStyles:
new[] {
OptionStyle.European });
77 return new QLOptionPriceModel(process =>
new BaroneAdesiWhaleyApproximationEngine(process),
78 allowedOptionStyles:
new[] {
OptionStyle.American });
88 return new QLOptionPriceModel(process =>
new BjerksundStenslandApproximationEngine(process),
89 allowedOptionStyles:
new[] {
OptionStyle.American });
100 allowedOptionStyles:
new[] {
OptionStyle.European });
110 PricingEngineFuncEx pricingEngineFunc = (symbol, process) =>
112 ?
new FDAmericanEngine(process, _timeStepsFD, _timeStepsFD - 1)
113 :
new FDEuropeanEngine(process, _timeStepsFD, _timeStepsFD - 1);
125 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<JarrowRudd>(process, _timeStepsBinomial));
136 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<CoxRossRubinstein>(process, _timeStepsBinomial));
146 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<AdditiveEQPBinomialTree>(process, _timeStepsBinomial));
156 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<Trigeorgis>(process, _timeStepsBinomial));
166 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<Tian>(process, _timeStepsBinomial));
176 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<LeisenReimer>(process, _timeStepsBinomial));
186 return new QLOptionPriceModel(process =>
new BinomialVanillaEngine<Joshi4>(process, _timeStepsBinomial));