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

#include <flatvol.hpp>

+ Inheritance diagram for FlatVolFactory:
+ Collaboration diagram for FlatVolFactory:

Public Member Functions

 FlatVolFactory (Real longTermCorrelation, Real beta, std::vector< Time > times, std::vector< Volatility > vols, Handle< YieldTermStructure > yieldCurve, Spread displacement)
 
ext::shared_ptr< MarketModelcreate (const EvolutionDescription &, Size numberOfFactors) const override
 
void update () override
 
- Public Member Functions inherited from MarketModelFactory
 ~MarketModelFactory () override=default
 
virtual ext::shared_ptr< MarketModelcreate (const EvolutionDescription &, Size numberOfFactors) const =0
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Private Attributes

Real longTermCorrelation_
 
Real beta_
 
std::vector< Timetimes_
 
std::vector< Volatilityvols_
 
Interpolation volatility_
 
Handle< YieldTermStructureyieldCurve_
 
Spread displacement_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

Definition at line 66 of file flatvol.hpp.

Constructor & Destructor Documentation

◆ FlatVolFactory()

FlatVolFactory ( Real  longTermCorrelation,
Real  beta,
std::vector< Time times,
std::vector< Volatility vols,
Handle< YieldTermStructure yieldCurve,
Spread  displacement 
)

Definition at line 150 of file flatvol.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ext::shared_ptr< MarketModel > create ( const EvolutionDescription evolution,
Size  numberOfFactors 
) const
overridevirtual

Implements MarketModelFactory.

Definition at line 165 of file flatvol.cpp.

+ Here is the call graph for this function:

◆ update()

void update ( )
overridevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Implements Observer.

Definition at line 201 of file flatvol.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ longTermCorrelation_

Real longTermCorrelation_
private

Definition at line 86 of file flatvol.hpp.

◆ beta_

Real beta_
private

Definition at line 86 of file flatvol.hpp.

◆ times_

std::vector<Time> times_
private

Definition at line 88 of file flatvol.hpp.

◆ vols_

std::vector<Volatility> vols_
private

Definition at line 89 of file flatvol.hpp.

◆ volatility_

Interpolation volatility_
private

Definition at line 90 of file flatvol.hpp.

◆ yieldCurve_

Handle<YieldTermStructure> yieldCurve_
private

Definition at line 92 of file flatvol.hpp.

◆ displacement_

Spread displacement_
private

Definition at line 93 of file flatvol.hpp.