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

#include <discretizedcapfloor.hpp>

+ Inheritance diagram for DiscretizedCapFloor:
+ Collaboration diagram for DiscretizedCapFloor:

Public Member Functions

 DiscretizedCapFloor (const CapFloor::arguments &args, const Date &referenceDate, const DayCounter &dayCounter)
 
void reset (Size size) override
 
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 preAdjustValuesImpl () override
 
void postAdjustValuesImpl () override
 
- Protected Member Functions inherited from DiscretizedAsset
bool isOnTime (Time t) const
 

Private Attributes

CapFloor::arguments arguments_
 
std::vector< TimestartTimes_
 
std::vector< TimeendTimes_
 

Additional Inherited Members

- Protected Types inherited from DiscretizedAsset
enum class  CouponAdjustment { pre , post }
 
- Protected Attributes inherited from DiscretizedAsset
Time time_
 
Time latestPreAdjustment_
 
Time latestPostAdjustment_
 
Array values_
 

Detailed Description

Definition at line 33 of file discretizedcapfloor.hpp.

Constructor & Destructor Documentation

◆ DiscretizedCapFloor()

DiscretizedCapFloor ( const CapFloor::arguments args,
const Date referenceDate,
const DayCounter dayCounter 
)

Definition at line 25 of file discretizedcapfloor.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 41 of file discretizedcapfloor.cpp.

+ Here is the call graph for this function:

◆ 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 46 of file discretizedcapfloor.cpp.

+ Here is the caller graph for this function:

◆ preAdjustValuesImpl()

void preAdjustValuesImpl ( )
overrideprotectedvirtual

This method performs the actual pre-adjustment

Reimplemented from DiscretizedAsset.

Definition at line 53 of file discretizedcapfloor.cpp.

+ Here is the call graph for this function:

◆ postAdjustValuesImpl()

void postAdjustValuesImpl ( )
overrideprotectedvirtual

This method performs the actual post-adjustment

Reimplemented from DiscretizedAsset.

Definition at line 88 of file discretizedcapfloor.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ arguments_

CapFloor::arguments arguments_
private

Definition at line 46 of file discretizedcapfloor.hpp.

◆ startTimes_

std::vector<Time> startTimes_
private

Definition at line 47 of file discretizedcapfloor.hpp.

◆ endTimes_

std::vector<Time> endTimes_
private

Definition at line 48 of file discretizedcapfloor.hpp.