Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Ascot Class Reference

ascot More...

#include <qle/instruments/ascot.hpp>

+ Inheritance diagram for Ascot:
+ Collaboration diagram for Ascot:

Classes

class  arguments
 
class  engine
 

Public Member Functions

 Ascot (Option::Type callPut, const ext::shared_ptr< Exercise > &exercise, const Real &bondQuantity, const ext::shared_ptr< ConvertibleBond2 > &bond, const Leg &fundingLeg)
 
const Option::Type callPut ()
 
ext::shared_ptr< Exercise > exercise ()
 
const Real bondQuantity ()
 
const ext::shared_ptr< ConvertibleBond2 > & underlyingBond () const
 
const Leg & fundingLeg () const
 
bool isExpired () const override
 

Protected Member Functions

void setupArguments (PricingEngine::arguments *) const override
 

Protected Attributes

Option::Type callPut_
 
ext::shared_ptr< Exercise > exercise_
 
Real bondQuantity_
 
ext::shared_ptr< ConvertibleBond2bond_
 
Leg fundingLeg_
 

Detailed Description

ascot

Definition at line 45 of file ascot.hpp.

Constructor & Destructor Documentation

◆ Ascot()

Ascot ( Option::Type  callPut,
const ext::shared_ptr< Exercise > &  exercise,
const Real &  bondQuantity,
const ext::shared_ptr< ConvertibleBond2 > &  bond,
const Leg &  fundingLeg 
)

Definition at line 35 of file ascot.cpp.

38
39 registerWith(bond_);
40 bond_->alwaysForwardNotifications();
41
42 registerWith(Settings::instance().evaluationDate());
43 for (auto& c : fundingLeg_) {
44 registerWith(c);
45 if (auto lazy = QuantLib::ext::dynamic_pointer_cast<LazyObject>(c))
46 lazy->alwaysForwardNotifications();
47 }
48}
const Leg & fundingLeg() const
Definition: ascot.hpp:58
ext::shared_ptr< ConvertibleBond2 > bond_
Definition: ascot.hpp:68
Option::Type callPut_
Definition: ascot.hpp:65
const Option::Type callPut()
Definition: ascot.hpp:53
Real bondQuantity_
Definition: ascot.hpp:67
Leg fundingLeg_
Definition: ascot.hpp:69
ext::shared_ptr< Exercise > exercise_
Definition: ascot.hpp:66
ext::shared_ptr< Exercise > exercise()
Definition: ascot.hpp:54
const Real bondQuantity()
Definition: ascot.hpp:55

Member Function Documentation

◆ callPut()

const Option::Type callPut ( )

Definition at line 53 of file ascot.hpp.

53{ return callPut_; }

◆ exercise()

ext::shared_ptr< Exercise > exercise ( )

Definition at line 54 of file ascot.hpp.

54{ return exercise_; }

◆ bondQuantity()

const Real bondQuantity ( )

Definition at line 55 of file ascot.hpp.

55{ return bondQuantity_; }

◆ underlyingBond()

const ext::shared_ptr< ConvertibleBond2 > & underlyingBond ( ) const

Definition at line 56 of file ascot.hpp.

56{ return bond_; }

◆ fundingLeg()

const Leg & fundingLeg ( ) const

Definition at line 58 of file ascot.hpp.

58{ return fundingLeg_; }

◆ isExpired()

bool isExpired ( ) const
override

Definition at line 60 of file ascot.hpp.

60{ return bond_->isExpired(); }

◆ setupArguments()

void setupArguments ( PricingEngine::arguments *  args) const
overrideprotected

Definition at line 50 of file ascot.cpp.

50 {
51
52 Ascot::arguments* arguments = dynamic_cast<Ascot::arguments*>(args);
53
54 QL_REQUIRE(arguments != 0, "wrong argument type");
55
56 arguments->callPut = callPut_;
57 arguments->exercise = exercise_;
58 arguments->bondQuantity = bondQuantity_;
59 arguments->bond = bond_;
60 arguments->fundingLeg = fundingLeg_;
61}

Member Data Documentation

◆ callPut_

Option::Type callPut_
protected

Definition at line 65 of file ascot.hpp.

◆ exercise_

ext::shared_ptr<Exercise> exercise_
protected

Definition at line 66 of file ascot.hpp.

◆ bondQuantity_

Real bondQuantity_
protected

Definition at line 67 of file ascot.hpp.

◆ bond_

ext::shared_ptr<ConvertibleBond2> bond_
protected

Definition at line 68 of file ascot.hpp.

◆ fundingLeg_

Leg fundingLeg_
protected

Definition at line 69 of file ascot.hpp.