Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv19889/qlo
Modified Files:
marketmodels.cpp marketmodels.hpp
Log Message:
coherently changed function calls from CalculatorCompute to DriftCalculatorComputePlain
Index: marketmodels.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.hpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** marketmodels.hpp 3 Oct 2006 08:25:31 -0000 1.22
--- marketmodels.hpp 6 Nov 2006 16:46:39 -0000 1.23
***************
*** 25,28 ****
--- 25,29 ----
#include <ql/MarketModels/curvestate.hpp>
#include <ql/MarketModels/driftcalculator.hpp>
+ #include <ql/MarketModels/swapforwardconversionmatrix.hpp>
#include <ql/MarketModels/browniangenerator.hpp>
#include <ql/MarketModels/marketmodelevolver.hpp>
***************
*** 85,89 ****
};
-
class CurveState : public ObjHandler::LibraryObject<QuantLib::CurveState> {
public:
--- 86,89 ----
***************
*** 91,95 ****
};
-
class DriftCalculator : public ObjHandler::LibraryObject<QuantLib::DriftCalculator> {
public:
--- 91,94 ----
***************
*** 99,103 ****
QuantLib::Size numeraire,
QuantLib::Size alive);
! std::vector<QuantLib::Real> compute(
const std::vector<QuantLib::Rate>& forwards) const;
std::vector<QuantLib::Real> computeReduced(
--- 98,102 ----
QuantLib::Size numeraire,
QuantLib::Size alive);
! std::vector<QuantLib::Real> computePlain(
const std::vector<QuantLib::Rate>& forwards) const;
std::vector<QuantLib::Real> computeReduced(
***************
*** 107,110 ****
--- 106,120 ----
};
+ // class SwapCovarianceApproximator : public ObjHandler::LibraryObject<
+ // QuantLib::SwapCovarianceApproximator> {
+ // public:
+ // SwapCovarianceApproximator(const QuantLib::CurveState& initialCurveState,
+ // QuantLib::Size expiry,
+ // QuantLib::Size maturity,
+ // QuantLib::Spread displacement,
+ // const QuantLib::Matrix& forwardCovarianceMatrix);
+ //QuantLib::Disposable<Matrix> swapCovarianceMatrix();
+ // };
+
class MarketModelMultiProduct : public ObjHandler::LibraryObject<
QuantLib::MarketModelMultiProduct> {
***************
*** 130,134 ****
! class BrownianGeneratorFactory : public ObjHandler::LibraryObject<QuantLib::BrownianGeneratorFactory> {
};
--- 140,145 ----
! class BrownianGeneratorFactory : public ObjHandler::LibraryObject<
! QuantLib::BrownianGeneratorFactory> {
};
***************
*** 138,143 ****
};
!
! class MarketModelEvolver : public ObjHandler::LibraryObject<QuantLib::MarketModelEvolver> {
};
--- 149,154 ----
};
! class MarketModelEvolver : public ObjHandler::LibraryObject<
! QuantLib::MarketModelEvolver> {
};
Index: marketmodels.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/marketmodels.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** marketmodels.cpp 17 Oct 2006 13:43:56 -0000 1.25
--- marketmodels.cpp 6 Nov 2006 16:46:39 -0000 1.26
***************
*** 37,41 ****
}
-
EvolutionDescription::EvolutionDescription(
const QuantLib::EvolutionDescription& ev)
--- 37,40 ----
***************
*** 45,49 ****
}
-
ExpCorrFlatVol::ExpCorrFlatVol(
double longTermCorr,
--- 44,47 ----
***************
*** 88,92 ****
}
-
Abcd::Abcd(QuantLib::Real a, QuantLib::Real b,
QuantLib::Real c, QuantLib::Real d,
--- 86,89 ----
***************
*** 98,102 ****
}
-
CurveState::CurveState(const std::vector<QuantLib::Time>& rateTimes)
{
--- 95,98 ----
***************
*** 117,124 ****
}
! std::vector<QuantLib::Real> DriftCalculator::compute(
const std::vector<QuantLib::Rate>& forwards) const {
std::vector<QuantLib::Real> results(size_);
! libraryObject_->compute(forwards, results);
return results;
}
--- 113,120 ----
}
! std::vector<QuantLib::Real> DriftCalculator::computePlain(
const std::vector<QuantLib::Rate>& forwards) const {
std::vector<QuantLib::Real> results(size_);
! libraryObject_->computePlain(forwards, results);
return results;
}
***************
*** 131,135 ****
--- 127,149 ----
}
+ //SwapCovarianceApproximator::SwapCovarianceApproximator(
+ // const QuantLib::CurveState& initialCurveState,
+ // QuantLib::Size expiry,
+ // QuantLib::Size maturity,
+ // QuantLib::Spread displacement,
+ // const QuantLib::Matrix& forwardCovarianceMatrix)
+ //: size_(taus.size())
+ //{
+ // libraryObject_ = boost::shared_ptr<QuantLib::SwapCovarianceApproximator>(
+ // new QuantLib::SwapCovarianceApproximator(
+ // initialCurveState, expiry,maturity, displacement,
+ // forwardCovarianceMatrix));
+ //}
+ //QuantLib::Disposable<Matrix> SwapCovarianceApproximator::swapCovarianceMatrix()
+ // {
+ // libraryObject_->compute(forwards, results);
+ // return results;
+ //}
OneStepForwards::OneStepForwards(
***************
*** 147,157 ****
{
const QuantLib::EvolutionDescription& ev = libraryObject_->evolution();
-
boost::shared_ptr<ObjHandler::Object> objectPointer(
new QuantLibAddin::EvolutionDescription(ev));
-
std::string anonymousID =
ObjHandler::ObjectHandler::instance().storeObject("", objectPointer);
-
objectPointer->setProperties(
boost::shared_ptr<ObjHandler::ValueObject>(
--- 161,168 ----
***************
*** 160,164 ****
ev.rateTimes(),
ev.evolutionTimes())));
-
return anonymousID;
}
--- 171,174 ----
***************
*** 174,178 ****
}
-
MTBrownianGeneratorFactory::MTBrownianGeneratorFactory(unsigned long seed)
{
--- 184,187 ----
|