Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
RussiaModified::ExchangeImpl Class Reference
+ Inheritance diagram for RussiaModified::ExchangeImpl:
+ Collaboration diagram for RussiaModified::ExchangeImpl:

Public Member Functions

 ExchangeImpl ()
 
std::string name () const override
 
bool isBusinessDay (const Date &) const override
 

Private Attributes

Calendar originalSettlementCalendar_
 
Calendar originalExchangeCalendar_
 

Detailed Description

Definition at line 47 of file russia.hpp.

Constructor & Destructor Documentation

◆ ExchangeImpl()

Definition at line 30 of file russia.cpp.

30 {
31 originalSettlementCalendar_ = Russia(Russia::Settlement);
32 originalExchangeCalendar_ = Russia(Russia::MOEX);
33 }

Member Function Documentation

◆ name()

std::string name ( ) const
override

Definition at line 50 of file russia.hpp.

50{ return "Moscow exchange, modified"; }

◆ isBusinessDay()

bool isBusinessDay ( const Date &  date) const
override

Definition at line 58 of file russia.cpp.

58 {
59 // The exchange was formally established in 2011, so data are only
60 // available from 2012 to present.
61 // We use the settlement calendar as a proxy before 2012
62 if (date.year() < 2012)
63 return originalSettlementCalendar_.isBusinessDay(date);
64 else
65 return originalExchangeCalendar_.isBusinessDay(date);
66 }

Member Data Documentation

◆ originalSettlementCalendar_

Calendar originalSettlementCalendar_
private

Definition at line 53 of file russia.hpp.

◆ originalExchangeCalendar_

Calendar originalExchangeCalendar_
private

Definition at line 53 of file russia.hpp.