5353 * <li>{@link #getSequence() sequence} - sequence of this series;
5454 * <li>{@link #getExpiration() expiration} - day id of expiration;
5555 * <li>{@link #getVolatility() volatility} - implied volatility index for this series based on VIX methodology;
56- * <li>{@link #getPutCallRatio() putCallRatio} - ratio of put traded volume to call traded volume for a day;
56+ * <li>{@link #getCallVolume() callVolume} - call options traded volume for a day;
57+ * <li>{@link #getPutVolume() putVolume} - put options traded volume for a day;
58+ * <li>{@link #getOptionVolume() optionVolume} - options traded volume for a day;
59+ * <li>{@link #getPutCallRatio() putCallRatio} - ratio of put options traded volume to call options traded volume for a day;
5760 * <li>{@link #getForwardPrice() forwardPrice} - implied forward price for this option series;
5861 * <li>{@link #getDividend() dividend} - implied simple dividend return of the corresponding option series;
5962 * <li>{@link #getInterest() interest} - implied simple interest return of the corresponding option series.
8285@ XmlRootElement (name = "Series" )
8386@ XmlType (propOrder = {
8487 "eventFlags" , "index" , "time" , "sequence" ,
85- "expiration" , "volatility" , "putCallRatio" , "forwardPrice" , "dividend" , "interest"
88+ "expiration" , "volatility" , "callVolume" , "putVolume" , " putCallRatio" , "forwardPrice" , "dividend" , "interest"
8689})
8790public class Series extends MarketEvent implements IndexedEvent <String > {
8891 private static final long serialVersionUID = 1 ;
@@ -107,6 +110,8 @@ public class Series extends MarketEvent implements IndexedEvent<String> {
107110 private long timeSequence ;
108111 private int expiration ;
109112 private double volatility = Double .NaN ;
113+ private double callVolume = Double .NaN ;
114+ private double putVolume = Double .NaN ;
110115 private double putCallRatio = Double .NaN ;
111116 private double forwardPrice = Double .NaN ;
112117 private double dividend = Double .NaN ;
@@ -267,8 +272,32 @@ public void setVolatility(double volatility) {
267272 }
268273
269274 /**
270- * Returns ratio of put traded volume to call traded volume for a day.
271- * @return ratio of put traded volume to call traded volume for a day.
275+ * Returns call options traded volume for a day.
276+ * @return call options traded volume for a day.
277+ */
278+ public double getCallVolume () {
279+ return callVolume ;
280+ }
281+
282+ /**
283+ * Returns put options traded volume for a day.
284+ * @return put options traded volume for a day.
285+ */
286+ public double getPutVolume () {
287+ return putVolume ;
288+ }
289+
290+ /**
291+ * Returns options traded volume for a day.
292+ * @return options traded volume for a day.
293+ */
294+ public double getOptionVolume () {
295+ return Double .isNaN (putVolume ) ? callVolume : Double .isNaN (callVolume ) ? putVolume : putVolume + callVolume ;
296+ }
297+
298+ /**
299+ * Returns ratio of put options traded volume to call options traded volume for a day.
300+ * @return ratio of put options traded volume to call options traded volume for a day.
272301 */
273302 public double getPutCallRatio () {
274303 return putCallRatio ;
@@ -327,8 +356,24 @@ public void setInterest(double interest) {
327356 }
328357
329358 /**
330- * Changes ratio of put traded volume to call traded volume for a day.
331- * @param putCallRatio ratio of put traded volume to call traded volume for a day.
359+ * Changes call options traded volume for a day.
360+ * @param callVolume call options traded volume for a day.
361+ */
362+ public void setCallVolume (double callVolume ) {
363+ this .callVolume = callVolume ;
364+ }
365+
366+ /**
367+ * Changes put options traded volume for a day.
368+ * @param putVolume put options traded volume for a day.
369+ */
370+ public void setPutVolume (double putVolume ) {
371+ this .putVolume = putVolume ;
372+ }
373+
374+ /**
375+ * Changes ratio of put options traded volume to call options traded volume for a day.
376+ * @param putCallRatio ratio of put options traded volume to call options traded volume for a day.
332377 */
333378 public void setPutCallRatio (double putCallRatio ) {
334379 this .putCallRatio = putCallRatio ;
@@ -348,6 +393,8 @@ public String toString() {
348393 ", sequence=" + getSequence () +
349394 ", expiration=" + DayUtil .getYearMonthDayByDayId (getExpiration ()) +
350395 ", volatility=" + volatility +
396+ ", callVolume=" + callVolume +
397+ ", putVolume=" + putVolume +
351398 ", putCallRatio=" + putCallRatio +
352399 ", forwardPrice=" + forwardPrice +
353400 ", dividend=" + dividend +
0 commit comments