Update of /cvsroot/quantlibaddin/QuantLibAddin/Clients/C++
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13401/Clients/C++
Modified Files:
capfloor.cpp instruments.cpp options.cpp qlademo.cpp
Log Message:
replace 'instanceName/handle' with 'objectID'
Index: options.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/Clients/C++/options.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** options.cpp 19 May 2006 16:56:16 -0000 1.1
--- options.cpp 16 Jul 2006 10:42:41 -0000 1.2
***************
*** 51,55 ****
obj_ptr blackScholesProcess(new QuantLibAddin::GeneralizedBlackScholesProcess(
! "my_blackconstantvol", // black constant vol handle
underlying, // underlying
"Actual365Fixed", // daycount convention
--- 51,55 ----
obj_ptr blackScholesProcess(new QuantLibAddin::GeneralizedBlackScholesProcess(
! "my_blackconstantvol", // black constant vol object ID
underlying, // underlying
"Actual365Fixed", // daycount convention
***************
*** 65,83 ****
obj_ptr vanillaOption(new QuantLibAddin::VanillaOption(
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"AE", // engine type (analytic european)
timeSteps)); // time steps
storeObject("my_vanillaOption", vanillaOption);
vanillaOption->setProperties(boost::shared_ptr<ObjHandler::ValueObject>(new QuantLibAddin::ValueObjects::qlVanillaOption(
! "my_vanillaOption", // instance name
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"AE", // engine type (analytic european)
timeSteps))); // time steps
--- 65,83 ----
obj_ptr vanillaOption(new QuantLibAddin::VanillaOption(
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"AE", // engine type (analytic european)
timeSteps)); // time steps
storeObject("my_vanillaOption", vanillaOption);
vanillaOption->setProperties(boost::shared_ptr<ObjHandler::ValueObject>(new QuantLibAddin::ValueObjects::qlVanillaOption(
! "my_vanillaOption", // object ID
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"AE", // engine type (analytic european)
timeSteps))); // time steps
***************
*** 92,100 ****
obj_ptr continuousAveragingAsianOption(new QuantLibAddin::ContinuousAveragingAsianOption(
"Geometric", // average type
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"ACGAPA", // engine type (AnalyticContinuousGeometricAveragePriceAsianEngine)
timeSteps)); // time steps
--- 92,100 ----
obj_ptr continuousAveragingAsianOption(new QuantLibAddin::ContinuousAveragingAsianOption(
"Geometric", // average type
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"ACGAPA", // engine type (AnalyticContinuousGeometricAveragePriceAsianEngine)
timeSteps)); // time steps
***************
*** 110,118 ****
0, // past fixings
fixingDates, // fixingDates
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"ADGAPA", // engine type (AnalyticDiscreteGeometricAveragePriceAsianEngine)
timeSteps)); // time steps
--- 110,118 ----
0, // past fixings
fixingDates, // fixingDates
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"ADGAPA", // engine type (AnalyticDiscreteGeometricAveragePriceAsianEngine)
timeSteps)); // time steps
***************
*** 124,132 ****
35.0, // barrier
3.0, // rebate
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"AB", // engine type (AnalyticBarrierEngine)
timeSteps)); // time steps
--- 124,132 ----
35.0, // barrier
3.0, // rebate
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"AB", // engine type (AnalyticBarrierEngine)
timeSteps)); // time steps
***************
*** 137,141 ****
resetDates.push_back(Date(12, March, 2020).serialNumber());
obj_ptr cliquetOption(new QuantLibAddin::CliquetOption(
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
strike, // strike price
--- 137,141 ----
resetDates.push_back(Date(12, March, 2020).serialNumber());
obj_ptr cliquetOption(new QuantLibAddin::CliquetOption(
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
strike, // strike price
***************
*** 155,163 ****
obj_ptr dividendVanillaOption(new QuantLibAddin::DividendVanillaOption(
! "my_blackscholesprocess", // stochastic process handle
"Call", // option type
"Vanilla", // payoff type
10.0, // strike price
! "my_exercise", // exercise handle
dividendDates, // dividend dates
dividends, // dividends
--- 155,163 ----
obj_ptr dividendVanillaOption(new QuantLibAddin::DividendVanillaOption(
! "my_blackscholesprocess", // stochastic process object ID
"Call", // option type
"Vanilla", // payoff type
10.0, // strike price
! "my_exercise", // exercise object ID
dividendDates, // dividend dates
dividends, // dividends
***************
*** 172,180 ****
12, // moneyness
resetDate, // reset date
! "my_blackscholesprocess", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type (plain vanilla)
strike, // strike price
! "my_exercise", // exercise handle
"FE", // engine type (ForwardEngine)
timeSteps)); // time steps
--- 172,180 ----
12, // moneyness
resetDate, // reset date
! "my_blackscholesprocess", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type (plain vanilla)
strike, // strike price
! "my_exercise", // exercise object ID
"FE", // engine type (ForwardEngine)
timeSteps)); // time steps
Index: capfloor.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/Clients/C++/capfloor.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** capfloor.cpp 19 May 2006 16:56:16 -0000 1.1
--- capfloor.cpp 16 Jul 2006 10:42:40 -0000 1.2
***************
*** 83,91 ****
"Unadjusted",
"Simple"));
! std::ostringstream handle;
! handle << datum.n << "M";
! ObjHandler::storeObject(handle.str(), depositRateHelper);
! rateHelpers.push_back(handle.str());
}
--- 83,91 ----
"Unadjusted",
"Simple"));
! std::ostringstream objectID;
! objectID << datum.n << "M";
! ObjHandler::storeObject(objectID.str(), depositRateHelper);
! rateHelpers.push_back(objectID.str());
}
***************
*** 106,114 ****
"Simple")); // floating day counter
! std::ostringstream handle;
! handle << datum.n << "Y";
! ObjHandler::storeObject(handle.str(), swapRateHelper);
! rateHelpers.push_back(handle.str());
}
--- 106,114 ----
"Simple")); // floating day counter
! std::ostringstream objectID;
! objectID << datum.n << "Y";
! ObjHandler::storeObject(objectID.str(), swapRateHelper);
! rateHelpers.push_back(objectID.str());
}
Index: instruments.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/Clients/C++/instruments.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** instruments.cpp 19 May 2006 16:56:16 -0000 1.1
--- instruments.cpp 16 Jul 2006 10:42:41 -0000 1.2
***************
*** 85,93 ****
"Unadjusted",
"Simple"));
! std::ostringstream handle;
! handle << datum.n << "M";
! ObjHandler::storeObject(handle.str(), depositRateHelper);
! rateHelpers.push_back(handle.str());
}
--- 85,93 ----
"Unadjusted",
"Simple"));
! std::ostringstream objectID;
! objectID << datum.n << "M";
! ObjHandler::storeObject(objectID.str(), depositRateHelper);
! rateHelpers.push_back(objectID.str());
}
***************
*** 108,116 ****
"Simple")); // floating day counter
! std::ostringstream handle;
! handle << datum.n << "Y";
! ObjHandler::storeObject(handle.str(), swapRateHelper);
! rateHelpers.push_back(handle.str());
}
--- 108,116 ----
"Simple")); // floating day counter
! std::ostringstream objectID;
! objectID << datum.n << "Y";
! ObjHandler::storeObject(objectID.str(), swapRateHelper);
! rateHelpers.push_back(objectID.str());
}
Index: qlademo.cpp
===================================================================
RCS file: /cvsroot/quantlibaddin/QuantLibAddin/Clients/C++/qlademo.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** qlademo.cpp 19 May 2006 16:56:16 -0000 1.1
--- qlademo.cpp 16 Jul 2006 10:42:41 -0000 1.2
***************
*** 58,62 ****
obj_ptr blackScholesProcess(new QuantLibAddin::GeneralizedBlackScholesProcess(
! "my_blackconstantvol", // black constant vol handle
underlying, // underlying
Actual360(), // daycount convention
--- 58,62 ----
obj_ptr blackScholesProcess(new QuantLibAddin::GeneralizedBlackScholesProcess(
! "my_blackconstantvol", // black constant vol object ID
underlying, // underlying
Actual360(), // daycount convention
***************
*** 73,91 ****
obj_ptr vanillaOption(new QuantLibAddin::VanillaOption(
! "my_blackscholes", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"JR", // engine type (jarrow rudd)
timeSteps)); // time steps
storeObject("my_option", vanillaOption);
vanillaOption->setProperties(boost::shared_ptr<ObjHandler::ValueObject>(new QuantLibAddin::ValueObjects::qlVanillaOption(
! "my_option", // instance name
! "my_blackscholes", // stochastic process handle
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise handle
"JR", // engine type (jarrow rudd)
timeSteps))); // time steps
--- 73,91 ----
obj_ptr vanillaOption(new QuantLibAddin::VanillaOption(
! "my_blackscholes", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"JR", // engine type (jarrow rudd)
timeSteps)); // time steps
storeObject("my_option", vanillaOption);
vanillaOption->setProperties(boost::shared_ptr<ObjHandler::ValueObject>(new QuantLibAddin::ValueObjects::qlVanillaOption(
! "my_option", // object ID
! "my_blackscholes", // stochastic process object ID
"Put", // option type
"Vanilla", // payoff type
strike, // strike price
! "my_exercise", // exercise object ID
"JR", // engine type (jarrow rudd)
timeSteps))); // time steps
|