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

#include <qle/instruments/nullinstrument.hpp>

+ Inheritance diagram for NullInstrument:
+ Collaboration diagram for NullInstrument:

Public Member Functions

 NullInstrument ()
 
Instrument interface
bool isExpired () const override
 Always returns true. More...
 
void performCalculations () const override
 Populate results. More...
 

Detailed Description

A null instrument that always returns an NPV of 0

Definition at line 33 of file nullinstrument.hpp.

Constructor & Destructor Documentation

◆ NullInstrument()

Definition at line 35 of file nullinstrument.hpp.

35{}

Member Function Documentation

◆ isExpired()

bool isExpired ( ) const
override

Always returns true.

Definition at line 46 of file nullinstrument.hpp.

46 {
47 return true;
48}

◆ performCalculations()

void performCalculations ( ) const
override

Populate results.

Definition at line 50 of file nullinstrument.hpp.

50 {
51 NPV_ = 0.0;
52 errorEstimate_ = 0.0;
53}