Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
BondBuilder::Result Struct Reference

#include <ored/portfolio/bond.hpp>

+ Collaboration diagram for BondBuilder::Result:

Public Member Functions

double inflationFactor () const
 

Public Attributes

std::string builderLabel
 
QuantLib::ext::shared_ptr< QuantLib::Bond > bond
 
QuantLib::ext::shared_ptr< QuantExt::ModelBuildermodelBuilder
 
bool isInflationLinked = false
 
bool hasCreditRisk = true
 
std::string currency
 
std::string creditCurveId
 
std::string securityId
 
std::string creditGroup
 
QuantExt::BondIndex::PriceQuoteMethod priceQuoteMethod = QuantExt::BondIndex::PriceQuoteMethod::PercentageOfPar
 
double priceQuoteBaseValue = 1.0
 

Detailed Description

Definition at line 183 of file bond.hpp.

Member Function Documentation

◆ inflationFactor()

double inflationFactor ( ) const

Definition at line 315 of file bond.cpp.

315 {
316 if (!isInflationLinked) {
317 return 1.0;
318 } else {
319 QL_REQUIRE(bond, "need to set the bond before calling inflationFactor()");
320 double factor = 1.0;
321 try {
323 } catch (const std::exception& e) {
324 ALOG("Failed to compute the inflation price factor for the bond "
325 << securityId << ", fallback to use factor 1, got " << e.what());
326 }
327 return factor;
328 }
329}
#define ALOG(text)
Logging Macro (Level = Alert)
Definition: log.hpp:544
Real inflationLinkedBondQuoteFactor(const boost::shared_ptr< QuantLib::Bond > &bond)
QuantLib::ext::shared_ptr< QuantLib::Bond > bond
Definition: bond.hpp:185
+ Here is the call graph for this function:

Member Data Documentation

◆ builderLabel

std::string builderLabel

Definition at line 184 of file bond.hpp.

◆ bond

QuantLib::ext::shared_ptr<QuantLib::Bond> bond

Definition at line 185 of file bond.hpp.

◆ modelBuilder

QuantLib::ext::shared_ptr<QuantExt::ModelBuilder> modelBuilder

Definition at line 186 of file bond.hpp.

◆ isInflationLinked

bool isInflationLinked = false

Definition at line 187 of file bond.hpp.

◆ hasCreditRisk

bool hasCreditRisk = true

Definition at line 188 of file bond.hpp.

◆ currency

std::string currency

Definition at line 189 of file bond.hpp.

◆ creditCurveId

std::string creditCurveId

Definition at line 190 of file bond.hpp.

◆ securityId

std::string securityId

Definition at line 191 of file bond.hpp.

◆ creditGroup

std::string creditGroup

Definition at line 192 of file bond.hpp.

◆ priceQuoteMethod

QuantExt::BondIndex::PriceQuoteMethod priceQuoteMethod = QuantExt::BondIndex::PriceQuoteMethod::PercentageOfPar

Definition at line 193 of file bond.hpp.

◆ priceQuoteBaseValue

double priceQuoteBaseValue = 1.0

Definition at line 194 of file bond.hpp.