Package org.drip.oms.transaction
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
- Module = Product Core Module
- Library = Transaction Cost Analytics
- Project = Rd Order Specification, Handling, and Management
- Package = Order Specification and Session Metrics
- 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 Flagboolean
amendSize(double orderSize)
Amend the Order Sizejava.util.Date
completionTime()
Retrieve the Order Completion Timejava.util.Date
creationTime()
Retrieve the Order Creation Timeboolean
fillOrKill()
Retrieve the Fill-or-Kill FlagOrderFillWholeSettings
fillWholeSettings()
Retrieve the Fill-Whole Settingsstatic 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 OrderOrder
fulfill(OrderFulfillment orderFulfillment)
Fill an Order Partially/FullyOrder
generateChildOrder(double filledSize)
Generate a Child Order of the same Type.java.lang.String
id()
Retrieve the Order IDboolean
isConditional()
Indicate if the Order is Conditional.boolean
isOutstanding()
Indicate if the Order is OutstandingOrderIssuer
issuer()
Retrieve the Order Issuerboolean
setComplete(java.util.Date completionTime)
Set the Order Completion Timeboolean
setState(int orderState)
Set the Order StateSide
side()
Retrieve the Order Sidedouble
size()
Retrieve the Order Sizeint
state()
Retrieve the Order Statejava.lang.String
ticker()
Retrieve the Order Security Identifier/TickerTimeInForce
timeInForce()
Retrieve the Time-in-Force Settingsint
type()
Retrieve the Order Typejava.util.Date
updateTime()
Retrieve the Order Update TimeMethods 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.ExceptionOrder Constructor- Parameters:
issuer
- Order Issuerticker
- Security Identifier/Tickerid
- Order IDtype
- Order TypecreationTime
- Creation Timeside
- Order Sidesize
- Order SizetimeInForce
- Time-in-Force SettingsfillWholeSettings
- 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 Issuerticker
- Security Identifier/Tickerid
- Order IDtype
- Order TypecreationTime
- Creation Timeside
- Order SidetimeInForce
- Time-in-Force SettingsfillWholeSettings
- Order Fill-Whole SettingsparticipationRate
- POV Participation RatetradesWindow
- 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
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
Retrieve the Time-in-Force Settings- Returns:
- The Time-in-Force Settings
-
fillWholeSettings
Retrieve the Fill-Whole Settings- Returns:
- The Fill-Whole Settings
-
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
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
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
-