QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
DiscretizedConvertible Class Reference

#include <ql/pricingengines/bond/discretizedconvertible.hpp>

+ Inheritance diagram for DiscretizedConvertible:
+ Collaboration diagram for DiscretizedConvertible:

Public Member Functions

 DiscretizedConvertible (ConvertibleBond::arguments, ext::shared_ptr< GeneralizedBlackScholesProcess > process, DividendSchedule dividends, Handle< Quote > creditSpread, const TimeGrid &grid=TimeGrid())
 
void reset (Size size) override
 
const ArrayconversionProbability () const
 
ArrayconversionProbability ()
 
const ArrayspreadAdjustedRate () const
 
ArrayspreadAdjustedRate ()
 
const ArraydividendValues () const
 
ArraydividendValues ()
 
std::vector< TimemandatoryTimes () const override
 
- Public Member Functions inherited from DiscretizedAsset
 DiscretizedAsset ()
 
virtual ~DiscretizedAsset ()=default
 
Time time () const
 
Timetime ()
 
const Arrayvalues () const
 
Arrayvalues ()
 
const ext::shared_ptr< Lattice > & method () const
 
void initialize (const ext::shared_ptr< Lattice > &, Time t)
 
void rollback (Time to)
 
void partialRollback (Time to)
 
Real presentValue ()
 
void preAdjustValues ()
 
void postAdjustValues ()
 
void adjustValues ()
 

Protected Member Functions

void postAdjustValuesImpl () override
 
- Protected Member Functions inherited from DiscretizedAsset
bool isOnTime (Time t) const
 
virtual void preAdjustValuesImpl ()
 

Protected Attributes

Array conversionProbability_
 
Array spreadAdjustedRate_
 
Array dividendValues_
 
- Protected Attributes inherited from DiscretizedAsset
Time time_
 
Time latestPreAdjustment_
 
Time latestPostAdjustment_
 
Array values_
 

Private Member Functions

Array adjustedGrid () const
 
void applyConvertibility ()
 
void applyCallability (Size, bool convertible)
 
void addCoupon (Size)
 

Private Attributes

ConvertibleBond::arguments arguments_
 
ext::shared_ptr< GeneralizedBlackScholesProcessprocess_
 
std::vector< TimestoppingTimes_
 
std::vector< TimecallabilityTimes_
 
std::vector< TimecouponTimes_
 
std::vector< RealcouponAmounts_
 
std::vector< TimedividendTimes_
 
Handle< QuotecreditSpread_
 
DividendSchedule dividends_
 
std::vector< DatedividendDates_
 

Additional Inherited Members

- Protected Types inherited from DiscretizedAsset
enum class  CouponAdjustment { pre , post }
 

Detailed Description

Definition at line 34 of file discretizedconvertible.hpp.

Constructor & Destructor Documentation

◆ DiscretizedConvertible()

DiscretizedConvertible ( ConvertibleBond::arguments  args,
ext::shared_ptr< GeneralizedBlackScholesProcess process,
DividendSchedule  dividends,
Handle< Quote creditSpread,
const TimeGrid grid = TimeGrid() 
)

Definition at line 28 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ reset()

void reset ( Size  size)
overridevirtual

This method should initialize the asset values to an Array of the given size and with values depending on the particular asset.

Implements DiscretizedAsset.

Definition at line 100 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:

◆ conversionProbability() [1/2]

const Array & conversionProbability ( ) const

Definition at line 44 of file discretizedconvertible.hpp.

◆ conversionProbability() [2/2]

Array & conversionProbability ( )

Definition at line 47 of file discretizedconvertible.hpp.

◆ spreadAdjustedRate() [1/2]

const Array & spreadAdjustedRate ( ) const

Definition at line 49 of file discretizedconvertible.hpp.

◆ spreadAdjustedRate() [2/2]

Array & spreadAdjustedRate ( )

Definition at line 50 of file discretizedconvertible.hpp.

◆ dividendValues() [1/2]

const Array & dividendValues ( ) const

Definition at line 52 of file discretizedconvertible.hpp.

◆ dividendValues() [2/2]

Array & dividendValues ( )

Definition at line 53 of file discretizedconvertible.hpp.

◆ mandatoryTimes()

std::vector< Time > mandatoryTimes ( ) const
overridevirtual

This method returns the times at which the numerical method should stop while rolling back the asset. Typical examples include payment times, exercise times and such.

Note
The returned values are not guaranteed to be sorted.

Implements DiscretizedAsset.

Definition at line 55 of file discretizedconvertible.hpp.

◆ postAdjustValuesImpl()

void postAdjustValuesImpl ( )
overrideprotectedvirtual

This method performs the actual post-adjustment

Reimplemented from DiscretizedAsset.

Definition at line 132 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:

◆ adjustedGrid()

Array adjustedGrid ( ) const
private

Definition at line 230 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyConvertibility()

void applyConvertibility ( )
private

Definition at line 168 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyCallability()

void applyCallability ( Size  i,
bool  convertible 
)
private

Definition at line 179 of file discretizedconvertible.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCoupon()

void addCoupon ( Size  i)
private

Definition at line 226 of file discretizedconvertible.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ conversionProbability_

Array conversionProbability_
protected

Definition at line 68 of file discretizedconvertible.hpp.

◆ spreadAdjustedRate_

Array spreadAdjustedRate_
protected

Definition at line 68 of file discretizedconvertible.hpp.

◆ dividendValues_

Array dividendValues_
protected

Definition at line 68 of file discretizedconvertible.hpp.

◆ arguments_

ConvertibleBond::arguments arguments_
private

Definition at line 75 of file discretizedconvertible.hpp.

◆ process_

ext::shared_ptr<GeneralizedBlackScholesProcess> process_
private

Definition at line 76 of file discretizedconvertible.hpp.

◆ stoppingTimes_

std::vector<Time> stoppingTimes_
private

Definition at line 77 of file discretizedconvertible.hpp.

◆ callabilityTimes_

std::vector<Time> callabilityTimes_
private

Definition at line 78 of file discretizedconvertible.hpp.

◆ couponTimes_

std::vector<Time> couponTimes_
private

Definition at line 79 of file discretizedconvertible.hpp.

◆ couponAmounts_

std::vector<Real> couponAmounts_
private

Definition at line 80 of file discretizedconvertible.hpp.

◆ dividendTimes_

std::vector<Time> dividendTimes_
private

Definition at line 81 of file discretizedconvertible.hpp.

◆ creditSpread_

Handle<Quote> creditSpread_
private

Definition at line 82 of file discretizedconvertible.hpp.

◆ dividends_

DividendSchedule dividends_
private

Definition at line 83 of file discretizedconvertible.hpp.

◆ dividendDates_

std::vector<Date> dividendDates_
private

Definition at line 84 of file discretizedconvertible.hpp.