#include <Market.h>
Public Types | |
| typedef UK | GB |
| Static collection of all supported UK markets. Includes public references to each supported Market. | |
Public Member Functions | |
| const std::string & | getName (void) const |
| Returns the Market name. This is usually in the form of : CountryCode/MarketName. Example : US/Municipal. | |
| const DayCountBasis & | getDefaultDayCountBasis (void) const |
| Returns the default DayCountBasis. | |
| const DayCountBasis & | getDefaultDayCountBasis (const Security::ClassID &classID) const |
| Returns the default DayCountBasis for the given classID, or the Market default if one doesn't exist for the given classID. | |
| void | setDefaultDayCountBasis (const DayCountBasis &defaultDayCountBasis) |
| Change the default DayCountBasis for this Market. | |
| void | setDefaultDayCountBasis (const Security::ClassID &classID, const DayCountBasis &defaultDayCountBasis) |
| Change the default DayCountBasis for Security implementation specified by classID. | |
| const InterestFrequency & | getDefaultInterestFrequency (void) const |
| Returns the default InterestFrequency. | |
| const InterestFrequency & | getDefaultInterestFrequency (const Security::ClassID &classID) const |
| Returns the default InterestFrequency for the given classID, or the Market default if one doesn't exist for the given classID. | |
| void | setDefaultInterestFrequency (const InterestFrequency &defaultInterestFrequency) |
| Change the default InterestFrequency for this Market. | |
| void | setDefaultInterestFrequency (const Security::ClassID &classID, const InterestFrequency &defaultInterestFrequency) |
| Change the default InterestFrequency for the Security implementation specified by classID. | |
| bool | getDefaultEomAdjust (void) const |
| Returns the default End of Month adjustment setting. This setting determines whether the End of Month adjust rule will be used for calculating days between dates. | |
| bool | getDefaultEomAdjust (const Security::ClassID &classID) const |
| Returns the default End of Month adjustment setting for the given classID, or the Market default if one doesn't exist for the given classID. | |
| void | setDefaultEomAdjust (bool defaultEomAdjust) |
| Change the default End of Month adjustment setting. This setting determines whether the End of Month adjust rule will be used for calculating days between dates. | |
| void | setDefaultEomAdjust (const Security::ClassID &classID, bool defaultEomAdjust) |
| Change the default End of Month adjustment setting for the Security specified by the given classID. | |
| int | getDefaultSettlementDays (void) const |
| Returns the default days to settlement for this Market. | |
| int | getDefaultSettlementDays (const Security::ClassID &classID) const |
| Returns the default days to settlement for the given classID, or the Market default if one doesn't exist for the given classID. | |
| void | setDefaultSettlementDays (int defaultSettlementDays) |
| Change the default days to settlement for this Market. | |
| void | setDefaultSettlementDays (const Security::ClassID &classID, int defaultSettlementDays) |
| Change the default days to settlement for the Security implementation specified by classID. | |
| double | preparePriceForDisplay (double price) const |
| Prepares a price for display according to market conventions. | |
| double | prepareYieldForDisplay (double yield) const |
| Prepares a yield for display according to market conventions. | |
| double | prepareAIForDisplay (double accruedInterest) const |
| Prepares accrued interest for display according to market conventions. | |
Static Public Member Functions | |
| static const Market * | getByName (const std::string &name) |
| Get a pointer to the Market instance that corresponds to the provided name. | |
Protected Member Functions | |
| const com::ftlabs::fisa::calc::Calculator * | createCalculator (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, const double parValue, const double interestRate, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
| const com::ftlabs::fisa::calc::Calculator * | createCalculator (const FISADate &settlementDate, const FISADate *exDividendDate, const Redemption &redemption, const double parValue, const InterestRateSchedule &interestRateSchedule, const DayCountBasis &dayCountBasis, const int interestFrequency, const bool eomAdjust, const FISADate *datedDate, const FISADate *firstInterestDate, const HolidaySchedule *holidaySchedule) const throw ( com::ftlabs::fisa::calc::CalculationException ) |
Private Types | |
| typedef std::map< std::string, const Market * > | market_map |
| typedef std::map< Security::ClassID, const DayCountBasis * > | class_dayCountBasis_map |
| typedef std::map< Security::ClassID, const InterestFrequency * > | class_interestFrequency_map |
| typedef std::map< Security::ClassID, bool > | class_eomAdjust_map |
| typedef std::map< Security::ClassID, int > | class_settlementDays_map |
Private Member Functions | |
| Market (std::string name, const DayCountBasis &defaultDayCountBasis, const InterestFrequency &defaultInterestFrequency, bool defaultEomAdjust, int defaultSettlementDays, const DisplayFormat &priceDisplayFormat, const DisplayFormat &yieldDisplayFormat, const DisplayFormat &aiDisplayFormat) | |
| Market (std::string name, const DayCountBasis &defaultDayCountBasis, const InterestFrequency &defaultInterestFrequency, bool defaultEomAdjust, int defaultSettlementDays, const com::ftlabs::fisa::calc::CalculatorFactory &CalculatorFactory, const DisplayFormat &priceDisplayFormat, const DisplayFormat &yieldDisplayFormat, const DisplayFormat &aiDisplayFormat) | |
| Market (const Market &market) | |
| virtual | ~Market (void) |
| Market & | operator= (const Market &market) |
| void | setValues (std::string name, const DayCountBasis &defaultDayCountBasis, const InterestFrequency &defaultInterestFrequency, bool defaultEomAdjust, int defaultSettlementDays, const com::ftlabs::fisa::calc::CalculatorFactory &CalculatorFactory, const DisplayFormat &priceDisplayFormat, const DisplayFormat &yieldDisplayFormat, const DisplayFormat &aiDisplayFormat) |
Private Attributes | |
| std::string | name |
| const DayCountBasis * | defaultDayCountBasis |
| const InterestFrequency * | defaultInterestFrequency |
| bool | defaultEomAdjust |
| int | defaultSettlementDays |
| const com::ftlabs::fisa::calc::CalculatorFactory * | calculatorFactory |
| class_dayCountBasis_map * | classDayCountBases |
| class_interestFrequency_map * | classInterestFrequencies |
| class_eomAdjust_map * | classEomAdjust |
| class_settlementDays_map * | classSettlementDays |
| const DisplayFormat * | priceDisplayFormat |
| const DisplayFormat * | yieldDisplayFormat |
| const DisplayFormat * | aiDisplayFormat |
Static Private Attributes | |
| static market_map | markets |
| static const TruncatingDisplayFormat | truncating_3 |
| static const RoundingDisplayFormat | rounding_6 |
| static const RoundingDisplayFormat | rounding_3 |
| static const RoundingDisplayFormat | rounding_2 |
Friends | |
| class | Market::US |
| class | Market::CA |
| class | Market::FR |
| class | Market::DE |
| class | Market::IT |
| class | Market::JP |
| class | Market::UK |
| class | FixedInterestRateSecurity |
| class | IndexLinkedSecurity |
| class | SteppedCouponSecurity |
Classes | |
| class | CA |
| Static Collection of all supported CA markets. Includes public references to each supported Market. More... | |
| class | DE |
| Static Collection of all supported DE markets. Includes public references to each supported Market. More... | |
| class | FR |
| Static Collection of all supported FR markets. Includes public references to each supported Market. More... | |
| class | IT |
| Static Collection of all supported IT markets. Includes public references to each supported Market. More... | |
| class | JP |
| Static Collection of all supported JP markets. Includes public references to each supported Market. More... | |
| class | MarketCollection |
| class | UK |
| Static Collection of all supported UK markets. Includes public references to each supported Market. More... | |
| class | US |
| Static Collection of all supported US markets. Includes public references to each supported Market. More... | |
To get an instance of Market, you can either use the static public country collections such as Market::US::CORPORATE when available, or the static getByName() method such as Market.getByName( "US/Corporate" ).
typedef std::map<std::string, const Market *> com::ftlabs::fisa::Market::market_map [private] |
typedef std::map<Security::ClassID, const DayCountBasis*> com::ftlabs::fisa::Market::class_dayCountBasis_map [private] |
typedef std::map<Security::ClassID, const InterestFrequency*> com::ftlabs::fisa::Market::class_interestFrequency_map [private] |
typedef std::map<Security::ClassID, bool> com::ftlabs::fisa::Market::class_eomAdjust_map [private] |
typedef std::map<Security::ClassID, int> com::ftlabs::fisa::Market::class_settlementDays_map [private] |
| typedef UK com::ftlabs::fisa::Market::GB |
Static collection of all supported UK markets. Includes public references to each supported Market.
<deprecated>Use Market::UK instead.</deprecated>
| com::ftlabs::fisa::Market::Market | ( | std::string | name, | |
| const DayCountBasis & | defaultDayCountBasis, | |||
| const InterestFrequency & | defaultInterestFrequency, | |||
| bool | defaultEomAdjust, | |||
| int | defaultSettlementDays, | |||
| const DisplayFormat & | priceDisplayFormat, | |||
| const DisplayFormat & | yieldDisplayFormat, | |||
| const DisplayFormat & | aiDisplayFormat | |||
| ) | [private] |
| com::ftlabs::fisa::Market::Market | ( | std::string | name, | |
| const DayCountBasis & | defaultDayCountBasis, | |||
| const InterestFrequency & | defaultInterestFrequency, | |||
| bool | defaultEomAdjust, | |||
| int | defaultSettlementDays, | |||
| const com::ftlabs::fisa::calc::CalculatorFactory & | CalculatorFactory, | |||
| const DisplayFormat & | priceDisplayFormat, | |||
| const DisplayFormat & | yieldDisplayFormat, | |||
| const DisplayFormat & | aiDisplayFormat | |||
| ) | [private] |
| com::ftlabs::fisa::Market::Market | ( | const Market & | market | ) | [inline, private] |
| virtual com::ftlabs::fisa::Market::~Market | ( | void | ) | [private, virtual] |
| void com::ftlabs::fisa::Market::setValues | ( | std::string | name, | |
| const DayCountBasis & | defaultDayCountBasis, | |||
| const InterestFrequency & | defaultInterestFrequency, | |||
| bool | defaultEomAdjust, | |||
| int | defaultSettlementDays, | |||
| const com::ftlabs::fisa::calc::CalculatorFactory & | CalculatorFactory, | |||
| const DisplayFormat & | priceDisplayFormat, | |||
| const DisplayFormat & | yieldDisplayFormat, | |||
| const DisplayFormat & | aiDisplayFormat | |||
| ) | [private] |
| const com::ftlabs::fisa::calc::Calculator* com::ftlabs::fisa::Market::createCalculator | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| const double | parValue, | |||
| const double | interestRate, | |||
| const DayCountBasis & | dayCountBasis, | |||
| const int | interestFrequency, | |||
| const bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [protected] |
| const com::ftlabs::fisa::calc::Calculator* com::ftlabs::fisa::Market::createCalculator | ( | const FISADate & | settlementDate, | |
| const FISADate * | exDividendDate, | |||
| const Redemption & | redemption, | |||
| const double | parValue, | |||
| const InterestRateSchedule & | interestRateSchedule, | |||
| const DayCountBasis & | dayCountBasis, | |||
| const int | interestFrequency, | |||
| const bool | eomAdjust, | |||
| const FISADate * | datedDate, | |||
| const FISADate * | firstInterestDate, | |||
| const HolidaySchedule * | holidaySchedule | |||
| ) | const throw ( com::ftlabs::fisa::calc::CalculationException ) [protected] |
| static const Market* com::ftlabs::fisa::Market::getByName | ( | const std::string & | name | ) | [static] |
| const std::string& com::ftlabs::fisa::Market::getName | ( | void | ) | const |
| const DayCountBasis& com::ftlabs::fisa::Market::getDefaultDayCountBasis | ( | void | ) | const |
| const DayCountBasis& com::ftlabs::fisa::Market::getDefaultDayCountBasis | ( | const Security::ClassID & | classID | ) | const |
Returns the default DayCountBasis for the given classID, or the Market default if one doesn't exist for the given classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. |
| void com::ftlabs::fisa::Market::setDefaultDayCountBasis | ( | const DayCountBasis & | defaultDayCountBasis | ) |
Change the default DayCountBasis for this Market.
| defaultDayCountBasis | new default DayCountBasis. |
| void com::ftlabs::fisa::Market::setDefaultDayCountBasis | ( | const Security::ClassID & | classID, | |
| const DayCountBasis & | defaultDayCountBasis | |||
| ) |
Change the default DayCountBasis for Security implementation specified by classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. | |
| defaultDayCountBasis | new default DayCountBasis. |
| const InterestFrequency& com::ftlabs::fisa::Market::getDefaultInterestFrequency | ( | void | ) | const |
| const InterestFrequency& com::ftlabs::fisa::Market::getDefaultInterestFrequency | ( | const Security::ClassID & | classID | ) | const |
Returns the default InterestFrequency for the given classID, or the Market default if one doesn't exist for the given classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. |
| void com::ftlabs::fisa::Market::setDefaultInterestFrequency | ( | const InterestFrequency & | defaultInterestFrequency | ) |
Change the default InterestFrequency for this Market.
| defaultInterestFrequency | new default InterestFrequency. |
| void com::ftlabs::fisa::Market::setDefaultInterestFrequency | ( | const Security::ClassID & | classID, | |
| const InterestFrequency & | defaultInterestFrequency | |||
| ) |
Change the default InterestFrequency for the Security implementation specified by classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. | |
| defaultInterestFrequency | new default InterestFrequency. |
| bool com::ftlabs::fisa::Market::getDefaultEomAdjust | ( | void | ) | const |
Returns the default End of Month adjustment setting. This setting determines whether the End of Month adjust rule will be used for calculating days between dates.
| bool com::ftlabs::fisa::Market::getDefaultEomAdjust | ( | const Security::ClassID & | classID | ) | const |
Returns the default End of Month adjustment setting for the given classID, or the Market default if one doesn't exist for the given classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. |
| void com::ftlabs::fisa::Market::setDefaultEomAdjust | ( | bool | defaultEomAdjust | ) |
Change the default End of Month adjustment setting. This setting determines whether the End of Month adjust rule will be used for calculating days between dates.
| defaultEomAdjust | new default End of Month adjust setting. |
| void com::ftlabs::fisa::Market::setDefaultEomAdjust | ( | const Security::ClassID & | classID, | |
| bool | defaultEomAdjust | |||
| ) |
Change the default End of Month adjustment setting for the Security specified by the given classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. | |
| defaultEomAdjust | new default End of Month adjust setting. |
| int com::ftlabs::fisa::Market::getDefaultSettlementDays | ( | void | ) | const |
| int com::ftlabs::fisa::Market::getDefaultSettlementDays | ( | const Security::ClassID & | classID | ) | const |
Returns the default days to settlement for the given classID, or the Market default if one doesn't exist for the given classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. |
| void com::ftlabs::fisa::Market::setDefaultSettlementDays | ( | int | defaultSettlementDays | ) |
Change the default days to settlement for this Market.
| defaultSettlementDays | new default days to settlement. |
| void com::ftlabs::fisa::Market::setDefaultSettlementDays | ( | const Security::ClassID & | classID, | |
| int | defaultSettlementDays | |||
| ) |
Change the default days to settlement for the Security implementation specified by classID.
| classID | A unique Security::ClassID used to identify a particular Security Implementation. | |
| defaultSettlementDays | new default days to settlement. |
| double com::ftlabs::fisa::Market::preparePriceForDisplay | ( | double | price | ) | const |
Prepares a price for display according to market conventions.
| price | The unformatted price. |
| double com::ftlabs::fisa::Market::prepareYieldForDisplay | ( | double | yield | ) | const |
Prepares a yield for display according to market conventions.
| yield | The unformatted yield. |
| double com::ftlabs::fisa::Market::prepareAIForDisplay | ( | double | accruedInterest | ) | const |
Prepares accrued interest for display according to market conventions.
| accruedInterest | The unformatted accrued interest. |
friend class Market::US [friend] |
friend class Market::CA [friend] |
friend class Market::FR [friend] |
friend class Market::DE [friend] |
friend class Market::IT [friend] |
friend class Market::JP [friend] |
friend class Market::UK [friend] |
friend class FixedInterestRateSecurity [friend] |
friend class IndexLinkedSecurity [friend] |
friend class SteppedCouponSecurity [friend] |
market_map com::ftlabs::fisa::Market::markets [static, private] |
const TruncatingDisplayFormat com::ftlabs::fisa::Market::truncating_3 [static, private] |
const RoundingDisplayFormat com::ftlabs::fisa::Market::rounding_6 [static, private] |
const RoundingDisplayFormat com::ftlabs::fisa::Market::rounding_3 [static, private] |
const RoundingDisplayFormat com::ftlabs::fisa::Market::rounding_2 [static, private] |
std::string com::ftlabs::fisa::Market::name [private] |
const DayCountBasis* com::ftlabs::fisa::Market::defaultDayCountBasis [private] |
const InterestFrequency* com::ftlabs::fisa::Market::defaultInterestFrequency [private] |
bool com::ftlabs::fisa::Market::defaultEomAdjust [private] |
int com::ftlabs::fisa::Market::defaultSettlementDays [private] |
const com::ftlabs::fisa::calc::CalculatorFactory* com::ftlabs::fisa::Market::calculatorFactory [private] |
const DisplayFormat* com::ftlabs::fisa::Market::priceDisplayFormat [private] |
const DisplayFormat* com::ftlabs::fisa::Market::yieldDisplayFormat [private] |
const DisplayFormat* com::ftlabs::fisa::Market::aiDisplayFormat [private] |
1.5.2