Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25773/qlo
Modified Files:
marketmodels.cpp marketmodels.hpp
Log Message:
exported more MarketModels functions
Index: marketmodels.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.hpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** marketmodels.hpp 14 Jul 2006 09:38:53 -0000 1.5
--- marketmodels.hpp 14 Jul 2006 17:37:16 -0000 1.6
***************
*** 20,23 ****
--- 20,24 ----
#include <oh/objhandler.hpp>
+ #include <ql/MarketModels/accountingengine.hpp>
#include <ql/MarketModels/pseudoroot.hpp>
#include <ql/MarketModels/evolutiondescription.hpp>
***************
*** 78,81 ****
--- 79,83 ----
+ //??
inline QuantLib::Array drifts(const QuantLib::Matrix& pseudo,
std::vector<double> vdisplacements,
***************
*** 105,109 ****
! class MarketModelForwards : public ObjHandler::LibraryObject<QuantLib::MarketModelForwards> {
public:
MarketModelForwards(const QuantLib::Array& rateTimes,
--- 107,118 ----
!
! class MarketModelProduct : public ObjHandler::LibraryObject<
! QuantLib::MarketModelProduct> {
! //public:
! // virtual EvolutionDescription suggestedEvolution() const=0;
! };
!
! class MarketModelForwards : public MarketModelProduct {
public:
MarketModelForwards(const QuantLib::Array& rateTimes,
***************
*** 111,114 ****
--- 120,124 ----
const QuantLib::Array& paymentTimes,
const QuantLib::Array& strikes);
+ //EvolutionDescription suggestedEvolution() const;
};
***************
*** 131,137 ****
ForwardRateEvolver(const boost::shared_ptr<QuantLib::PseudoRoot>&,
const QuantLib::EvolutionDescription&,
! unsigned long seed);
};
}
--- 141,164 ----
ForwardRateEvolver(const boost::shared_ptr<QuantLib::PseudoRoot>&,
const QuantLib::EvolutionDescription&,
! const QuantLib::BrownianGeneratorFactory&);
};
+ class ForwardRateIpcEvolver : public MarketModelEvolver {
+ public:
+ ForwardRateIpcEvolver(const boost::shared_ptr<QuantLib::PseudoRoot>&,
+ const QuantLib::EvolutionDescription&,
+ const QuantLib::BrownianGeneratorFactory&);
+ };
+
+
+ class AccountingEngine : public ObjHandler::LibraryObject<
+ QuantLib::AccountingEngine> {
+ public:
+ AccountingEngine(
+ const boost::shared_ptr<QuantLib::MarketModelEvolver>& evolver,
+ const boost::shared_ptr<QuantLib::MarketModelProduct>& product,
+ const QuantLib::EvolutionDescription& evolution,
+ double initialNumeraireValue);
+ };
}
Index: marketmodels.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** marketmodels.cpp 14 Jul 2006 09:38:53 -0000 1.4
--- marketmodels.cpp 14 Jul 2006 17:37:16 -0000 1.5
***************
*** 120,128 ****
const QuantLib::Array& strikes)
{
! libraryObject_ = boost::shared_ptr<QuantLib::MarketModelForwards>(
new QuantLib::MarketModelForwards(rateTimes, accruals,
paymentTimes, strikes));
}
--- 120,137 ----
const QuantLib::Array& strikes)
{
! libraryObject_ = boost::shared_ptr<QuantLib::MarketModelProduct>(
new QuantLib::MarketModelForwards(rateTimes, accruals,
paymentTimes, strikes));
}
+ /*
+ EvolutionDescription MarketModelForwards::suggestedEvolution() const
+ {
+ QuantLib::EvolitionDescription ed = libraryObject_->suggestedEvolution();
+
+ boost::shared_ptr<ObjHandler::Object> objectPointer(
+ new QuantLibAddin::EvolutionDescription());
+ }
+ */
***************
*** 136,144 ****
const boost::shared_ptr<QuantLib::PseudoRoot>& pseudoRoot,
const QuantLib::EvolutionDescription& evolutionDescription,
! unsigned long seed)
{
! QuantLib::MTBrownianGeneratorFactory generatorFactory(seed);
!
libraryObject_ = boost::shared_ptr<QuantLib::MarketModelEvolver>(
new QuantLib::ForwardRateEvolver(pseudoRoot,
--- 145,161 ----
const boost::shared_ptr<QuantLib::PseudoRoot>& pseudoRoot,
const QuantLib::EvolutionDescription& evolutionDescription,
! const QuantLib::BrownianGeneratorFactory& generatorFactory)
{
+ libraryObject_ = boost::shared_ptr<QuantLib::MarketModelEvolver>(
+ new QuantLib::ForwardRateEvolver(pseudoRoot,
+ evolutionDescription,
+ generatorFactory));
+ }
! ForwardRateIpcEvolver::ForwardRateIpcEvolver(
! const boost::shared_ptr<QuantLib::PseudoRoot>& pseudoRoot,
! const QuantLib::EvolutionDescription& evolutionDescription,
! const QuantLib::BrownianGeneratorFactory& generatorFactory)
! {
libraryObject_ = boost::shared_ptr<QuantLib::MarketModelEvolver>(
new QuantLib::ForwardRateEvolver(pseudoRoot,
***************
*** 147,149 ****
--- 164,179 ----
}
+ AccountingEngine::AccountingEngine(
+ const boost::shared_ptr<QuantLib::MarketModelEvolver>& evolver,
+ const boost::shared_ptr<QuantLib::MarketModelProduct>& product,
+ const QuantLib::EvolutionDescription& evolution,
+ double initialNumeraireValue)
+ {
+ libraryObject_ = boost::shared_ptr<QuantLib::AccountingEngine>(
+ new QuantLib::AccountingEngine(evolver,
+ product,
+ evolution,
+ initialNumeraireValue));
+ }
+
}
|