Update of /cvsroot/quantlibaddin/QuantLibAddin/qlo
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv11657/qlo
Modified Files:
asianoption.cpp asianoption.hpp barrieroption.cpp
barrieroption.hpp baseinstruments.hpp calendar.cpp
calendar.hpp capfloor.cpp capfloor.hpp cliquetoption.cpp
cliquetoption.hpp couponvectors.hpp dividendvanillaoption.cpp
dividendvanillaoption.hpp europeanoption.cpp
europeanoption.hpp exercise.cpp exercise.hpp
fixedcouponbond.cpp fixedcouponbond.hpp
forwardrateagreement.cpp forwardrateagreement.hpp
forwardvanillaoption.cpp forwardvanillaoption.hpp
interpolation.cpp interpolation.hpp processes.cpp
processes.hpp quantoforwardvanillaoption.cpp
quantoforwardvanillaoption.hpp quantovanillaoption.cpp
quantovanillaoption.hpp randomsequencegenerator.hpp
schedule.cpp schedule.hpp shortratemodels.cpp
shortratemodels.hpp swap.cpp swap.hpp termstructures.cpp
termstructures.hpp vanillaoption.cpp vanillaoption.hpp
vanillaswap.cpp vanillaswap.hpp volatilities.cpp
volatilities.hpp xibor.cpp xibor.hpp zerocouponbond.cpp
zerocouponbond.hpp
Log Message:
cleaner processing for object references
Index: asianoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/asianoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** asianoption.cpp 24 May 2006 14:59:43 -0000 1.2
--- asianoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 42,47 ****
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument =
! boost::shared_ptr<QuantLib::ContinuousAveragingAsianOption>(
new QuantLib::ContinuousAveragingAsianOption(
averageType,
--- 42,46 ----
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ContinuousAveragingAsianOption(
averageType,
***************
*** 70,75 ****
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument =
! boost::shared_ptr<QuantLib::DiscreteAveragingAsianOption>(
new QuantLib::DiscreteAveragingAsianOption(
averageType,
--- 69,73 ----
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::DiscreteAveragingAsianOption(
averageType,
Index: termstructures.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/termstructures.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** termstructures.hpp 19 May 2006 16:56:16 -0000 1.1
--- termstructures.hpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 32,50 ****
namespace QuantLibAddin {
! class RateHelper : public ObjHandler::Object {
public:
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(rateHelper_);
- }
double setQuote(double quote);
QuantLib::Handle<QuantLib::Quote> quoteHandle() const {
return quoteHandle_;
}
- const QuantLib::RateHelper& getObject() const {
- return *rateHelper_;
- }
protected:
boost::shared_ptr<QuantLib::SimpleQuote> quote_;
- boost::shared_ptr<QuantLib::RateHelper> rateHelper_;
QuantLib::Handle<QuantLib::Quote> quoteHandle_;
};
--- 32,43 ----
namespace QuantLibAddin {
! class RateHelper : public ObjHandler::LibraryObject<QuantLib::RateHelper> {
public:
double setQuote(double quote);
QuantLib::Handle<QuantLib::Quote> quoteHandle() const {
return quoteHandle_;
}
protected:
boost::shared_ptr<QuantLib::SimpleQuote> quote_;
QuantLib::Handle<QuantLib::Quote> quoteHandle_;
};
***************
*** 89,100 ****
};
! class YieldTermStructure : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::static_pointer_cast<void>(termStructure_);
! }
! const QuantLib::YieldTermStructure& getObject() const {return *termStructure_;}
! protected:
! boost::shared_ptr<QuantLib::YieldTermStructure> termStructure_;
};
--- 82,86 ----
};
! class YieldTermStructure : public ObjHandler::LibraryObject<QuantLib::YieldTermStructure> {
};
Index: europeanoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/europeanoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** europeanoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- europeanoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 42,46 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::EuropeanOption>(
new QuantLib::EuropeanOption(
blackScholesProcess,
--- 42,46 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::EuropeanOption(
blackScholesProcess,
Index: processes.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/processes.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** processes.cpp 24 May 2006 14:59:44 -0000 1.2
--- processes.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 50,54 ****
blackVolTermStructureH(blackVolTermStructureP);
! blackScholesProcess_ = boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> (
new QuantLib::GeneralizedBlackScholesProcess(
underlyingH,
--- 50,54 ----
blackVolTermStructureH(blackVolTermStructureP);
! libraryObject_ = boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> (
new QuantLib::GeneralizedBlackScholesProcess(
underlyingH,
Index: capfloor.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/capfloor.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** capfloor.hpp 24 May 2006 14:59:44 -0000 1.2
--- capfloor.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 35,52 ****
const std::string& engineID,
const QuantLib::CapFloor::Type& option);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::CapFloor, mInstrument)
-
};
! class AnalyticCapFloorEngine : public ObjHandler::Object {
public:
AnalyticCapFloorEngine(
const boost::shared_ptr < QuantLib::AffineModel >& model);
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(engine_);
- }
- private:
- boost::shared_ptr<QuantLib::PricingEngine> engine_;
};
--- 35,44 ----
const std::string& engineID,
const QuantLib::CapFloor::Type& option);
};
! class AnalyticCapFloorEngine : public ObjHandler::LibraryObject<QuantLib::PricingEngine> {
public:
AnalyticCapFloorEngine(
const boost::shared_ptr < QuantLib::AffineModel >& model);
};
Index: dividendvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/dividendvanillaoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dividendvanillaoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- dividendvanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 40,44 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::DividendVanillaOption>(
new QuantLib::DividendVanillaOption(
blackScholesProcess,
--- 40,44 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::DividendVanillaOption>(
new QuantLib::DividendVanillaOption(
blackScholesProcess,
Index: termstructures.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/termstructures.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** termstructures.cpp 1 Jun 2006 10:52:21 -0000 1.4
--- termstructures.cpp 9 Jun 2006 18:58:47 -0000 1.5
***************
*** 40,44 ****
}
-
DepositRateHelper::DepositRateHelper(
const double "e,
--- 40,43 ----
***************
*** 54,58 ****
quoteHandle_.linkTo(quote_);
! rateHelper_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::DepositRateHelper(quoteHandle_,
maturity,
--- 53,57 ----
quoteHandle_.linkTo(quote_);
! libraryObject_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::DepositRateHelper(quoteHandle_,
maturity,
***************
*** 77,81 ****
QuantLib::Date expiry = QuantLib::Date::IMMdate(immDateID);
! rateHelper_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::FuturesRateHelper(
quoteHandle_,
--- 76,80 ----
QuantLib::Date expiry = QuantLib::Date::IMMdate(immDateID);
! libraryObject_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::FuturesRateHelper(
quoteHandle_,
***************
*** 103,107 ****
quoteHandle_.linkTo(quote_);
! rateHelper_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::SwapRateHelper(quoteHandle_,
maturity,
--- 102,106 ----
quoteHandle_.linkTo(quote_);
! libraryObject_ = boost::shared_ptr<QuantLib::RateHelper>(
new QuantLib::SwapRateHelper(quoteHandle_,
maturity,
***************
*** 146,150 ****
true);
! termStructure_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::PiecewiseYieldCurve<QuantLib::Discount,
QuantLib::LogLinear>(
--- 145,149 ----
true);
! libraryObject_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::PiecewiseYieldCurve<QuantLib::Discount,
QuantLib::LogLinear>(
***************
*** 172,176 ****
const QuantLib::DayCounter &dayCounter) {
! termStructure_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::DiscountCurve(dates, dfs, dayCounter));
}
--- 171,175 ----
const QuantLib::DayCounter &dayCounter) {
! libraryObject_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::DiscountCurve(dates, dfs, dayCounter));
}
***************
*** 181,185 ****
const QuantLib::DayCounter &dayCounter) {
! termStructure_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ZeroCurve(dates, zeroRates, dayCounter));
}
--- 180,184 ----
const QuantLib::DayCounter &dayCounter) {
! libraryObject_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ZeroCurve(dates, zeroRates, dayCounter));
}
***************
*** 190,194 ****
const QuantLib::DayCounter &dayCounter) {
! termStructure_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ForwardCurve(dates, forwardRates, dayCounter));
}
--- 189,193 ----
const QuantLib::DayCounter &dayCounter) {
! libraryObject_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ForwardCurve(dates, forwardRates, dayCounter));
}
***************
*** 210,214 ****
boost::shared_ptr<QuantLib::Quote>(new QuantLib::SimpleQuote(spread)));
! termStructure_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ForwardSpreadedTermStructure(discountingTermStructure, spreadQuote));
}
--- 209,213 ----
boost::shared_ptr<QuantLib::Quote>(new QuantLib::SimpleQuote(spread)));
! libraryObject_ = boost::shared_ptr<QuantLib::YieldTermStructure>(
new QuantLib::ForwardSpreadedTermStructure(discountingTermStructure, spreadQuote));
}
***************
*** 279,290 ****
QuantLib::Date earliestDate, evalDate = QuantLib::Settings::instance().evaluationDate();
for (i=0; i<nInstruments; i++) {
! earliestDate = instruments[i]->getObject().earliestDate();
if (includeFlag[i]) {
if (!boost::dynamic_pointer_cast<FuturesRateHelper>(instruments[i]) && (earliestDate >= evalDate)) {
! rhs.push_back(detail::RateHelperItem(instruments[i]->getObject().latestDate(),
priority[i], instrumentHandles[i]));
} else if (futuresCounter<nFutures && (earliestDate-2 >= evalDate)) {
futuresCounter++;
! rhs.push_back(detail::RateHelperItem(instruments[i]->getObject().latestDate(),
priority[i], instrumentHandles[i]));
}
--- 278,291 ----
QuantLib::Date earliestDate, evalDate = QuantLib::Settings::instance().evaluationDate();
for (i=0; i<nInstruments; i++) {
! const boost::shared_ptr < QuantLib::RateHelper > temp =
! instruments[i]->getLibraryObject < QuantLib::RateHelper >();
! earliestDate = temp->earliestDate();
if (includeFlag[i]) {
if (!boost::dynamic_pointer_cast<FuturesRateHelper>(instruments[i]) && (earliestDate >= evalDate)) {
! rhs.push_back(detail::RateHelperItem(temp->latestDate(),
priority[i], instrumentHandles[i]));
} else if (futuresCounter<nFutures && (earliestDate-2 >= evalDate)) {
futuresCounter++;
! rhs.push_back(detail::RateHelperItem(temp->latestDate(),
priority[i], instrumentHandles[i]));
}
Index: randomsequencegenerator.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/randomsequencegenerator.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** randomsequencegenerator.hpp 19 May 2006 16:56:16 -0000 1.1
--- randomsequencegenerator.hpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 33,40 ****
virtual std::vector<double> nextSequence() const = 0;
-
- virtual boost::shared_ptr<void> getReference() const {
- return boost::shared_ptr<void>();
- }
};
--- 33,36 ----
Index: processes.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/processes.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** processes.hpp 24 May 2006 14:59:44 -0000 1.2
--- processes.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 25,31 ****
namespace QuantLibAddin {
! class GeneralizedBlackScholesProcess : public ObjHandler::Object {
public:
-
GeneralizedBlackScholesProcess(
const boost::shared_ptr < QuantLib::BlackVolTermStructure > &blackVolTermStructureP,
--- 25,30 ----
namespace QuantLibAddin {
! class GeneralizedBlackScholesProcess : public ObjHandler::LibraryObject<QuantLib::GeneralizedBlackScholesProcess> {
public:
GeneralizedBlackScholesProcess(
const boost::shared_ptr < QuantLib::BlackVolTermStructure > &blackVolTermStructureP,
***************
*** 35,43 ****
const double &riskFreeRate,
const double ÷ndYield);
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(blackScholesProcess_);
- }
- private:
- boost::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> blackScholesProcess_;
};
--- 34,37 ----
Index: fixedcouponbond.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/fixedcouponbond.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fixedcouponbond.cpp 19 May 2006 16:56:16 -0000 1.1
--- fixedcouponbond.cpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 54,58 ****
}
! mInstrument = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::FixedCouponBond(issueDate,
datedDate,
--- 54,58 ----
}
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::FixedCouponBond(issueDate,
datedDate,
Index: xibor.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/xibor.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** xibor.hpp 1 Jun 2006 12:51:20 -0000 1.4
--- xibor.hpp 9 Jun 2006 18:58:47 -0000 1.5
***************
*** 25,29 ****
namespace QuantLibAddin {
! class Xibor : public ObjHandler::Object {
public:
Xibor(const std::string &indexName,
--- 25,29 ----
namespace QuantLibAddin {
! class Xibor : public ObjHandler::LibraryObject<QuantLib::Xibor> {
public:
Xibor(const std::string &indexName,
***************
*** 38,50 ****
const std::vector<QuantLib::Date>& dates,
const std::vector<double> &fixings);
-
- const QuantLib::Xibor& getObject() const {return *index_;}
-
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(index_);
- }
-
- private:
- boost::shared_ptr<QuantLib::Xibor> index_;
};
}
--- 38,41 ----
Index: forwardvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardvanillaoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** forwardvanillaoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- forwardvanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 39,43 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::ForwardVanillaOption>(
new QuantLib::ForwardVanillaOption(
moneyness,
--- 39,43 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardVanillaOption(
moneyness,
Index: cliquetoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/cliquetoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cliquetoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- cliquetoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 35,40 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::CliquetOption, mInstrument)
};
--- 35,38 ----
Index: quantoforwardvanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantoforwardvanillaoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** quantoforwardvanillaoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- quantoforwardvanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 60,64 ****
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::QuantoForwardVanillaOption>(
new QuantLib::QuantoForwardVanillaOption(
termStructureH,
--- 60,64 ----
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::QuantoForwardVanillaOption(
termStructureH,
Index: barrieroption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/barrieroption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** barrieroption.cpp 24 May 2006 14:59:44 -0000 1.2
--- barrieroption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 41,45 ****
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::BarrierOption>(
new QuantLib::BarrierOption(
barrierType,
--- 41,45 ----
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::BarrierOption(
barrierType,
Index: zerocouponbond.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/zerocouponbond.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zerocouponbond.hpp 24 May 2006 14:59:44 -0000 1.2
--- zerocouponbond.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 24,28 ****
namespace QuantLibAddin {
! class ZeroCouponBond : public Bond {
public:
ZeroCouponBond(
--- 24,28 ----
namespace QuantLibAddin {
! class ZeroCouponBond : public Instrument {
public:
ZeroCouponBond(
Index: vanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/vanillaoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** vanillaoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- vanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 43,47 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::VanillaOption>(
new QuantLib::VanillaOption(
blackScholesProcess,
--- 43,47 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::VanillaOption(
blackScholesProcess,
***************
*** 56,60 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument->setPricingEngine(pricingEngine);
return engineID;
}
--- 56,60 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_->setPricingEngine(pricingEngine);
return engineID;
}
Index: calendar.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/calendar.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** calendar.cpp 23 May 2006 11:49:07 -0000 1.2
--- calendar.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 30,34 ****
const std::vector <QuantLib::Calendar> &calendars) {
if (calendars.size() == 2) {
! jointCalendar_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
--- 30,34 ----
const std::vector <QuantLib::Calendar> &calendars) {
if (calendars.size() == 2) {
! libraryObject_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
***************
*** 36,40 ****
jointCalendarRule));
} else if (calendars.size() == 3) {
! jointCalendar_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
--- 36,40 ----
jointCalendarRule));
} else if (calendars.size() == 3) {
! libraryObject_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
***************
*** 43,47 ****
jointCalendarRule));
} else if (calendars.size() == 4) {
! jointCalendar_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
--- 43,47 ----
jointCalendarRule));
} else if (calendars.size() == 4) {
! libraryObject_ = boost::shared_ptr<QuantLib::JointCalendar>(
new QuantLib::JointCalendar(
calendars[0],
Index: shortratemodels.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/shortratemodels.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** shortratemodels.cpp 24 May 2006 14:59:44 -0000 1.2
--- shortratemodels.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 1,5 ****
/*
! Copyright (C) 2005 Eric Ehlers
Copyright (C) 2005 Aurelien Chanudet
--- 1,5 ----
/*
! Copyright (C) 2005, 2006 Eric Ehlers
Copyright (C) 2005 Aurelien Chanudet
***************
*** 31,35 ****
const double &sigma) {
! model_ = boost::shared_ptr<QuantLib::Vasicek>(
new QuantLib::Vasicek(a, b, lambda, sigma));
}
--- 31,35 ----
const double &sigma) {
! libraryObject_ = boost::shared_ptr<QuantLib::AffineModel>(
new QuantLib::Vasicek(a, b, lambda, sigma));
}
***************
*** 42,46 ****
QuantLib::Handle<QuantLib::YieldTermStructure> termStructureH(termStructureP);
! model_ = boost::shared_ptr<QuantLib::HullWhite>(
new QuantLib::HullWhite(termStructureH, a, sigma));
}
--- 42,46 ----
QuantLib::Handle<QuantLib::YieldTermStructure> termStructureH(termStructureP);
! libraryObject_ = boost::shared_ptr<QuantLib::AffineModel>(
new QuantLib::HullWhite(termStructureH, a, sigma));
}
Index: baseinstruments.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/baseinstruments.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** baseinstruments.hpp 8 Jun 2006 18:42:42 -0000 1.2
--- baseinstruments.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 26,52 ****
namespace QuantLibAddin {
- class Instrument : public ObjHandler::Object {
- public:
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(mInstrument);
- }
-
- const QuantLib::Instrument& getObject() const {
- return *mInstrument;
- }
-
- protected:
- boost::shared_ptr<QuantLib::Instrument> mInstrument;
- };
! class Bond : public Instrument {
! public:
! EXPORT_UNDERLYING_OBJECT(QuantLib::Bond, mInstrument)
};
class OneAssetOption : public Instrument {
- public:
- EXPORT_UNDERLYING_OBJECT(QuantLib::OneAssetOption, mInstrument)
};
}
--- 26,36 ----
namespace QuantLibAddin {
! class Instrument : public ObjHandler::LibraryObject<QuantLib::Instrument> {
};
class OneAssetOption : public Instrument {
};
+
}
Index: europeanoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/europeanoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** europeanoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- europeanoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 35,41 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::EuropeanOption, mInstrument)
-
};
--- 35,38 ----
Index: quantoforwardvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantoforwardvanillaoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** quantoforwardvanillaoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- quantoforwardvanillaoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 41,46 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::QuantoForwardVanillaOption, mInstrument)
};
--- 41,44 ----
Index: exercise.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/exercise.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exercise.hpp 19 May 2006 16:56:16 -0000 1.1
--- exercise.hpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 24,37 ****
namespace QuantLibAddin {
! class Exercise : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::static_pointer_cast<void>(exercise_);
! }
! const QuantLib::Exercise& getObject() const {
! return *exercise_;
! }
! protected:
! boost::shared_ptr<QuantLib::Exercise> exercise_;
};
--- 24,28 ----
namespace QuantLibAddin {
! class Exercise : public ObjHandler::LibraryObject<QuantLib::Exercise> {
};
Index: fixedcouponbond.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/fixedcouponbond.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** fixedcouponbond.hpp 19 May 2006 16:56:16 -0000 1.1
--- fixedcouponbond.hpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 25,29 ****
namespace QuantLibAddin {
! class FixedCouponBond : public Bond {
public:
FixedCouponBond(
--- 25,29 ----
namespace QuantLibAddin {
! class FixedCouponBond : public Instrument {
public:
FixedCouponBond(
Index: cliquetoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/cliquetoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** cliquetoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- cliquetoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 42,46 ****
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::CliquetOption>(
new QuantLib::CliquetOption(
blackScholesProcess,
--- 42,46 ----
boost::shared_ptr<QuantLib::PricingEngine> pricingEngine =
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::CliquetOption(
blackScholesProcess,
Index: schedule.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/schedule.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** schedule.hpp 8 Jun 2006 20:47:53 -0000 1.2
--- schedule.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 24,28 ****
namespace QuantLibAddin {
! class Schedule : public ObjHandler::Object {
public:
Schedule(const QuantLib::Calendar& calendar,
--- 24,28 ----
namespace QuantLibAddin {
! class Schedule : public ObjHandler::LibraryObject<QuantLib::Schedule> {
public:
Schedule(const QuantLib::Calendar& calendar,
***************
*** 34,48 ****
bool startFromEnd,
bool longFinal);
-
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(schedule_);
- }
-
- const QuantLib::Schedule& getObject() const {
- return *schedule_;
- }
-
- private:
- boost::shared_ptr<QuantLib::Schedule> schedule_;
};
--- 34,37 ----
Index: couponvectors.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/couponvectors.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** couponvectors.hpp 24 May 2006 14:59:44 -0000 1.2
--- couponvectors.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 29,44 ****
class CouponVector : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::shared_ptr<void>();
! }
!
! const CashFlowVector& getObject() const {
! return cashFlowVector_;
! }
!
virtual std::vector<std::vector<double> > getLeg() = 0;
double getBPS(const boost::shared_ptr < QuantLib::YieldTermStructure > &termStructure) const;
protected:
--- 29,40 ----
class CouponVector : public ObjHandler::Object {
! public:
virtual std::vector<std::vector<double> > getLeg() = 0;
double getBPS(const boost::shared_ptr < QuantLib::YieldTermStructure > &termStructure) const;
+
+ const CashFlowVector &getVector() {
+ return cashFlowVector_;
+ }
protected:
Index: calendar.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/calendar.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** calendar.hpp 5 Jun 2006 13:28:46 -0000 1.3
--- calendar.hpp 9 Jun 2006 18:58:47 -0000 1.4
***************
*** 25,38 ****
namespace QuantLibAddin {
! class JointCalendar : public ObjHandler::Object {
public:
JointCalendar(
const QuantLib::JointCalendarRule &jointCalendarRule,
const std::vector <QuantLib::Calendar> &calendars);
- virtual boost::shared_ptr<void> getReference() const {
- return boost::static_pointer_cast<void>(jointCalendar_);
- }
- protected:
- boost::shared_ptr<QuantLib::Calendar> jointCalendar_;
};
--- 25,33 ----
namespace QuantLibAddin {
! class JointCalendar : public ObjHandler::LibraryObject<QuantLib::Calendar> {
public:
JointCalendar(
const QuantLib::JointCalendarRule &jointCalendarRule,
const std::vector <QuantLib::Calendar> &calendars);
};
Index: vanillaswap.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/vanillaswap.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** vanillaswap.hpp 6 Jun 2006 17:16:48 -0000 1.2
--- vanillaswap.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 49,54 ****
const boost::shared_ptr < QuantLib::YieldTermStructure > &discYC);
- EXPORT_UNDERLYING_OBJECT(QuantLib::VanillaSwap, mInstrument)
-
const std::vector<std::vector<double> >& fixedLeg() {
return Swap::legAnalysis(0);
--- 49,52 ----
Index: interpolation.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/interpolation.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** interpolation.cpp 8 Jun 2006 20:49:22 -0000 1.3
--- interpolation.cpp 9 Jun 2006 18:58:47 -0000 1.4
***************
*** 35,39 ****
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! interp_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::BackwardFlatInterpolation(x_.begin(),
x_.end(),
--- 35,39 ----
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::BackwardFlatInterpolation(x_.begin(),
x_.end(),
***************
*** 47,51 ****
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! interp_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::ForwardFlatInterpolation(x_.begin(),
x_.end(),
--- 47,51 ----
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::ForwardFlatInterpolation(x_.begin(),
x_.end(),
***************
*** 60,64 ****
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! interp_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::LinearInterpolation(x_.begin(),
x_.end(),
--- 60,64 ----
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::LinearInterpolation(x_.begin(),
x_.end(),
***************
*** 78,82 ****
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! interp_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::CubicSpline(
x_.begin(), x_.end(), y_.begin(),
--- 78,82 ----
QL_REQUIRE(x.size()==y.size(), "unmatched x/y");
! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::CubicSpline(
x_.begin(), x_.end(), y_.begin(),
***************
*** 98,102 ****
double rho) : x_(x), y_(y) {
! interp_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::SABRInterpolation(
x_.begin(), x_.end(), y_.begin(),
--- 98,102 ----
double rho) : x_(x), y_(y) {
! libraryObject_ = boost::shared_ptr<QuantLib::Interpolation>(
new QuantLib::SABRInterpolation(
x_.begin(), x_.end(), y_.begin(),
Index: forwardvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardvanillaoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** forwardvanillaoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- forwardvanillaoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 37,42 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::ForwardVanillaOption, mInstrument)
};
--- 37,40 ----
Index: schedule.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/schedule.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** schedule.cpp 8 Jun 2006 20:47:53 -0000 1.2
--- schedule.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 1,4 ****
--- 1,5 ----
/*
+ Copyright (C) 2006 Eric Ehlers
Copyright (C) 2005 Aurelien Chanudet
***************
*** 34,38 ****
bool longFinal) {
! schedule_ = boost::shared_ptr<QuantLib::Schedule>(
new QuantLib::Schedule(calendar,
startDate,
--- 35,39 ----
bool longFinal) {
! libraryObject_ = boost::shared_ptr<QuantLib::Schedule>(
new QuantLib::Schedule(calendar,
startDate,
Index: shortratemodels.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/shortratemodels.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** shortratemodels.hpp 24 May 2006 14:59:44 -0000 1.2
--- shortratemodels.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 27,37 ****
namespace QuantLibAddin {
! class AffineModel : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::static_pointer_cast<void>(model_);
! }
! protected:
! boost::shared_ptr<QuantLib::AffineModel> model_;
};
--- 27,31 ----
namespace QuantLibAddin {
! class AffineModel : public ObjHandler::LibraryObject<QuantLib::AffineModel> {
};
Index: zerocouponbond.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/zerocouponbond.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** zerocouponbond.cpp 24 May 2006 14:59:44 -0000 1.2
--- zerocouponbond.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 42,47 ****
QuantLib::Handle<QuantLib::YieldTermStructure> zeroCurveH(zeroCurve);
! mInstrument =
! boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ZeroCouponBond(issueDate,
maturityDate,
--- 42,46 ----
QuantLib::Handle<QuantLib::YieldTermStructure> zeroCurveH(zeroCurve);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ZeroCouponBond(issueDate,
maturityDate,
Index: asianoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/asianoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** asianoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- asianoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 36,41 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::ContinuousAveragingAsianOption, mInstrument)
};
--- 36,39 ----
***************
*** 54,59 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::DiscreteAveragingAsianOption, mInstrument)
};
--- 52,55 ----
Index: volatilities.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/volatilities.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** volatilities.hpp 19 May 2006 16:56:16 -0000 1.1
--- volatilities.hpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 1,5 ****
/*
! Copyright (C) 2005 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
--- 1,5 ----
/*
! Copyright (C) 2005, 2006 Eric Ehlers
This file is part of QuantLib, a free-software/open-source library
***************
*** 25,35 ****
namespace QuantLibAddin {
! class BlackVolTermStructure : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::static_pointer_cast<void>(blackVolTermStructure_);
! }
! protected:
! boost::shared_ptr<QuantLib::BlackVolTermStructure> blackVolTermStructure_;
};
--- 25,29 ----
namespace QuantLibAddin {
! class BlackVolTermStructure : public ObjHandler::LibraryObject<QuantLib::BlackVolTermStructure> {
};
Index: swap.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swap.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** swap.cpp 6 Jun 2006 17:16:48 -0000 1.4
--- swap.cpp 9 Jun 2006 18:58:47 -0000 1.5
***************
*** 1,5 ****
/*
! Copyright (C) 2005 Eric Ehlers
Copyright (C) 2006 Ferdinando Ametrano
Copyright (C) 2005 Aurelien Chanudet
--- 1,5 ----
/*
! Copyright (C) 2005, 2006 Eric Ehlers
Copyright (C) 2006 Ferdinando Ametrano
Copyright (C) 2005 Aurelien Chanudet
***************
*** 34,43 ****
const boost::shared_ptr < QuantLib::YieldTermStructure > &termStructure) {
! const CashFlowVector& paidLeg = paidLegWrapper->getObject();
! const CashFlowVector& recvLeg = recvLegWrapper->getObject();
QuantLib::Handle<QuantLib::YieldTermStructure> discountingTermStructure;
discountingTermStructure.linkTo(termStructure);
! mInstrument = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::Swap(discountingTermStructure, paidLeg, recvLeg));
}
--- 34,44 ----
const boost::shared_ptr < QuantLib::YieldTermStructure > &termStructure) {
! const CashFlowVector& paidLeg = paidLegWrapper->getVector();
! getLibraryObject < QuantLib::Swap >();
! const CashFlowVector& recvLeg = recvLegWrapper->getVector();
QuantLib::Handle<QuantLib::YieldTermStructure> discountingTermStructure;
discountingTermStructure.linkTo(termStructure);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::Swap(discountingTermStructure, paidLeg, recvLeg));
}
***************
*** 45,50 ****
const std::vector<std::vector<double> >& Swap::legAnalysis(QuantLib::Size i) {
const std::vector<boost::shared_ptr<QuantLib::CashFlow> >& cashflows =
! getObject().leg(i);
flowAnalysis_.clear();
--- 46,52 ----
const std::vector<std::vector<double> >& Swap::legAnalysis(QuantLib::Size i) {
+ const boost::shared_ptr < QuantLib::Swap > temp = getLibraryObject < QuantLib::Swap >();
const std::vector<boost::shared_ptr<QuantLib::CashFlow> >& cashflows =
! temp->leg(i);
flowAnalysis_.clear();
Index: forwardrateagreement.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardrateagreement.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** forwardrateagreement.cpp 8 Jun 2006 19:53:57 -0000 1.2
--- forwardrateagreement.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 46,50 ****
discountingTermStructure.linkTo(termStructure);
! mInstrument = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardRateAgreement(valueDate,
maturityDate,
--- 46,50 ----
discountingTermStructure.linkTo(termStructure);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::ForwardRateAgreement(valueDate,
maturityDate,
Index: swap.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/swap.hpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** swap.hpp 8 Jun 2006 20:49:58 -0000 1.4
--- swap.hpp 9 Jun 2006 18:58:47 -0000 1.5
***************
*** 37,42 ****
termStructure);
- EXPORT_UNDERLYING_OBJECT(QuantLib::Swap, mInstrument);
-
const std::vector<std::vector<double> >& legAnalysis(QuantLib::Size i);
--- 37,40 ----
Index: capfloor.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/capfloor.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** capfloor.cpp 24 May 2006 14:59:44 -0000 1.2
--- capfloor.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 41,47 ****
OH_GET_OBJECT(couponVectorWrapper, couponVectorID, CouponVector)
! const CashFlowVector& couponVector = couponVectorWrapper->getObject();
! mInstrument = boost::shared_ptr<QuantLib::CapFloor>(
new QuantLib::CapFloor(option,
couponVector,
--- 41,47 ----
OH_GET_OBJECT(couponVectorWrapper, couponVectorID, CouponVector)
! const CashFlowVector& couponVector = couponVectorWrapper->getVector();
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::CapFloor(option,
couponVector,
***************
*** 55,59 ****
const boost::shared_ptr < QuantLib::AffineModel >& model) {
! engine_ = boost::shared_ptr<QuantLib::AnalyticCapFloorEngine>(
new QuantLib::AnalyticCapFloorEngine(model));
}
--- 55,59 ----
const boost::shared_ptr < QuantLib::AffineModel >& model) {
! libraryObject_ = boost::shared_ptr<QuantLib::PricingEngine>(
new QuantLib::AnalyticCapFloorEngine(model));
}
Index: volatilities.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/volatilities.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** volatilities.cpp 19 May 2006 16:56:16 -0000 1.1
--- volatilities.cpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 31,35 ****
const QuantLib::DayCounter &dayCounter) {
! blackVolTermStructure_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackConstantVol(
settlementDate,
--- 31,35 ----
const QuantLib::DayCounter &dayCounter) {
! libraryObject_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackConstantVol(
settlementDate,
***************
*** 48,52 ****
vectorVectorToMatrix(vols);
! blackVolTermStructure_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackVarianceSurface(
settlementDate,
--- 48,52 ----
vectorVectorToMatrix(vols);
! libraryObject_ = boost::shared_ptr<QuantLib::BlackVolTermStructure> (
new QuantLib::BlackVarianceSurface(
settlementDate,
***************
*** 57,61 ****
}
-
}
-
--- 57,59 ----
Index: quantovanillaoption.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantovanillaoption.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** quantovanillaoption.cpp 24 May 2006 14:59:44 -0000 1.2
--- quantovanillaoption.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 58,62 ****
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! mInstrument = boost::shared_ptr<QuantLib::QuantoVanillaOption>(
new QuantLib::QuantoVanillaOption(
termStructureH,
--- 58,62 ----
Create<boost::shared_ptr<QuantLib::PricingEngine> >()(engineID, timeSteps);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::QuantoVanillaOption(
termStructureH,
Index: vanillaswap.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/vanillaswap.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** vanillaswap.cpp 6 Jun 2006 17:16:48 -0000 1.2
--- vanillaswap.cpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 62,66 ****
QuantLib::Date(), floatStartFromEnd, floatLongFinal);
! mInstrument = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::VanillaSwap(payFixed,
nominal,
--- 62,66 ----
QuantLib::Date(), floatStartFromEnd, floatLongFinal);
! libraryObject_ = boost::shared_ptr<QuantLib::Instrument>(
new QuantLib::VanillaSwap(payFixed,
nominal,
Index: forwardrateagreement.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/forwardrateagreement.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** forwardrateagreement.hpp 8 Jun 2006 19:53:57 -0000 1.2
--- forwardrateagreement.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 41,48 ****
QuantLib::Compounding compounding = QuantLib::Simple,
QuantLib::Frequency frequency = QuantLib::Annual);
-
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::ForwardRateAgreement, mInstrument);
-
};
--- 41,44 ----
Index: interpolation.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/interpolation.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** interpolation.hpp 8 Jun 2006 20:49:22 -0000 1.3
--- interpolation.hpp 9 Jun 2006 18:58:47 -0000 1.4
***************
*** 24,37 ****
namespace QuantLibAddin {
! class Interpolation : public ObjHandler::Object {
! public:
! virtual boost::shared_ptr<void> getReference() const {
! return boost::shared_ptr<void>(interp_);
! }
! const QuantLib::Interpolation& getObject() const {
! return *interp_;
! }
! protected:
! boost::shared_ptr<QuantLib::Interpolation> interp_;
};
--- 24,28 ----
namespace QuantLibAddin {
! class Interpolation : public ObjHandler::LibraryObject<QuantLib::Interpolation> {
};
Index: exercise.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/exercise.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exercise.cpp 19 May 2006 16:56:16 -0000 1.1
--- exercise.cpp 9 Jun 2006 18:58:47 -0000 1.2
***************
*** 28,32 ****
const QuantLib::Date &latestDate,
const bool &payoffAtExpiry) {
! exercise_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::AmericanExercise(
earliestDate,
--- 28,32 ----
const QuantLib::Date &latestDate,
const bool &payoffAtExpiry) {
! libraryObject_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::AmericanExercise(
earliestDate,
***************
*** 37,41 ****
EuropeanExercise::EuropeanExercise(
const QuantLib::Date &expiryDate) {
! exercise_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::EuropeanExercise(
expiryDate));
--- 37,41 ----
EuropeanExercise::EuropeanExercise(
const QuantLib::Date &expiryDate) {
! libraryObject_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::EuropeanExercise(
expiryDate));
***************
*** 45,49 ****
const std::vector < QuantLib::Date > &dates,
const bool &payoffAtExpiry) {
! exercise_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::BermudanExercise(
dates,
--- 45,49 ----
const std::vector < QuantLib::Date > &dates,
const bool &payoffAtExpiry) {
! libraryObject_ = boost::shared_ptr<QuantLib::Exercise>(
new QuantLib::BermudanExercise(
dates,
Index: xibor.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/xibor.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** xibor.cpp 1 Jun 2006 12:51:20 -0000 1.4
--- xibor.cpp 9 Jun 2006 18:58:47 -0000 1.5
***************
*** 44,48 ****
forecastingTermStructure(fwdYC);
! index_ = boost::shared_ptr<QuantLib::Xibor>(
new QuantLib::Xibor(indexName,
tenor, timeUnits,
--- 44,48 ----
forecastingTermStructure(fwdYC);
! libraryObject_ = boost::shared_ptr<QuantLib::Xibor>(
new QuantLib::Xibor(indexName,
tenor, timeUnits,
***************
*** 55,59 ****
if(dates.size() > 0) {
QuantLib::History history(dates, fixings);
! QuantLib::IndexManager::instance().setHistory(index_->name(),
history);
}
--- 55,59 ----
if(dates.size() > 0) {
QuantLib::History history(dates, fixings);
! QuantLib::IndexManager::instance().setHistory(libraryObject_->name(),
history);
}
Index: barrieroption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/barrieroption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** barrieroption.hpp 24 May 2006 14:59:44 -0000 1.2
--- barrieroption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 39,44 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::BarrierOption, mInstrument)
};
--- 39,42 ----
Index: dividendvanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/dividendvanillaoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dividendvanillaoption.hpp 24 May 2006 14:59:44 -0000 1.2
--- dividendvanillaoption.hpp 9 Jun 2006 18:58:47 -0000 1.3
***************
*** 37,42 ****
const std::string &engineID,
const long &timeSteps);
-
- EXPORT_UNDERLYING_OBJECT(QuantLib::DividendVanillaOption, mInstrument)
};
--- 37,40 ----
Index: quantovanillaoption.hpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/qlo/quantovanillaoption.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1...
[truncated message content] |