|
dxFeed Graal CXX API v5.0.0
|
Theo price is a snapshot of theoretical option price computation that is periodically performed by dxPrice model-free computation. More...
#include <TheoPrice.hpp>
Inheritance diagram for TheoPrice:Public Types | |
| using | Ptr = std::shared_ptr<TheoPrice> |
| The alias to a type of shared pointer to the TheoPrice object. | |
| using | Unique = std::unique_ptr<TheoPrice> |
| The alias to a type of unique pointer to the TheoPrice object. | |
Public Types inherited from MarketEvent | |
| using | Ptr = std::shared_ptr<MarketEvent> |
| The alias to a type of shared pointer to the MarketEvent object. | |
Public Types inherited from EventTypeWithSymbol< std::string > | |
| using | Ptr = std::shared_ptr<EventTypeWithSymbol<std::string>> |
| The alias to a type of shared pointer to the EventTypeWithSymbol's child object. | |
| using | Ptr |
| The alias to a type of shared pointer to the EventTypeWithSymbol's child object. | |
Public Types inherited from EventType | |
| using | Ptr = std::shared_ptr<EventType> |
| The alias to a type of shared pointer to the EventType object. | |
Public Types inherited from SharedEntity | |
| using | Ptr = std::shared_ptr<SharedEntity> |
| The alias to a type of shared pointer to the SharedEntity object. | |
Public Types inherited from TimeSeriesEvent | |
| using | Ptr = std::shared_ptr<TimeSeriesEvent> |
| The alias to a type of shared pointer to the TimeSeriesEvent object. | |
Public Types inherited from IndexedEvent | |
| using | Ptr = std::shared_ptr<IndexedEvent> |
| The alias to a type of shared pointer to the IndexedEvent object. | |
Public Types inherited from LastingEvent | |
| using | Ptr = std::shared_ptr<LastingEvent> |
| The alias to a type of shared pointer to the LastingEvent object. | |
Public Member Functions | |
| void * | toGraal () const override |
| Allocates memory for the dxFeed Graal SDK structure (recursively if necessary). | |
| void | assign (std::shared_ptr< EventType > event) override |
| Replaces the contents of the event. | |
| TheoPrice () noexcept=default | |
| Creates new theoprice event with default values. | |
| TheoPrice (const StringLike &eventSymbol) noexcept | |
| Creates a new theoprice event with the specified event symbol. | |
| const IndexedEventSource & | getSource () const &noexcept override |
| Returns the source of this event. | |
| std::int32_t | getEventFlags () const noexcept override |
| Returns transactional event flags. | |
| EventFlagsMask | getEventFlagsMask () const noexcept override |
| Returns transactional event flags. | |
| void | setEventFlags (std::int32_t eventFlags) noexcept override |
| Changes transactional event flags. | |
| void | setEventFlags (const EventFlagsMask &eventFlags) noexcept override |
| Changes transactional event flags. | |
| std::int64_t | getIndex () const noexcept override |
| Returns a unique per-symbol index of this event. | |
| void | setIndex (std::int64_t index) override |
| Changes the unique per-symbol index of this event. | |
| std::int64_t | getTime () const noexcept override |
| Returns the timestamp of the event in milliseconds. | |
| void | setTime (std::int64_t time) noexcept |
| Changes the timestamp of the event in milliseconds. | |
| std::int32_t | getSequence () const noexcept |
| Returns the sequence number of this event to distinguish events that have the same time. | |
| void | setSequence (std::int32_t sequence) |
| Changes sequence number of this event. | |
| double | getPrice () const noexcept |
| Returns theoretical option price. | |
| void | setPrice (double price) noexcept |
| Changes theoretical option price. | |
| double | getUnderlyingPrice () const noexcept |
| Returns underlying price at the time of theo price computation. | |
| void | setUnderlyingPrice (double underlyingPrice) noexcept |
| Changes underlying price at the time of theo price computation. | |
| double | getDelta () const noexcept |
| Returns delta of theoretical price. | |
| void | setDelta (double delta) noexcept |
| Changes delta of theoretical price. | |
| double | getGamma () const noexcept |
| Returns gamma of theoretical price. | |
| void | setGamma (double gamma) noexcept |
| Changes gamma of theoretical price. | |
| double | getDividend () const noexcept |
| Returns implied simple dividend return of the corresponding option series. | |
| void | setDividend (double dividend) noexcept |
| Changes implied simple dividend return of the corresponding option series. | |
| double | getInterest () const noexcept |
| Returns implied simple interest return of the corresponding option series. | |
| void | setInterest (double interest) noexcept |
| Changes implied simple interest return of the corresponding option series. | |
| std::string | toString () const override |
| Returns a string representation of the current object. | |
Public Member Functions inherited from MarketEvent | |
| const std::string & | getEventSymbol () const &noexcept override |
| Returns a symbol of this event. | |
| const std::optional< std::string > & | getEventSymbolOpt () const &noexcept override |
| Returns a symbol of this event. | |
| void | setEventSymbol (const StringLike &eventSymbol) noexcept override |
| Changes symbol of this event. | |
| std::int64_t | getEventTime () const noexcept override |
| Returns time when an event was created or zero when time is not available. | |
| void | setEventTime (std::int64_t eventTime) noexcept override |
| Changes event creation time. | |
Public Member Functions inherited from EventTypeWithSymbol< std::string > | |
| virtual void | setEventSymbol (const std::string &eventSymbol) noexcept=0 |
| Changes the event symbol that identifies this event type in subscription. | |
Public Member Functions inherited from SharedEntity | |
| template<typename T> | |
| bool | is () const noexcept |
| Checks that the pointer to the current type could be converted to type T* In other words: whether type T belongs to the type hierarchy in which the current type resides. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T. | |
| template<typename T> | |
| std::shared_ptr< T > | sharedAs () const noexcept |
| Returns a pointer to the current object wrapped in a smart pointer to type T. | |
Public Member Functions inherited from Entity | |
| virtual | ~Entity () noexcept=default |
| The default virtual d-tor. | |
Public Member Functions inherited from TimeSeriesEvent | |
| const IndexedEventSource & | getSource () const &noexcept override |
| Returns the source identifier for this event, which is always DEFAULT for time-series events. | |
| std::int64_t | getIndex () const noexcept override |
| Returns unique per-symbol index of this event. | |
| virtual std::int64_t | getEventId () const noexcept |
| Returns unique per-symbol index of this event. | |
Static Public Member Functions | |
| static Ptr | fromGraal (void *graalNative) |
| Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure. | |
| static void | freeGraal (void *graalNative) |
| Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary). | |
Static Public Attributes | |
| static const EventTypeEnum & | TYPE = EventTypeEnum::THEO_PRICE |
| Type identifier and additional information about the current event class. | |
| static constexpr std::uint32_t | MAX_SEQUENCE = (1U << 22U) - 1U |
| Maximum allowed sequence value. | |
Static Public Attributes inherited from IndexedEvent | |
| static const EventFlag | TX_PENDING = EventFlag::TX_PENDING |
0x01 - A bitmask to get transaction pending indicator from the value of eventFlags property. | |
| static const EventFlag | REMOVE_EVENT = EventFlag::REMOVE_EVENT |
0x02 - A bitmask to get removal indicator from the value of eventFlags property. | |
| static const EventFlag | SNAPSHOT_BEGIN = EventFlag::SNAPSHOT_BEGIN |
0x04 - A bitmask to get snapshot begin indicator from the value of eventFlags property. | |
| static const EventFlag | SNAPSHOT_END = EventFlag::SNAPSHOT_END |
0x08 - A bitmask to get snapshot end indicator from the value of eventFlags property. | |
| static const EventFlag | SNAPSHOT_SNIP = EventFlag::SNAPSHOT_SNIP |
0x10 - A bitmask to get snapshot snip indicator from the value of eventFlags property. | |
| static const EventFlag | SNAPSHOT_MODE = EventFlag::SNAPSHOT_MODE |
0x40 - A bitmask to set snapshot mode indicator into the value of eventFlags property. | |
Additional Inherited Members | |
Protected Member Functions inherited from MarketEvent | |
| MarketEvent (const StringLike &eventSymbol) noexcept | |
Protected constructor for concrete implementation classes that initializes eventSymbol property. | |
Theo price is a snapshot of theoretical option price computation that is periodically performed by dxPrice model-free computation.
It represents the most recent information that is available about the corresponding values at any given moment of time. The values include first and second order derivative of the price curve by price, so that the real-time theoretical option price can be estimated on real-time changes of the underlying price in the vicinity.
Some TheoPrice sources provide a consistent view of the set of known TheoPrice. The corresponding information is carried in eventFlags property. The logic behind this property is detailed in IndexedEvent class documentation. Multiple event sources for the same symbol are not supported for TheoPrice, thus source property is always DEFAULT.
TimeSeriesEventModel class handles all the snapshot and transaction logic and conveniently represents a list current of time-series events order by their time.
Publishing of TheoPrice events follows the general rules explained in TimeSeriesEvent class documentation.
This event is implemented on top of QDS records TheoPrice.
|
inlineexplicitnoexcept |
Creates a new theoprice event with the specified event symbol.
| eventSymbol | The event symbol. |
References MarketEvent::MarketEvent().
|
overridevirtual |
Replaces the contents of the event.
| event | the event to use as a source. |
Reimplemented from MarketEvent.
References MarketEvent::assign().
|
static |
Releases the memory occupied by the dxFeed Graal SDK structure (recursively if necessary).
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
|
static |
Creates an object of the current type and fills it with data from the dxFeed Graal SDK structure.
| graalNative | The pointer to the dxFeed Graal SDK structure. |
| InvalidArgumentException |
|
inlinenoexcept |
Returns delta of theoretical price.
Delta is the first derivative of theoretical price by the underlying price.
|
inlinenoexcept |
Returns implied simple dividend return of the corresponding option series.
|
inlineoverridevirtualnoexcept |
Returns transactional event flags.
See EventFlag "Event Flags" section.
Implements IndexedEvent.
|
inlineoverridevirtualnoexcept |
Returns transactional event flags.
See EventFlag "Event Flags" section.
Implements IndexedEvent.
|
inlinenoexcept |
Returns gamma of theoretical price.
Gamma is the second derivative of theoretical price by the underlying price.
|
inlineoverridevirtualnoexcept |
Returns a unique per-symbol index of this event.
The index is composed of time and sequence. Changing either time or sequence changes the event index.
Implements IndexedEvent.
|
inlinenoexcept |
Returns implied simple interest return of the corresponding option series.
|
inlinenoexcept |
Returns theoretical option price.
|
inlinenoexcept |
Returns the sequence number of this event to distinguish events that have the same time.
This sequence number does not have to be unique and does not need to be sequential. Sequence can range from 0 to MAX_SEQUENCE.
References MAX_SEQUENCE.
Referenced by setTime().
|
inlineoverridevirtualnoexcept |
Returns the source of this event.
Implements IndexedEvent.
References IndexedEventSource::DEFAULT.
|
inlineoverridevirtualnoexcept |
Returns the timestamp of the event in milliseconds.
Implements TimeSeriesEvent.
|
inlinenoexcept |
Returns underlying price at the time of theo price computation.
|
inlinenoexcept |
Changes delta of theoretical price.
| delta | delta of theoretical price. |
|
inlinenoexcept |
Changes implied simple dividend return of the corresponding option series.
| dividend | implied simple dividend return of the corresponding option series. |
|
inlineoverridevirtualnoexcept |
Changes transactional event flags.
See EventFlag "Event Flags" section.
| eventFlags | transactional event flags' mask. |
Implements IndexedEvent.
References EventFlagsMask::getMask().
|
inlineoverridevirtualnoexcept |
Changes transactional event flags.
See EventFlag "Event Flags" section.
| eventFlags | transactional event flags. |
Implements IndexedEvent.
|
inlinenoexcept |
Changes gamma of theoretical price.
| gamma | gamma of theoretical price. |
|
inlineoverridevirtual |
Changes the unique per-symbol index of this event.
The index is composed of time and sequence and invocation of this method changes time and sequence. Do not use this method directly. Change time and/or sequence.
| index | the event index. |
Implements IndexedEvent.
|
inlinenoexcept |
Changes implied simple interest return of the corresponding option series.
| interest | implied simple interest return of the corresponding option series. |
|
inlinenoexcept |
Changes theoretical option price.
| price | theoretical option price. |
| void TheoPrice::setSequence | ( | std::int32_t | sequence | ) |
Changes sequence number of this event.
| sequence | the sequence. |
| InvalidArgumentException |
References MAX_SEQUENCE.
|
inlinenoexcept |
Changes the timestamp of the event in milliseconds.
| time | timestamp of the event in milliseconds. |
References getSequence().
|
inlinenoexcept |
Changes underlying price at the time of theo price computation.
| underlyingPrice | underlying price at the time of theo price computation. |
|
overridevirtual |
Allocates memory for the dxFeed Graal SDK structure (recursively if necessary).
Fills the dxFeed Graal SDK structure's fields by the data of the current entity (recursively if necessary). Returns the pointer to the filled structure.
Implements EventType.
|
overridevirtual |
Returns a string representation of the current object.
Reimplemented from EventType.
|
staticconstexpr |
Maximum allowed sequence value.
Referenced by getSequence(), and setSequence().