Skip to content

Commit

Permalink
tagging release 3.290
Browse files Browse the repository at this point in the history
  • Loading branch information
dxcity committed May 28, 2020
1 parent 13e9b1c commit e3cce8e
Show file tree
Hide file tree
Showing 54 changed files with 346 additions and 56 deletions.
5 changes: 5 additions & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

QDS 3.290:

* [QD-1238] Add getZoneId to Timing instances
* [QD-1234] dxFeed API: Extend Underlying and Series events with putVolume and callVolume fields

QDS 3.289:

* [QD-1233] dxFeed API: Extend Trade and Profile events to support additional fields from QD records
Expand Down
2 changes: 1 addition & 1 deletion auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dxfeed-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
59 changes: 53 additions & 6 deletions dxfeed-api/src/main/java/com/dxfeed/event/option/Series.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@
* <li>{@link #getSequence() sequence} - sequence of this series;
* <li>{@link #getExpiration() expiration} - day id of expiration;
* <li>{@link #getVolatility() volatility} - implied volatility index for this series based on VIX methodology;
* <li>{@link #getPutCallRatio() putCallRatio} - ratio of put traded volume to call traded volume for a day;
* <li>{@link #getCallVolume() callVolume} - call options traded volume for a day;
* <li>{@link #getPutVolume() putVolume} - put options traded volume for a day;
* <li>{@link #getOptionVolume() optionVolume} - options traded volume for a day;
* <li>{@link #getPutCallRatio() putCallRatio} - ratio of put options traded volume to call options traded volume for a day;
* <li>{@link #getForwardPrice() forwardPrice} - implied forward price for this option series;
* <li>{@link #getDividend() dividend} - implied simple dividend return of the corresponding option series;
* <li>{@link #getInterest() interest} - implied simple interest return of the corresponding option series.
Expand Down Expand Up @@ -82,7 +85,7 @@
@XmlRootElement(name = "Series")
@XmlType(propOrder = {
"eventFlags", "index", "time", "sequence",
"expiration", "volatility", "putCallRatio", "forwardPrice", "dividend", "interest"
"expiration", "volatility", "callVolume", "putVolume", "putCallRatio", "forwardPrice", "dividend", "interest"
})
public class Series extends MarketEvent implements IndexedEvent<String> {
private static final long serialVersionUID = 1;
Expand All @@ -107,6 +110,8 @@ public class Series extends MarketEvent implements IndexedEvent<String> {
private long timeSequence;
private int expiration;
private double volatility = Double.NaN;
private double callVolume = Double.NaN;
private double putVolume = Double.NaN;
private double putCallRatio = Double.NaN;
private double forwardPrice = Double.NaN;
private double dividend = Double.NaN;
Expand Down Expand Up @@ -267,8 +272,32 @@ public void setVolatility(double volatility) {
}

/**
* Returns ratio of put traded volume to call traded volume for a day.
* @return ratio of put traded volume to call traded volume for a day.
* Returns call options traded volume for a day.
* @return call options traded volume for a day.
*/
public double getCallVolume() {
return callVolume;
}

/**
* Returns put options traded volume for a day.
* @return put options traded volume for a day.
*/
public double getPutVolume() {
return putVolume;
}

/**
* Returns options traded volume for a day.
* @return options traded volume for a day.
*/
public double getOptionVolume() {
return Double.isNaN(putVolume) ? callVolume : Double.isNaN(callVolume) ? putVolume : putVolume + callVolume;
}

/**
* Returns ratio of put options traded volume to call options traded volume for a day.
* @return ratio of put options traded volume to call options traded volume for a day.
*/
public double getPutCallRatio() {
return putCallRatio;
Expand Down Expand Up @@ -327,8 +356,24 @@ public void setInterest(double interest) {
}

/**
* Changes ratio of put traded volume to call traded volume for a day.
* @param putCallRatio ratio of put traded volume to call traded volume for a day.
* Changes call options traded volume for a day.
* @param callVolume call options traded volume for a day.
*/
public void setCallVolume(double callVolume) {
this.callVolume = callVolume;
}

/**
* Changes put options traded volume for a day.
* @param putVolume put options traded volume for a day.
*/
public void setPutVolume(double putVolume) {
this.putVolume = putVolume;
}

/**
* Changes ratio of put options traded volume to call options traded volume for a day.
* @param putCallRatio ratio of put options traded volume to call options traded volume for a day.
*/
public void setPutCallRatio(double putCallRatio) {
this.putCallRatio = putCallRatio;
Expand All @@ -348,6 +393,8 @@ public String toString() {
", sequence=" + getSequence() +
", expiration=" + DayUtil.getYearMonthDayByDayId(getExpiration()) +
", volatility=" + volatility +
", callVolume=" + callVolume +
", putVolume=" + putVolume +
", putCallRatio=" + putCallRatio +
", forwardPrice=" + forwardPrice +
", dividend=" + dividend +
Expand Down
60 changes: 54 additions & 6 deletions dxfeed-api/src/main/java/com/dxfeed/event/option/Underlying.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@
* <li>{@link #getVolatility() volatility} - 30-day implied volatility for this underlying based on VIX methodology;
* <li>{@link #getFrontVolatility() frontVolatility} - front month implied volatility for this underlying based on VIX methodology;
* <li>{@link #getBackVolatility() backVolatility} - 3back month implied volatility for this underlying based on VIX methodology;
* <li>{@link #getPutCallRatio() putCallRatio} - ratio of put traded volume to call traded volume for a day.
* <li>{@link #getCallVolume() callVolume} - call options traded volume for a day;
* <li>{@link #getPutVolume() putVolume} - put options traded volume for a day;
* <li>{@link #getOptionVolume() optionVolume} - options traded volume for a day;
* <li>{@link #getPutCallRatio() putCallRatio} - ratio of put options traded volume to call options traded volume for a day.
* </ul>
*
* <h3><a name="eventFlagsSection">Event flags, transactions and snapshots</a></h3>
Expand Down Expand Up @@ -77,7 +80,8 @@
*/
@XmlRootElement(name = "Underlying")
@XmlType(propOrder = {
"eventFlags", "index", "time", "sequence", "volatility", "frontVolatility", "backVolatility", "putCallRatio"
"eventFlags", "index", "time", "sequence", "volatility", "frontVolatility", "backVolatility",
"callVolume", "putVolume", "putCallRatio"
})
public class Underlying extends MarketEvent implements TimeSeriesEvent<String>, LastingEvent<String> {
private static final long serialVersionUID = 0;
Expand Down Expand Up @@ -106,6 +110,8 @@ public class Underlying extends MarketEvent implements TimeSeriesEvent<String>,
private double volatility = Double.NaN;
private double frontVolatility = Double.NaN;
private double backVolatility = Double.NaN;
private double callVolume = Double.NaN;
private double putVolume = Double.NaN;
private double putCallRatio = Double.NaN;

/**
Expand Down Expand Up @@ -259,16 +265,56 @@ public void setBackVolatility(double backVolatility) {
}

/**
* Returns ratio of put traded volume to call traded volume for a day.
* @return ratio of put traded volume to call traded volume for a day.
* Returns call options traded volume for a day.
* @return call options traded volume for a day.
*/
public double getCallVolume() {
return callVolume;
}

/**
* Changes call options traded volume for a day.
* @param callVolume call options traded volume for a day.
*/
public void setCallVolume(double callVolume) {
this.callVolume = callVolume;
}

/**
* Returns put options traded volume for a day.
* @return put options traded volume for a day.
*/
public double getPutVolume() {
return putVolume;
}

/**
* Changes put options traded volume for a day.
* @param putVolume put options traded volume for a day.
*/
public void setPutVolume(double putVolume) {
this.putVolume = putVolume;
}

/**
* Returns options traded volume for a day.
* @return options traded volume for a day.
*/
public double getOptionVolume() {
return Double.isNaN(putVolume) ? callVolume : Double.isNaN(callVolume) ? putVolume : putVolume + callVolume;
}

/**
* Returns ratio of put options traded volume to call options traded volume for a day.
* @return ratio of put options traded volume to call options traded volume for a day.
*/
public double getPutCallRatio() {
return putCallRatio;
}

/**
* Changes ratio of put traded volume to call traded volume for a day.
* @param putCallRatio ratio of put traded volume to call traded volume for a day.
* Changes ratio of put options traded volume to call options traded volume for a day.
* @param putCallRatio ratio of put options traded volume to call options traded volume for a day.
*/
public void setPutCallRatio(double putCallRatio) {
this.putCallRatio = putCallRatio;
Expand All @@ -294,6 +340,8 @@ protected String baseFieldsToString() {
", volatility=" + volatility +
", frontVolatility=" + frontVolatility +
", backVolatility=" + backVolatility +
", callVolume=" + callVolume +
", putVolume=" + putVolume +
", putCallRatio=" + putCallRatio;
}
}
2 changes: 1 addition & 1 deletion dxfeed-bin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion dxfeed-codegen-verify/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion dxfeed-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ public void runForDxfeedImpl() throws IOException {
map("Volatility", FieldType.DECIMAL_AS_DOUBLE).optional().
map("FrontVolatility", FieldType.DECIMAL_AS_DOUBLE).optional().
map("BackVolatility", FieldType.DECIMAL_AS_DOUBLE).optional().
map("CallVolume", FieldType.DECIMAL_AS_DOUBLE).optional().
map("PutVolume", FieldType.DECIMAL_AS_DOUBLE).optional().
map("PutCallRatio", FieldType.DECIMAL_AS_DOUBLE).optional().
publishable();

Expand All @@ -524,6 +526,8 @@ public void runForDxfeedImpl() throws IOException {
mapTimeAndSequence().optional().prevOptional().
map("Expiration", "Expiration", FieldType.DATE).
map("Volatility", FieldType.DECIMAL_AS_DOUBLE).
map("CallVolume", FieldType.DECIMAL_AS_DOUBLE).optional().
map("PutVolume", FieldType.DECIMAL_AS_DOUBLE).optional().
map("PutCallRatio", FieldType.DECIMAL_AS_DOUBLE).
map("ForwardPrice", FieldType.DECIMAL_AS_DOUBLE).
map("Dividend", FieldType.DECIMAL_AS_DOUBLE).optional().
Expand Down
2 changes: 1 addition & 1 deletion dxfeed-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<artifactId>QD</artifactId>
<groupId>com.devexperts.qd</groupId>
<version>3.289</version>
<version>3.290</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public void buildScheme(SchemeBuilder builder) {
builder.addOptionalField("Underlying", "Volatility", select(SerialFieldType.DECIMAL), "Underlying", "Volatility", true);
builder.addOptionalField("Underlying", "FrontVolatility", select(SerialFieldType.DECIMAL), "Underlying", "FrontVolatility", true);
builder.addOptionalField("Underlying", "BackVolatility", select(SerialFieldType.DECIMAL), "Underlying", "BackVolatility", true);
builder.addOptionalField("Underlying", "CallVolume", select(SerialFieldType.DECIMAL), "Underlying", "CallVolume", true);
builder.addOptionalField("Underlying", "PutVolume", select(SerialFieldType.DECIMAL), "Underlying", "PutVolume", true);
builder.addOptionalField("Underlying", "PutCallRatio", select(SerialFieldType.DECIMAL), "Underlying", "PutCallRatio", true);

builder.addOptionalField("Series", "Void", SerialFieldType.VOID, "Series", "Void", true, SchemeFieldTime.FIRST_TIME_INT_FIELD);
Expand All @@ -68,6 +70,8 @@ public void buildScheme(SchemeBuilder builder) {
builder.addOptionalField("Series", "Sequence", SerialFieldType.SEQUENCE, "Series", "Sequence", true);
builder.addRequiredField("Series", "Expiration", SerialFieldType.DATE);
builder.addRequiredField("Series", "Volatility", select(SerialFieldType.DECIMAL));
builder.addOptionalField("Series", "CallVolume", select(SerialFieldType.DECIMAL), "Series", "CallVolume", true);
builder.addOptionalField("Series", "PutVolume", select(SerialFieldType.DECIMAL), "Series", "PutVolume", true);
builder.addRequiredField("Series", "PutCallRatio", select(SerialFieldType.DECIMAL));
builder.addRequiredField("Series", "ForwardPrice", select(SerialFieldType.DECIMAL));
builder.addOptionalField("Series", "Dividend", select(SerialFieldType.DECIMAL), "Series", "Dividend", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public Series getEvent(Series event, RecordCursor cursor) {
event.setTimeSequence((((long) m.getTimeSeconds(cursor)) << 32) | (m.getSequence(cursor) & 0xFFFFFFFFL));
event.setExpiration(m.getExpiration(cursor));
event.setVolatility(m.getVolatility(cursor));
event.setCallVolume(m.getCallVolume(cursor));
event.setPutVolume(m.getPutVolume(cursor));
event.setPutCallRatio(m.getPutCallRatio(cursor));
event.setForwardPrice(m.getForwardPrice(cursor));
event.setDividend(m.getDividend(cursor));
Expand All @@ -65,6 +67,8 @@ public RecordCursor putEvent(Series event, RecordBuffer buf) {
m.setSequence(cursor, (int) event.getTimeSequence());
m.setExpiration(cursor, event.getExpiration());
m.setVolatility(cursor, event.getVolatility());
m.setCallVolume(cursor, event.getCallVolume());
m.setPutVolume(cursor, event.getPutVolume());
m.setPutCallRatio(cursor, event.getPutCallRatio());
m.setForwardPrice(cursor, event.getForwardPrice());
m.setDividend(cursor, event.getDividend());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public Underlying getEvent(Underlying event, RecordCursor cursor) {
event.setVolatility(m.getVolatility(cursor));
event.setFrontVolatility(m.getFrontVolatility(cursor));
event.setBackVolatility(m.getBackVolatility(cursor));
event.setCallVolume(m.getCallVolume(cursor));
event.setPutVolume(m.getPutVolume(cursor));
event.setPutCallRatio(m.getPutCallRatio(cursor));
return event;
}
Expand All @@ -61,6 +63,8 @@ public RecordCursor putEvent(Underlying event, RecordBuffer buf) {
m.setVolatility(cursor, event.getVolatility());
m.setFrontVolatility(cursor, event.getFrontVolatility());
m.setBackVolatility(cursor, event.getBackVolatility());
m.setCallVolume(cursor, event.getCallVolume());
m.setPutVolume(cursor, event.getPutVolume());
m.setPutCallRatio(cursor, event.getPutCallRatio());
return cursor;
}
Expand Down
Loading

0 comments on commit e3cce8e

Please sign in to comment.