public class TheoPrice extends MarketEvent implements TimeSeriesEvent<String>, LastingEvent<String>
TheoPrice event has the following properties:
eventSymbol - symbol of this event;
eventFlags - transactional event flags;
index - unique per-symbol index of this event;
time - timestamp of this event in milliseconds;
sequence - sequence number of this event to distinguish events that have the same time;
price - theoretical price;
underlyingPrice - underlying price at the time of theo price computation;
delta - delta of the theoretical price;
gamma - gamma of the theoretical price;
dividend - implied simple dividend return of the corresponding option series;
interest - implied simple interest return of the corresponding option series.
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.
It relies on the code of AbstractIndexedEventModel to handle this logic.
Use the source code of AbstractIndexedEventModel for clarification on transactions and snapshot logic.
TimeSeriesEvent class
documentation.
See the model section for a mathematical background on the values in this event.
TheoPrice.| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SEQUENCE
Maximum allowed sequence value.
|
REMOVE_EVENT, SNAPSHOT_BEGIN, SNAPSHOT_END, SNAPSHOT_MODE, SNAPSHOT_SNIP, TX_PENDING| Constructor and Description |
|---|
TheoPrice()
Creates new theo price event with default values.
|
TheoPrice(String eventSymbol)
Creates new theo price event with the specified event symbol.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDelta()
Returns delta of the theoretical price.
|
double |
getDividend()
Returns implied simple dividend return of the corresponding option series.
|
int |
getEventFlags()
Returns transactional event flags.
|
double |
getGamma()
Returns gamma of the theoretical price.
|
long |
getIndex()
Returns unique per-symbol index of this event.
|
double |
getInterest()
Returns implied simple interest return of the corresponding option series.
|
double |
getPrice()
Returns theoretical option price.
|
int |
getSequence()
Returns sequence number of this event to distinguish events that have the same
time. |
IndexedEventSource |
getSource()
Returns a source identifier for this event, which is always
DEFAULT for time-series events. |
long |
getTime()
Returns timestamp of the event in milliseconds.
|
double |
getUnderlyingPrice()
Returns underlying price at the time of theo price computation.
|
void |
setDelta(double delta)
Changes delta of the theoretical price.
|
void |
setDividend(double dividend)
Changes implied simple dividend return of the corresponding option series.
|
void |
setEventFlags(int eventFlags)
Changes transactional event flags.
|
void |
setGamma(double gamma)
Changes gamma of the theoretical price.
|
void |
setIndex(long index)
Changes unique per-symbol index of this event.
|
void |
setInterest(double interest)
Changes implied simple interest return of the corresponding option series.
|
void |
setPrice(double price)
Changes theoretical option price.
|
void |
setSequence(int sequence)
Changes
getSequence() sequence number} of this event. |
void |
setTime(long time)
Changes timestamp of the event in milliseconds.
|
void |
setUnderlyingPrice(double underlyingPrice)
Changes underlying price at the time of theo price computation.
|
String |
toString() |
getEventSymbol, getEventTime, setEventSymbol, setEventTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEventIdgetEventSymbol, getEventTime, setEventSymbol, setEventTimepublic static final int MAX_SEQUENCE
setSequence(int),
Constant Field Valuespublic TheoPrice()
public TheoPrice(String eventSymbol)
eventSymbol - event symbol.public IndexedEventSource getSource()
DEFAULT for time-series events.getSource in interface IndexedEvent<String>getSource in interface TimeSeriesEvent<String>DEFAULT for time-series events.public int getEventFlags()
getEventFlags in interface IndexedEvent<String>public void setEventFlags(int eventFlags)
setEventFlags in interface IndexedEvent<String>eventFlags - transactional event flags.public long getIndex()
time and sequence.
Changing either time or sequence changes event index.getIndex in interface IndexedEvent<String>getIndex in interface TimeSeriesEvent<String>public void setIndex(long index)
time and sequence and
invocation of this method changes time and sequence.
Do not use this method directly.
Change time and/or sequence.setIndex in interface IndexedEvent<String>index - the event index.getIndex()public long getTime()
getTime in interface TimeSeriesEvent<String>System.currentTimeMillis()public void setTime(long time)
time - timestamp of the event in milliseconds.getTime()public int getSequence()
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.public void setSequence(int sequence)
getSequence() sequence number} of this event.sequence - the sequence.IllegalArgumentException - if sequence is below zero or above MAX_SEQUENCE.getSequence()public double getPrice()
public void setPrice(double price)
price - theoretical option price.public double getUnderlyingPrice()
public void setUnderlyingPrice(double underlyingPrice)
underlyingPrice - underlying price at the time of theo price computation.public double getDelta()
public void setDelta(double delta)
delta - delta of the theoretical price.public double getGamma()
public void setGamma(double gamma)
gamma - gamma of the theoretical price.public double getDividend()
public void setDividend(double dividend)
dividend - implied simple dividend return of the corresponding option series.public double getInterest()
public void setInterest(double interest)
interest - implied simple interest return of the corresponding option series.Copyright © 2002–2023 Devexperts LLC. All rights reserved.