public class Series extends MarketEvent implements IndexedEvent<String>
Series is an IndexedEvent
with multiple instances of event available for
each underlying symbol. Each series event instance corresponds to an OptionSeries
of the corresponding underlying. The correspondence between a series event instance and
an OptionSeries
is established via expiration
property.
If case where there are multiple series at the same expiration day id, then series events are
are ordered by their index
in the same order as the corresponding
OptionSeries
are ordered
by their attributes.
Series
event has the following properties:
eventSymbol
- symbol of this event;
eventFlags
- transactional event flags;
index
- unique per-symbol index of this series;
time
- time of this series;
sequence
- sequence of this series;
expiration
- day id of expiration;
volatility
- implied volatility index for this series based on VIX methodology;
callVolume
- call options traded volume for a day;
putVolume
- put options traded volume for a day;
optionVolume
- options traded volume for a day;
putCallRatio
- ratio of put options traded volume to call options traded volume for a day;
forwardPrice
- implied forward price for this option series;
dividend
- implied simple dividend return of the corresponding option series;
interest
- implied simple interest return of the corresponding option series.
See the model section for a mathematical background on the values in this event.
eventFlags
property.
The logic behind this property is detailed in IndexedEvent
class documentation.
Multiple event sources for the same symbol are not supported for series, thus
source
property is always DEFAULT
.
IndexedEventModel
class handles all the snapshot and transaction logic and conveniently represents
a list current of events.
It relies on the code of AbstractIndexedEventModel
to handle this logic.
Use the source code of AbstractIndexedEventModel
for clarification on transactions and snapshot logic.
Series
.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 |
---|
Series()
Creates new series event with default values.
|
Series(String eventSymbol)
Creates new series event with the specified event symbol.
|
Modifier and Type | Method and Description |
---|---|
double |
getCallVolume()
Returns call options traded volume for a day.
|
double |
getDividend()
Returns implied simple dividend return of the corresponding option series.
|
int |
getEventFlags()
Returns transactional event flags.
|
int |
getExpiration()
Returns day id of expiration.
|
double |
getForwardPrice()
Returns implied forward price for this option series.
|
long |
getIndex()
Returns unique per-symbol index of this series.
|
double |
getInterest()
Returns implied simple interest return of the corresponding option series.
|
double |
getOptionVolume()
Returns options traded volume for a day.
|
double |
getPutCallRatio()
Returns ratio of put options traded volume to call options traded volume for a day.
|
double |
getPutVolume()
Returns put options traded volume for a day.
|
int |
getSequence()
Returns sequence number of this series to distinguish series that have the same
time . |
IndexedEventSource |
getSource()
Returns a source for this event.
|
long |
getTime()
Returns time of this series.
|
long |
getTimeSequence()
Returns time and sequence of this series packaged into single long value.
|
double |
getVolatility()
Returns implied volatility index for this series based on VIX methodology.
|
void |
setCallVolume(double callVolume)
Changes call options traded volume for a day.
|
void |
setDividend(double dividend)
Changes implied simple dividend return of the corresponding option series.
|
void |
setEventFlags(int eventFlags)
Changes transactional event flags.
|
void |
setExpiration(int expiration)
Changes day id of expiration.
|
void |
setForwardPrice(double forwardPrice)
Changes implied forward price for this option series.
|
void |
setIndex(long index)
Changes unique per-symbol index of this series.
|
void |
setInterest(double interest)
Changes implied simple interest return of the corresponding option series.
|
void |
setPutCallRatio(double putCallRatio)
Changes ratio of put options traded volume to call options traded volume for a day.
|
void |
setPutVolume(double putVolume)
Changes put options traded volume for a day.
|
void |
setSequence(int sequence)
Changes
getSequence() sequence number} of this series. |
void |
setTime(long time)
Changes time of this series.
|
void |
setTimeSequence(long timeSequence)
Changes time and sequence of this series.
|
void |
setVolatility(double volatility)
Changes implied volatility index for this series based on VIX methodology.
|
String |
toString()
Returns string representation of this series event.
|
getEventSymbol, getEventTime, setEventSymbol, setEventTime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, getEventTime, setEventSymbol, setEventTime
public static final int MAX_SEQUENCE
setSequence(int)
,
Constant Field Valuespublic Series()
public Series(String eventSymbol)
eventSymbol
- event symbol.public IndexedEventSource getSource()
DEFAULT
.getSource
in interface IndexedEvent<String>
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()
getIndex
in interface IndexedEvent<String>
public void setIndex(long index)
setIndex
in interface IndexedEvent<String>
index
- unique per-symbol index of this series.public long getTimeSequence()
public void setTimeSequence(long timeSequence)
time
and/or sequence
.timeSequence
- the time and sequence.getTimeSequence()
public long getTime()
public void setTime(long time)
time
- time of this series.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 series.sequence
- the sequence.IllegalArgumentException
- if sequence is below zero or above MAX_SEQUENCE
.getSequence()
public int getExpiration()
DayUtil.getDayIdByYearMonthDay
(20090117).public void setExpiration(int expiration)
expiration
- day id of expiration.public double getVolatility()
public void setVolatility(double volatility)
volatility
- implied volatility index for this series based on VIX methodology.public double getCallVolume()
public double getPutVolume()
public double getOptionVolume()
public double getPutCallRatio()
public double getForwardPrice()
public void setForwardPrice(double forwardPrice)
forwardPrice
- implied forward price for this option series.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.public void setCallVolume(double callVolume)
callVolume
- call options traded volume for a day.public void setPutVolume(double putVolume)
putVolume
- put options traded volume for a day.public void setPutCallRatio(double putCallRatio)
putCallRatio
- ratio of put options traded volume to call options traded volume for a day.Copyright © 2002–2023 Devexperts LLC. All rights reserved.