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, java.lang.String parentID, int type, java.util.Date creationTime, Side side, double size, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings)Order Constructor -
Method Summary
Modifier and Type Method Description booleanallOrNone()Retrieve the All-or-None FlagbooleanamendSize(double orderSize)Amend the Order Sizejava.util.DatecompletionTime()Retrieve the Order Completion Timejava.util.DatecreationTime()Retrieve the Order Creation Timebooleanexecution(double lastShares)Update the Order using the Executed AmountbooleanfillOrKill()Retrieve the Fill-or-Kill FlagOrderFillWholeSettingsfillWholeSettings()Retrieve the Fill-Whole Settingsstatic OrderFromPOV(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, java.lang.String parentID, int type, java.util.Date creationTime, Side side, TimeInForce timeInForce, OrderFillWholeSettings fillWholeSettings, double participationRate, TradesWindow tradesWindow)Construct a POV Participation Rate Orderbooleanfulfill(OrderFulfillment orderFulfillment)Fill an Order Partially/Fullyjava.lang.Stringid()Retrieve the Order IDbooleanisConditional()Indicate if the Order is Conditional.booleanisOutstanding()Indicate if the Order is OutstandingOrderIssuerissuer()Retrieve the Order Issuerjava.lang.StringparentID()Retrieve the Parent Order IDOrderQuantityTrackerquantityTracker()Retrieve the Order Quantity TrackerbooleansetAccepted()Set the Order as AcceptedbooleansetComplete(java.util.Date completionTime)Set the Order Completion TimebooleansetRejected()Set the Order as RejectedbooleansetState(int orderState)Set the Order StateSideside()Retrieve the Order Sideintstate()Retrieve the Order Statejava.lang.Stringticker()Retrieve the Order Security Identifier/TickerTimeInForcetimeInForce()Retrieve the Time-in-Force Settingsjava.lang.StringtoString()Generate String version of the state without Paddingjava.lang.StringtoString(java.lang.String pad)Generate String version of the state with Padding appliedinttype()Retrieve the Order Typejava.util.DateupdateTime()Retrieve the Order Update TimeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Order
public Order(OrderIssuer issuer, java.lang.String ticker, java.lang.String id, java.lang.String parentID, 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 IDparentID- Parent 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, java.lang.String parentID, 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 IDparentID- Parent 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
-
parentID
public java.lang.String parentID()Retrieve the Parent Order ID- Returns:
- The Parent 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
-
quantityTracker
Retrieve the Order Quantity Tracker- Returns:
- The Order Quantity Tracker
-
isConditional
public boolean isConditional()Indicate if the Order is Conditional. Default is Non-Conditional- Returns:
- TRUE - Order is Conditional
-
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
-
execution
public boolean execution(double lastShares)Update the Order using the Executed Amount- Parameters:
lastShares- Executed Size- Returns:
- TRUE - The Order Execution has been successfully handled
-
fulfill
Fill an Order Partially/Fully- Parameters:
orderFulfillment- Order Fulfillment- Returns:
- TRUE - The Order Full/Partial Fill has been successfully handled
-
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
-
setRejected
public boolean setRejected()Set the Order as Rejected- Returns:
- TRUE - The Order State successfully set to Rejected
-
setAccepted
public boolean setAccepted()Set the Order as Accepted- Returns:
- TRUE - The Order State successfully set to Accepted
-
toString
public java.lang.String toString(java.lang.String pad)Generate String version of the state with Padding applied- Parameters:
pad- Padding- Returns:
- String version of the state with Padding applied
-
toString
public java.lang.String toString()Generate String version of the state without Padding- Overrides:
toStringin classjava.lang.Object- Returns:
- String version of the state without Padding
-