![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
Reference data for one instrument. More...
#include <algotradelib/src/core/instrument.hpp>
Public Member Functions | |
| DateExclusion | dates_exclude (Date day) const |
| Tests whether the listing and delisting dates rule a day out. | |
Public Attributes | |
| InstrumentId | id_ |
| The instrument. | |
| std::string | name_ |
| The local-language name, as the broker spells it. | |
| std::string | english_name_ |
| The English name, or empty. | |
| std::string | isin_ |
| The ISIN, or empty. | |
| MarketSegment | segment_ |
| The market segment. | |
| SecurityType | type_ {SecurityType::UNKNOWN} |
| The kind of security, which selects the price grid. | |
| InstrumentStatus | status_ {InstrumentStatus::UNKNOWN} |
| Listed, awaiting listing, or delisted. | |
| Currency | currency_ |
| The currency it trades in. | |
| bool | common_share_ {true} |
| Whether this is the common share, not a preferred or derived line. | |
| StatedDate | listed_on_ |
| The listing date. | |
| StatedDate | delisted_on_ |
| The delisting date; always NOT_STATED from Kiwoom, which publishes none. | |
| std::optional< Decimal64 > | shares_outstanding_ |
| Shares outstanding, if published; KIS's blank or zero is empty, never zero shares. | |
| std::optional< Decimal64 > | lot_size_ |
| The order quantity increment, if the broker publishes one. | |
| PriceRule | price_rule_ |
| The price grid; kind UNKNOWN where the library has no table. | |
Reference data for one instrument.
Fields a broker may omit are optional or empty. price_rule_ is the library's grid, chosen by price_rule_for from the security type.
Definition at line 474 of file instrument.hpp.
|
inline |
Tests whether the listing and delisting dates rule a day out.
| day | The day. |
Definition at line 516 of file instrument.hpp.
| bool algotradelib::Instrument::common_share_ {true} |
Whether this is the common share, not a preferred or derived line.
Definition at line 492 of file instrument.hpp.
| Currency algotradelib::Instrument::currency_ |
The currency it trades in.
Definition at line 490 of file instrument.hpp.
Referenced by algotradelib::strategy::weight_target().
| StatedDate algotradelib::Instrument::delisted_on_ |
The delisting date; always NOT_STATED from Kiwoom, which publishes none.
Definition at line 500 of file instrument.hpp.
Referenced by dates_exclude().
| std::string algotradelib::Instrument::english_name_ |
The English name, or empty.
Definition at line 480 of file instrument.hpp.
| InstrumentId algotradelib::Instrument::id_ |
The instrument.
Definition at line 476 of file instrument.hpp.
Referenced by algotradelib::runner::Context< BrokerTag, CapsType >::set_instrument().
| std::string algotradelib::Instrument::isin_ |
The ISIN, or empty.
Definition at line 482 of file instrument.hpp.
| StatedDate algotradelib::Instrument::listed_on_ |
The listing date.
Toss sends null for none; KIS sends "" (and probably "00000000"); Kiwoom sends "".
Definition at line 498 of file instrument.hpp.
Referenced by dates_exclude().
| std::optional<Decimal64> algotradelib::Instrument::lot_size_ |
The order quantity increment, if the broker publishes one.
Definition at line 504 of file instrument.hpp.
| std::string algotradelib::Instrument::name_ |
The local-language name, as the broker spells it.
Definition at line 478 of file instrument.hpp.
| PriceRule algotradelib::Instrument::price_rule_ |
The price grid; kind UNKNOWN where the library has no table.
Definition at line 506 of file instrument.hpp.
Referenced by algotradelib::strategy::reconcile(), and algotradelib::strategy::reconcile().
| MarketSegment algotradelib::Instrument::segment_ |
The market segment.
Definition at line 484 of file instrument.hpp.
| std::optional<Decimal64> algotradelib::Instrument::shares_outstanding_ |
Shares outstanding, if published; KIS's blank or zero is empty, never zero shares.
Definition at line 502 of file instrument.hpp.
| InstrumentStatus algotradelib::Instrument::status_ {InstrumentStatus::UNKNOWN} |
Listed, awaiting listing, or delisted.
Definition at line 488 of file instrument.hpp.
| SecurityType algotradelib::Instrument::type_ {SecurityType::UNKNOWN} |
The kind of security, which selects the price grid.
Definition at line 486 of file instrument.hpp.