Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv8871/qlo
Modified Files:
asianoption.cpp asianoption.hpp barrieroption.cpp
barrieroption.hpp cliquetoption.cpp cliquetoption.hpp
dividendvanillaoption.cpp dividendvanillaoption.hpp
enumclassregistry.cpp europeanoption.cpp europeanoption.hpp
forwardvanillaoption.cpp forwardvanillaoption.hpp
pricingengines.cpp pricingengines.hpp
quantoforwardvanillaoption.cpp quantoforwardvanillaoption.hpp
quantovanillaoption.cpp quantovanillaoption.hpp
typefactory.hpp vanillaoption.cpp vanillaoption.hpp
Log Message:
Index: pricingengines.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/pricingengines.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** pricingengines.cpp 26 Jun 2006 21:31:03 -0000 1.7
--- pricingengines.cpp 29 Jun 2006 15:02:31 -0000 1.8
***************
*** 17,20 ****
--- 17,21 ----
#include <qlo/pricingengines.hpp>
+ #include <qlo/typefactory.hpp>
#include <ql/handle.hpp>
#include <ql/quote.hpp>
***************
*** 22,25 ****
--- 23,36 ----
namespace QuantLibAddin {
+ PricingEngine::PricingEngine(const std::string &engineID, const long& timeSteps)
+ {
+ libraryObject_ = Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
+ }
+
+ PricingEngine::PricingEngine(const std::string &engineID)
+ {
+ libraryObject_ = Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID);
+ }
+
BlackSwaptionEngine::BlackSwaptionEngine(
const QuantLib::Handle<QuantLib::SwaptionVolatilityStructure>& vol)
Index: dividendvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/dividendvanillaoption.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dividendvanillaoption.cpp 20 Jun 2006 09:44:18 -0000 1.4
--- dividendvanillaoption.cpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 33,42 ****
const std::vector < QuantLib::Date > ÷ndDates,
const std::vector < double > ÷nds,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::DividendVanillaOption>(
new QuantLib::DividendVanillaOption(
--- 33,39 ----
const std::vector < QuantLib::Date > ÷ndDates,
const std::vector < double > ÷nds,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::DividendVanillaOption>(
new QuantLib::DividendVanillaOption(
Index: quantoforwardvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantoforwardvanillaoption.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** quantoforwardvanillaoption.cpp 16 Jun 2006 17:37:20 -0000 1.4
--- quantoforwardvanillaoption.cpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 42,48 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps)
! {
QuantLib::Handle<QuantLib::BlackVolTermStructure>
blackVolTermStructureH(blackVolTermStructure);
--- 42,46 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
QuantLib::Handle<QuantLib::BlackVolTermStructure>
blackVolTermStructureH(blackVolTermStructure);
***************
*** 55,61 ****
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
-
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::QuantoForwardVanillaOption(
--- 53,56 ----
Index: pricingengines.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/pricingengines.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** pricingengines.hpp 26 Jun 2006 21:31:03 -0000 1.6
--- pricingengines.hpp 29 Jun 2006 15:02:31 -0000 1.7
***************
*** 30,33 ****
--- 30,38 ----
class PricingEngine : public ObjHandler::LibraryObject<QuantLib::PricingEngine> {
+ public:
+ PricingEngine(const std::string &engineID);
+ PricingEngine(const std::string &engineID, const long& timeSteps);
+ protected:
+ PricingEngine() {}
};
Index: forwardvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardvanillaoption.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** forwardvanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
--- forwardvanillaoption.cpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 33,42 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardVanillaOption(
--- 33,39 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardVanillaOption(
Index: cliquetoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/cliquetoption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** cliquetoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- cliquetoption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 33,38 ****
const QuantLib::Date &expiryDate,
const std::vector < QuantLib::Date > &resetDates,
! const std::string &engineID,
! const long &timeSteps);
};
--- 33,37 ----
const QuantLib::Date &expiryDate,
const std::vector < QuantLib::Date > &resetDates,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: barrieroption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/barrieroption.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** barrieroption.cpp 9 Jun 2006 18:58:47 -0000 1.3
--- barrieroption.cpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 33,43 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
--- 33,40 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
Index: vanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/vanillaoption.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** vanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
--- vanillaoption.cpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 36,46 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::VanillaOption(
--- 36,43 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::VanillaOption(
***************
*** 51,61 ****
}
! std::string VanillaOption::setEngine(
! const std::string &engineID,
! const long &timeSteps) {
! boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
! Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_->setPricingEngine(pricingEngine);
! return engineID;
}
--- 48,55 ----
}
! bool VanillaOption::setEngine(
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
libraryObject_->setPricingEngine(pricingEngine);
! return true;
}
Index: typefactory.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/typefactory.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** typefactory.hpp 29 Jun 2006 10:47:33 -0000 1.7
--- typefactory.hpp 29 Jun 2006 15:02:31 -0000 1.8
***************
*** 101,104 ****
--- 101,109 ----
return ctor(timeSteps);
}
+ boost::shared_ptr<QuantLib::PricingEngine> operator()(const std::string& engineID) {
+ boost::shared_ptr<QuantLib::PricingEngine>(*ctor)() =
+ (boost::shared_ptr<QuantLib::PricingEngine>(*)()) getType(engineID);
+ return ctor();
+ }
};
Index: europeanoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/europeanoption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** europeanoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- europeanoption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 33,38 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 33,37 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: asianoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/asianoption.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** asianoption.cpp 20 Jun 2006 09:44:18 -0000 1.4
--- asianoption.cpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 33,43 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
--- 33,40 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
***************
*** 60,70 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
--- 57,64 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
Index: quantovanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantovanillaoption.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** quantovanillaoption.hpp 16 Jun 2006 17:37:20 -0000 1.4
--- quantovanillaoption.hpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 36,41 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 36,40 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: cliquetoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/cliquetoption.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** cliquetoption.cpp 20 Jun 2006 09:44:18 -0000 1.4
--- cliquetoption.cpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 32,37 ****
const QuantLib::Date &expiryDate,
const std::vector < QuantLib::Date > &resetDates,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::PercentageStrikePayoff> payoff(
--- 32,36 ----
const QuantLib::Date &expiryDate,
const std::vector < QuantLib::Date > &resetDates,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::PercentageStrikePayoff> payoff(
***************
*** 39,44 ****
boost::shared_ptr<QuantLib::EuropeanExercise> exercise(
new QuantLib::EuropeanExercise(expiryDate));
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::CliquetOption(
--- 38,41 ----
Index: enumclassregistry.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/enumclassregistry.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** enumclassregistry.cpp 29 Jun 2006 13:06:24 -0000 1.1
--- enumclassregistry.cpp 29 Jun 2006 15:02:31 -0000 1.2
***************
*** 89,181 ****
}
! /* *** PricingEngine *** */
! boost::shared_ptr<QuantLib::PricingEngine> AB_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticBarrierEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AC_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticCliquetEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ACGAPA_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticContinuousGeometricAveragePriceAsianEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADA_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDigitalAmericanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADGAPA_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDiscreteGeometricAveragePriceAsianEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADE_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDividendEuropeanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AE_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticEuropeanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AP_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticPerformanceEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> BAWA_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::BaroneAdesiWhaleyApproximationEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AEQPB_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::AdditiveEQPBinomialTree>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> CRR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::CoxRossRubinstein>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> I_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::IntegralEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> FDA_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDAmericanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> FDE_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDEuropeanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> FDB_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDBermudanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> JR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::JarrowRudd>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> LR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::LeisenReimer>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> TIAN_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::Tian>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> TRI_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::Trigeorgis>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> BSA_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::BjerksundStenslandApproximationEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> PE_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine>();
}
! boost::shared_ptr<QuantLib::PricingEngine> SE_Engine(const long& timeSteps) {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::StulzEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> FE_Engine(const long& timeSteps) {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
--- 89,145 ----
}
! /* *** PricingEngine - no timesteps *** */
! boost::shared_ptr<QuantLib::PricingEngine> AB_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticBarrierEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AC_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticCliquetEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ACGAPA_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticContinuousGeometricAveragePriceAsianEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADA_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDigitalAmericanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADGAPA_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDiscreteGeometricAveragePriceAsianEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> ADE_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticDividendEuropeanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AE_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticEuropeanEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> AP_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::AnalyticPerformanceEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> BAWA_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::BaroneAdesiWhaleyApproximationEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> I_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::IntegralEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> BSA_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::BjerksundStenslandApproximationEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> PE_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine>();
}
! boost::shared_ptr<QuantLib::PricingEngine> SE_Engine() {
return boost::shared_ptr<QuantLib::PricingEngine> (
new QuantLib::StulzEngine);
}
! boost::shared_ptr<QuantLib::PricingEngine> FE_Engine() {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
***************
*** 184,188 ****
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> FPE_Engine(const long& timeSteps) {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
--- 148,152 ----
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> FPE_Engine() {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
***************
*** 192,196 ****
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> QE_Engine(const long& timeSteps) {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
--- 156,160 ----
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> QE_Engine() {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
***************
*** 199,203 ****
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> QFE_Engine(const long& timeSteps) {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
--- 163,167 ----
QuantLib::VanillaOption::results>(underlyingEngine));
}
! boost::shared_ptr<QuantLib::PricingEngine> QFE_Engine() {
boost::shared_ptr<QuantLib::VanillaOption::engine>
underlyingEngine(new QuantLib::AnalyticEuropeanEngine);
***************
*** 210,215 ****
}
! /* *** Extrapolator *** */
boost::shared_ptr<QuantLib::Extrapolator> BilinearInterpolation_Extrapolator(
const std::vector<double>::const_iterator& xBegin,
--- 174,216 ----
}
! /* *** PricingEngine - timesteps *** */
! boost::shared_ptr<QuantLib::PricingEngine> AEQPB_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::AdditiveEQPBinomialTree>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> CRR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::CoxRossRubinstein>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> FDA_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDAmericanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> FDE_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDEuropeanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> FDB_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::FDBermudanEngine(timeSteps, timeSteps-1));
! }
! boost::shared_ptr<QuantLib::PricingEngine> JR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::JarrowRudd>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> LR_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::LeisenReimer>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> TIAN_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::Tian>(timeSteps));
! }
! boost::shared_ptr<QuantLib::PricingEngine> TRI_Engine(const long& timeSteps) {
! return boost::shared_ptr<QuantLib::PricingEngine> (
! new QuantLib::BinomialVanillaEngine<QuantLib::Trigeorgis>(timeSteps));
! }
+ /* *** Extrapolator *** */
boost::shared_ptr<QuantLib::Extrapolator> BilinearInterpolation_Extrapolator(
const std::vector<double>::const_iterator& xBegin,
Index: forwardvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardvanillaoption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** forwardvanillaoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- forwardvanillaoption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 35,40 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 35,39 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: europeanoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/europeanoption.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** europeanoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
--- europeanoption.cpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 36,45 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::EuropeanOption(
--- 36,42 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
boost::shared_ptr<QuantLib::StrikedTypePayoff> payoff =
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::EuropeanOption(
Index: asianoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/asianoption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** asianoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- asianoption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 34,39 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 34,38 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
***************
*** 50,55 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 49,53 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: quantovanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantovanillaoption.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** quantovanillaoption.cpp 16 Jun 2006 17:37:20 -0000 1.4
--- quantovanillaoption.cpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 41,47 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps)
! {
QuantLib::Handle<QuantLib::BlackVolTermStructure>
blackVolTermStructureH(blackVolTermStructure);
--- 41,45 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine) {
QuantLib::Handle<QuantLib::BlackVolTermStructure>
blackVolTermStructureH(blackVolTermStructure);
***************
*** 54,60 ****
Create<boost::shared_ptr<QuantLib::StrikedTypePayoff> >()(optionTypeID, payoffID, strike);
- boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
- Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
-
libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::QuantoVanillaOption(
--- 52,55 ----
Index: barrieroption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/barrieroption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** barrieroption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- barrieroption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 37,42 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 37,41 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: dividendvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/dividendvanillaoption.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dividendvanillaoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
--- dividendvanillaoption.hpp 29 Jun 2006 15:02:31 -0000 1.4
***************
*** 35,40 ****
const std::vector < QuantLib::Date > ÷ndDates,
const std::vector < double > ÷nds,
! const std::string &engineID,
! const long &timeSteps);
};
--- 35,39 ----
const std::vector < QuantLib::Date > ÷ndDates,
const std::vector < double > ÷nds,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: quantoforwardvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantoforwardvanillaoption.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** quantoforwardvanillaoption.hpp 16 Jun 2006 17:37:20 -0000 1.4
--- quantoforwardvanillaoption.hpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 39,44 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
};
--- 39,43 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
Index: vanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/vanillaoption.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** vanillaoption.hpp 26 Jun 2006 21:31:03 -0000 1.4
--- vanillaoption.hpp 29 Jun 2006 15:02:31 -0000 1.5
***************
*** 33,42 ****
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const std::string &engineID,
! const long &timeSteps);
! std::string setEngine(
! const std::string &engineName,
! const long &timeSteps);
};
--- 33,40 ----
const double &strike,
const boost::shared_ptr < QuantLib::Exercise > &exercise,
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
! bool setEngine(
! const boost::shared_ptr<QuantLib::PricingEngine> &pricingEngine);
};
|