Class Order

java.lang.Object
org.drip.oms.transaction.Order
Direct Known Subclasses:
LimitOrder, MarketOrder, StopOrder

public class Order
extends java.lang.Object
Order holds the Details of an Order. The References are:

  • Berkowitz, S. A., D. E. Logue, and E. A. J. Noser (1988): The Total Cost of Transactions on the NYSE Journal of Finance 43 (1) 97-112
  • Cont, R., and A. Kukanov (2017): Optimal Order Placement in Limit Order Markets Quantitative Finance 17 (1) 21-39
  • Vassilis, P. (2005a): A Realistic Model of Market Liquidity and Depth Journal of Futures Markets 25 (5) 443-464
  • Vassilis, P. (2005b): Slow and Fast Markets Journal of Economics and Business 57 (6) 576-593
  • Weiss, D. (2006): After the Trade is Made: Processing Securities Transactions Portfolio Publishing London UK


Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    Order​(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, int type, java.util.Date creationTime, Side side, double size, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings)
    Order Constructor
  • Method Summary

    Modifier and Type Method Description
    boolean allOrNone()
    Retrieve the All-or-None Flag
    boolean amendSize​(double orderSize)
    Amend the Order Size
    java.util.Date completionTime()
    Retrieve the Order Completion Time
    java.util.Date creationTime()
    Retrieve the Order Creation Time
    boolean fillOrKill()
    Retrieve the Fill-or-Kill Flag
    OrderFillWholeSettings fillWholeSettings()
    Retrieve the Fill-Whole Settings
    static Order FromPOV​(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, int type, java.util.Date creationTime, Side side, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings, double participationRate, TradesWindow tradesWindow)
    Construct a POV Participation Rate Order
    Order fulfill​(OrderFulfillment orderFulfillment)
    Fill an Order Partially/Fully
    Order generateChildOrder​(double filledSize)
    Generate a Child Order of the same Type.
    java.lang.String id()
    Retrieve the Order ID
    boolean isConditional()
    Indicate if the Order is Conditional.
    boolean isOutstanding()
    Indicate if the Order is Outstanding
    OrderIssuer issuer()
    Retrieve the Order Issuer
    boolean setComplete​(java.util.Date completionTime)
    Set the Order Completion Time
    boolean setState​(int orderState)
    Set the Order State
    Side side()
    Retrieve the Order Side
    double size()
    Retrieve the Order Size
    int state()
    Retrieve the Order State
    java.lang.String ticker()
    Retrieve the Order Security Identifier/Ticker
    TimeInForce timeInForce()
    Retrieve the Time-in-Force Settings
    int type()
    Retrieve the Order Type
    java.util.Date updateTime()
    Retrieve the Order Update Time

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Order

      public Order​(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, int type, java.util.Date creationTime, Side side, double size, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings) throws java.lang.Exception
      Order Constructor
      Parameters:
      issuer - Order Issuer
      ticker - Security Identifier/Ticker
      id - Order ID
      type - Order Type
      creationTime - Creation Time
      side - Order Side
      size - Order Size
      timeInForce - Time-in-Force Settings
      fillWholeSettings - Order Fill-Whole Settings
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • FromPOV

      public static final Order FromPOV​(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, int type, java.util.Date creationTime, Side side, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings, double participationRate, TradesWindow tradesWindow)
      Construct a POV Participation Rate Order
      Parameters:
      issuer - Order Issuer
      ticker - Security Identifier/Ticker
      id - Order ID
      type - Order Type
      creationTime - Creation Time
      side - Order Side
      timeInForce - Time-in-Force Settings
      fillWholeSettings - Order Fill-Whole Settings
      participationRate - POV Participation Rate
      tradesWindow - Trades Window
      Returns:
      POV Participation Rate Order
    • ticker

      public java.lang.String ticker()
      Retrieve the Order Security Identifier/Ticker
      Returns:
      The Order Security Identifier/Ticker
    • id

      public java.lang.String id()
      Retrieve the Order ID
      Returns:
      The Order ID
    • issuer

      public OrderIssuer issuer()
      Retrieve the Order Issuer
      Returns:
      The Order Issuer
    • type

      public int type()
      Retrieve the Order Type
      Returns:
      The Order Type
    • state

      public int state()
      Retrieve the Order State
      Returns:
      The Order State
    • creationTime

      public java.util.Date creationTime()
      Retrieve the Order Creation Time
      Returns:
      The Order Creation Time
    • updateTime

      public java.util.Date updateTime()
      Retrieve the Order Update Time
      Returns:
      The Order Update Time
    • completionTime

      public java.util.Date completionTime()
      Retrieve the Order Completion Time
      Returns:
      The Order Completion Time
    • timeInForce

      public TimeInForce timeInForce()
      Retrieve the Time-in-Force Settings
      Returns:
      The Time-in-Force Settings
    • fillWholeSettings

      public OrderFillWholeSettings fillWholeSettings()
      Retrieve the Fill-Whole Settings
      Returns:
      The Fill-Whole Settings
    • side

      public Side side()
      Retrieve the Order Side
      Returns:
      The Order Side
    • size

      public double size()
      Retrieve the Order Size
      Returns:
      The Order Size
    • isConditional

      public boolean isConditional()
      Indicate if the Order is Conditional. Default is Non-Conditional
      Returns:
      TRUE - Order is Conditional
    • generateChildOrder

      public Order generateChildOrder​(double filledSize)
      Generate a Child Order of the same Type. Default implementation is to not generate Child Orders.
      Parameters:
      filledSize - Filled Size
      Returns:
      Child Order of the same Type
    • fillOrKill

      public boolean fillOrKill()
      Retrieve the Fill-or-Kill Flag
      Returns:
      The Fill-or-Kill Flag
    • allOrNone

      public boolean allOrNone()
      Retrieve the All-or-None Flag
      Returns:
      The All-or-None Flag
    • setState

      public boolean setState​(int orderState)
      Set the Order State
      Parameters:
      orderState - Order State
      Returns:
      TRUE - The Order State successfully set
    • amendSize

      public boolean amendSize​(double orderSize)
      Amend the Order Size
      Parameters:
      orderSize - Order Size
      Returns:
      TRUE - The Order Size successfully set
    • fulfill

      public Order fulfill​(OrderFulfillment orderFulfillment)
      Fill an Order Partially/Fully
      Parameters:
      orderFulfillment - Order Fulfillment
      Returns:
      Child Order, if any
    • isOutstanding

      public boolean isOutstanding()
      Indicate if the Order is Outstanding
      Returns:
      TRUE - Order is Outstanding
    • setComplete

      public boolean setComplete​(java.util.Date completionTime)
      Set the Order Completion Time
      Parameters:
      completionTime - The Order Completion Time
      Returns:
      TRUE - Order is Set to Complete