Package org.drip.oms.transaction
Class OrderBlock
java.lang.Object
org.drip.oms.transaction.OrderBlock
- All Implemented Interfaces:
java.lang.Cloneable
,java.util.Comparator<OrderBlock>
public class OrderBlock extends java.lang.Object implements java.util.Comparator<OrderBlock>, java.lang.Cloneable
OrderBlock maintains an L2 Entry Block inside an Order Book. The References are:
- Chen, J. (2021): Time in Force: Definition, Types, and Examples https://www.investopedia.com/terms/t/timeinforce.asp
- Cont, R., and A. Kukanov (2017): Optimal Order Placement in Limit Order Markets Quantitative Finance 17 (1) 21-39
- 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
- Wikipedia (2023): Central Limit Order Book https://en.wikipedia.org/wiki/Central_limit_order_book
- 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 OrderBlock(java.time.ZonedDateTime lastUpdateTime, double price, double size)
OrderBlock Constructor -
Method Summary
Modifier and Type Method Description boolean
augmentSize(double augmentedSize)
Up/Down Size using the Augmented SizeOrderBlock
clone()
int
compare(OrderBlock l2Block1, OrderBlock l2Block2)
java.time.ZonedDateTime
lastUpdateTime()
Retrieve the Last Update Timestatic OrderBlock
Now(double price, double size)
Construct a Fresh Instance of the L2 OrderBlockdouble
price()
Retrieve the Priceboolean
resetLastUpdateTime()
Reset the Last Update Timedouble
size()
Retrieve the SizeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
OrderBlock
public OrderBlock(java.time.ZonedDateTime lastUpdateTime, double price, double size) throws java.lang.ExceptionOrderBlock Constructor- Parameters:
lastUpdateTime
- Last Update Timeprice
- L2 Pricesize
- L2 Size- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
Now
Construct a Fresh Instance of the L2 OrderBlock- Parameters:
price
- L2 Pricesize
- L2 Size- Returns:
- Fresh Instance of the L2 OrderBlock
-
lastUpdateTime
public java.time.ZonedDateTime lastUpdateTime()Retrieve the Last Update Time- Returns:
- The Last Update Time
-
price
public double price()Retrieve the Price- Returns:
- The Price
-
size
public double size()Retrieve the Size- Returns:
- The Size
-
augmentSize
public boolean augmentSize(double augmentedSize)Up/Down Size using the Augmented Size- Parameters:
augmentedSize
- Augmented Size- Returns:
- TRUE - The Augmented Size successfully applied
-
resetLastUpdateTime
public boolean resetLastUpdateTime()Reset the Last Update Time- Returns:
- TRUE - The Last Update Time successfully Reset
-
compare
- Specified by:
compare
in interfacejava.util.Comparator<OrderBlock>
-
clone
-