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;
expiration
- day id of expiration;
volatility
- implied volatility index for this series based on VIX methodology;
putCallRatio
- ratio of put traded volume to call 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
.
REMOVE_EVENT, SNAPSHOT_BEGIN, SNAPSHOT_END, 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 |
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 |
getPutCallRatio()
Returns ratio of put traded volume to call traded volume for a day.
|
IndexedEventSource |
getSource()
Returns a source for this event.
|
double |
getVolatility()
Returns implied volatility index for this series based on VIX methodology.
|
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 traded volume to call traded volume for a day.
|
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, setEventSymbol
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getEventSymbol, setEventSymbol
public 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()
Expiration
value,
so changing Expiration
also changes index.getIndex
in interface IndexedEvent<String>
public void setIndex(long index)
Expiration
value,
so changing index also changes Expiration
.setIndex
in interface IndexedEvent<String>
index
- unique per-symbol index of this series.public int getExpiration()
DayUtil.getDayIdByYearMonthDay
(20090117).
Most significant 32 bits of Index
contain day id of expiration,
so changing Index
also changes day id of expiration.public void setExpiration(int expiration)
Index
contain day id of expiration,
so changing day id of expiration also changes Index
.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 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 setPutCallRatio(double putCallRatio)
putCallRatio
- ratio of put traded volume to call traded volume for a day.Copyright © 2015 Devexperts. All Rights Reserved.