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


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 Size
    OrderBlock clone()  
    int compare​(OrderBlock l2Block1, OrderBlock l2Block2)  
    java.time.ZonedDateTime lastUpdateTime()
    Retrieve the Last Update Time
    static OrderBlock Now​(double price, double size)
    Construct a Fresh Instance of the L2 OrderBlock
    double price()
    Retrieve the Price
    boolean resetLastUpdateTime()
    Reset the Last Update Time
    double size()
    Retrieve the Size

    Methods 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.Exception
      OrderBlock Constructor
      Parameters:
      lastUpdateTime - Last Update Time
      price - L2 Price
      size - L2 Size
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • Now

      public static final OrderBlock Now​(double price, double size)
      Construct a Fresh Instance of the L2 OrderBlock
      Parameters:
      price - L2 Price
      size - 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

      public int compare​(OrderBlock l2Block1, OrderBlock l2Block2)
      Specified by:
      compare in interface java.util.Comparator<OrderBlock>
    • clone

      public OrderBlock clone()