Class OrderBlock

java.lang.Object
org.drip.oms.transaction.OrderBlock
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
LimitOrderBlock

public class OrderBlock
extends java.lang.Object
implements java.lang.Cloneable
OrderBlock maintains an 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 size)
    OrderBlock Constructor
  • Method Summary

    Modifier and Type Method Description
    boolean augmentSize​(double augmentedSize)
    Up/Down Size using the Augmented Size
    OrderBlock clone()
    Clone this Instance
    java.time.ZonedDateTime lastUpdateTime()
    Retrieve the Last Update Time
    static OrderBlock Now​(double size)
    Construct a Fresh Instance of the OrderBlock
    boolean resetLastUpdateTime()
    Reset the Last Update Time
    double size()
    Retrieve the Size
    java.lang.String toString()
    Generate String version of the state without Padding
    java.lang.String toString​(java.lang.String pad)
    Generate String version of the state with Padding applied

    Methods inherited from class java.lang.Object

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

    • OrderBlock

      public OrderBlock​(java.time.ZonedDateTime lastUpdateTime, double size) throws java.lang.Exception
      OrderBlock Constructor
      Parameters:
      lastUpdateTime - Last Update Time
      size - Order Size
      Throws:
      java.lang.Exception - Thrown if the Inputs are Invalid
  • Method Details

    • Now

      public static OrderBlock Now​(double size)
      Construct a Fresh Instance of the OrderBlock
      Parameters:
      size - L2 Size
      Returns:
      Fresh Instance of the OrderBlock
    • lastUpdateTime

      public java.time.ZonedDateTime lastUpdateTime()
      Retrieve the Last Update Time
      Returns:
      The Last Update Time
    • 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
    • clone

      public OrderBlock clone()
      Clone this Instance
      Returns:
      Follows Object.clone Semantics
    • 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:
      toString in class java.lang.Object
      Returns:
      String version of the state without Padding