和顺 / 衡律 返回所属 Agent
11.10

提前行使策略与信息可得性

原能力

实施提前行使策略及有限上下界验证,阻止未来信息影响当期决定。(合同附件 R7 11.10)

首选项目

QuantLib(Modified BSD,上游许可正文)。 QuantLib

匹配范围

提前行使和有限差分引擎可复算部分主张。

源码

QuantLib · class LongstaffSchwartzPathPricer

ql/methods/montecarlo/longstaffschwartzpathpricer.hpp · 53–66 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    class LongstaffSchwartzPathPricer : public PathPricer<PathType> {
      public:
        typedef typename EarlyExerciseTraits<PathType>::StateType StateType;

        LongstaffSchwartzPathPricer(const TimeGrid& times,
                                    ext::shared_ptr<EarlyExercisePathPricer<PathType> >,
                                    const ext::shared_ptr<YieldTermStructure>& termStructure);

        Real operator()(const PathType& path) const override;
        virtual void calibrate();

        Real exerciseProbability() const;

      protected:
  • Copyright (C) 2006 Klaus Spanderen
  • Copyright (C) 2015 Peter Caspers
  • Copyright (C) 2015 Thema Consulting SA

QuantLib · FdBlackScholesVanillaEngine::calculate(

ql/pricingengines/vanilla/fdblackscholesvanillaengine.cpp · 109–122 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    void FdBlackScholesVanillaEngine::calculate() const {

        // 0. Cash dividend model
        const Date exerciseDate = arguments_.exercise->lastDate();
        const Time maturity = process_->time(exerciseDate);
        const Date settlementDate = process_->riskFreeRate()->referenceDate();

        Real spotAdjustment = 0.0;
        DividendSchedule dividendSchedule = DividendSchedule();

        ext::shared_ptr<EscrowedDividendAdjustment> escrowedDivAdj;

        switch (cashDividendModel_) {
          case Spot:
  • Copyright (C) 2008 Andreas Gaida
  • Copyright (C) 2008, 2009 Ralph Schreyer
  • Copyright (C) 2008, 2009 Klaus Spanderen

实现与验收要点

原策略信息可得性、具名有限方法及证据范围。