/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 Mark Joshi This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modify it under the terms of the QuantLib license. You should have received a copy of the license along with this program; if not, please email . The license is also available online at . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the license for more details. */ #ifndef quantlib_proxy_greek_engine_hpp #define quantlib_proxy_greek_engine_hpp // to be removed using forward declaration #include #include #include namespace QuantLib { class MarketModelEvolver; class ConstrainedEvolver; class MarketModelDiscounter; class ProxyGreekEngine { public: ProxyGreekEngine( const boost::shared_ptr& evolver, const std::vector< std::vector > >& constrainedEvolvers, const std::vector > >& diffWeights, const std::vector& startIndexOfConstraint, const std::vector& endIndexOfConstraint, const Clone& product, double initialNumeraireValue); void multiplePathValues( SequenceStatistics& stats, std::vector >& modifiedStats, Size numberOfPaths); void singlePathValues( std::vector& values, std::vector > >& modifiedValues); private: void singleEvolverValues(MarketModelEvolver& evolver, std::vector& values, bool storeRates = false); boost::shared_ptr originalEvolver_; std::vector > > constrainedEvolvers_; std::vector > > diffWeights_; std::vector startIndexOfConstraint_; std::vector endIndexOfConstraint_; Clone product_; Real initialNumeraireValue_; Size numberProducts_; // workspace std::vector constraints_; std::vector constraintsActive_; std::vector numerairesHeld_; std::vector numberCashFlowsThisStep_; std::vector > cashFlowsGenerated_; std::vector discounters_; }; } #endif