Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Classes | List of all members
EquityForward Class Reference

#include <qle/instruments/equityforward.hpp>

+ Inheritance diagram for EquityForward:
+ Collaboration diagram for EquityForward:

Classes

class  arguments
 
class  engine
 

Public Member Functions

Constructors
 EquityForward (const std::string &name, const Currency &currency, const Position::Type &longShort, const Real &quantity, const Date &maturityDate, const Real &strike)
 
Instrument interface
bool isExpired () const override
 
void setupArguments (PricingEngine::arguments *) const override
 

Additional interface

std::string name_
 
Currency currency_
 
Position::Type longShort_
 
Real quantity_
 
Date maturityDate_
 
Real strike_
 
const std::string & name () const
 
Currency currency () const
 
Position::Type longShort () const
 
Real quantity () const
 
Date maturityDate () const
 
Real strike () const
 

Detailed Description

This class holds the term sheet data for an Equity Forward instrument.

Definition at line 42 of file equityforward.hpp.

Constructor & Destructor Documentation

◆ EquityForward()

EquityForward ( const std::string &  name,
const Currency &  currency,
const Position::Type &  longShort,
const Real &  quantity,
const Date &  maturityDate,
const Real &  strike 
)
Parameters
nameEquity Name
currencyCurrency
longShortif true, we are long the forward
quantityQuantity (number of lots \(times\) lot size)
maturityDateMaturity date
strikeStrike

Definition at line 26 of file equityforward.cpp.

Member Function Documentation

◆ isExpired()

bool isExpired ( ) const
override

Definition at line 31 of file equityforward.cpp.

31{ return detail::simple_event(maturityDate_).hasOccurred(); }

◆ setupArguments()

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

Definition at line 33 of file equityforward.cpp.

33 {
34 EquityForward::arguments* arguments = dynamic_cast<EquityForward::arguments*>(args);
35 QL_REQUIRE(arguments != 0, "wrong argument type in equityforward");
36 arguments->name = name_;
37 arguments->currency = currency_;
38 arguments->longShort = longShort_;
39 arguments->quantity = quantity_;
40 arguments->maturityDate = maturityDate_;
41 arguments->strike = strike_;
42}

◆ name()

const std::string & name ( ) const

Definition at line 68 of file equityforward.hpp.

68{ return name_; }

◆ currency()

Currency currency ( ) const

Definition at line 69 of file equityforward.hpp.

69{ return currency_; }

◆ longShort()

Position::Type longShort ( ) const

Definition at line 70 of file equityforward.hpp.

70{ return longShort_; }

◆ quantity()

Real quantity ( ) const

Definition at line 71 of file equityforward.hpp.

71{ return quantity_; }

◆ maturityDate()

Date maturityDate ( ) const

Definition at line 72 of file equityforward.hpp.

72{ return maturityDate_; }

◆ strike()

Real strike ( ) const

Definition at line 73 of file equityforward.hpp.

73{ return strike_; }

Member Data Documentation

◆ name_

std::string name_
private

Definition at line 77 of file equityforward.hpp.

◆ currency_

Currency currency_
private

Definition at line 78 of file equityforward.hpp.

◆ longShort_

Position::Type longShort_
private

Definition at line 79 of file equityforward.hpp.

◆ quantity_

Real quantity_
private

Definition at line 80 of file equityforward.hpp.

◆ maturityDate_

Date maturityDate_
private

Definition at line 81 of file equityforward.hpp.

◆ strike_

Real strike_
private

Definition at line 82 of file equityforward.hpp.