Skip to content

Commit

Permalink
Remove qlFixedRateBond2 in line with lballabio/QuantLib#1815
Browse files Browse the repository at this point in the history
  • Loading branch information
igitur committed Apr 26, 2024
1 parent 9970466 commit 3bea88f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 119 deletions.
65 changes: 0 additions & 65 deletions QuantLibAddin/gensrc/metadata/functions/bonds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1477,71 +1477,6 @@
</ParameterList>
</Constructor>

<Constructor name='qlFixedRateBond2'>
<libraryFunction>FixedRateBond</libraryFunction>
<SupportedPlatforms>
<!--SupportedPlatform name='Excel' calcInWizard='false'/-->
<SupportedPlatform name='Excel'/>
<SupportedPlatform name='Calc'/>
<SupportedPlatform name='Cpp'/>
</SupportedPlatforms>
<ParameterList>
<Parameters>
<Parameter name='Description' default='std::string()'>
<type>string</type>
<tensorRank>scalar</tensorRank>
<description>Bond description string. Autogenerated if null</description>
</Parameter>
<Parameter name='Currency' examplevalue='EUR'>
<type>QuantLib::Currency</type>
<tensorRank>scalar</tensorRank>
<description>bond Currency.</description>
</Parameter>
<Parameter name='SettlementDays' exampleValue='3'>
<type>QuantLib::Size</type>
<tensorRank>scalar</tensorRank>
<description>settlement days.</description>
</Parameter>
<Parameter name='FaceAmount' default='100.0'>
<type>QuantLib::Real</type>
<tensorRank>scalar</tensorRank>
<description>Face nominal amount.</description>
</Parameter>
<Parameter name='ScheduleID'>
<type>QuantLib::Schedule</type>
<superType>libraryClass</superType>
<tensorRank>scalar</tensorRank>
<description>Schedule object ID.</description>
</Parameter>
<Parameter name='Coupons'>
<type>QuantLib::InterestRate</type>
<tensorRank>vector</tensorRank>
<description>coupon InterestRate IDs.</description>
</Parameter>
<Parameter name='PaymentBDC' default='"Following"'>
<type>QuantLib::BusinessDayConvention</type>
<tensorRank>scalar</tensorRank>
<description>payment business day convention.</description>
</Parameter>
<Parameter name='Redemption' default='100.0'>
<type>QuantLib::Real</type>
<tensorRank>scalar</tensorRank>
<description>Redemption value.</description>
</Parameter>
<Parameter name='IssueDate' default='QuantLib::Date()'>
<type>QuantLib::Date</type>
<tensorRank>scalar</tensorRank>
<description>issue date: the bond can't be traded until then.</description>
</Parameter>
<Parameter name='PaymentCalendar' exampleValue='TARGET'>
<type>QuantLib::Calendar</type>
<tensorRank>scalar</tensorRank>
<description>payment holiday calendar (e.g. TARGET).</description>
</Parameter>
</Parameters>
</ParameterList>
</Constructor>

<Constructor name='qlFloatingRateBond'>
<libraryFunction>FloatingRateBond</libraryFunction>
<SupportedPlatforms>
Expand Down
41 changes: 0 additions & 41 deletions QuantLibAddin/qlo/bonds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,47 +207,6 @@ namespace QuantLibAddin {
}
}

FixedRateBond::FixedRateBond(
const shared_ptr<ObjectHandler::ValueObject>& properties,
const string& des,
const QuantLib::Currency& cur,
QuantLib::Natural settlementDays,
QuantLib::Real faceAmount,
const shared_ptr<QuantLib::Schedule>& schedule,
const vector<shared_ptr<QuantLib::InterestRate> >& coupons,
QuantLib::BusinessDayConvention paymentConvention,
QuantLib::Real redemption,
const Date& issueDate,
const QuantLib::Calendar& paymentCalendar,
bool permanent)
: Bond(properties, des, cur, permanent)
{
vector<QuantLib::InterestRate> couponRate(coupons.size());

for (Size i=0; i<coupons.size(); ++i)
couponRate[i] = *coupons[i];

qlBondObject_ = shared_ptr<QuantLib::FixedRateBond>(new
QuantLib::FixedRateBond(settlementDays, faceAmount,
*schedule,
couponRate,
paymentConvention,
redemption,
issueDate,
paymentCalendar));
libraryObject_ = qlBondObject_;
if (description_.empty()) {
std::ostringstream temp;
temp << "FixedRateBond ";
temp << QuantLib::io::iso_date(qlBondObject_->maturityDate());
if (couponRate.size()==1)
temp << " " << coupons[0]->rate()*100.0 << "%";
else
temp << " STEP";
description_ = temp.str();
}
}

FixedRateBond::FixedRateBond(
const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
const std::string& des,
Expand Down
13 changes: 0 additions & 13 deletions QuantLibAddin/qlo/bonds.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,6 @@ namespace QuantLibAddin {
const QuantLib::Date& issueDate,
const QuantLib::Calendar& paymentCalendar,
bool permanent);
FixedRateBond(
const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
const std::string& des,
const QuantLib::Currency& cur,
QuantLib::Natural settlementDays,
QuantLib::Real faceAmount,
const boost::shared_ptr<QuantLib::Schedule>& schedule,
const std::vector<boost::shared_ptr<QuantLib::InterestRate> >& coupons,
QuantLib::BusinessDayConvention paymentConvention,
QuantLib::Real redemption,
const QuantLib::Date& issueDate,
const QuantLib::Calendar& paymentCalendar,
bool permanent);
protected:
FixedRateBond(
const boost::shared_ptr<ObjectHandler::ValueObject>& properties,
Expand Down

0 comments on commit 3bea88f

Please sign in to comment.