Class TimeInForce

java.lang.Object
org.drip.oms.transaction.TimeInForce

public class TimeInForce
extends java.lang.Object
TimeInForce holds the Setting for Time-in-Force (TIF) Parameters. 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
  • 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


Author:
Lakshmi Krishnamurthy
  • Field Summary

    Fields
    Modifier and Type Field Description
    static int TIF_DAY
    TIF Type DAY
    static int TIF_EXTENDED
    TIF Type EXTENDED
    static int TIF_IMMEDIATE
    TIF Type IMMEDIATE
    static int TIF_ON_MARKET_CLOSE
    TIF Type ON MARKET CLOSE
    static int TIF_ON_MARKET_OPEN
    TIF Type ON MARKET OPEN
  • Constructor Summary

    Constructors
    Constructor Description
    TimeInForce​(java.lang.String code, int tifType, java.time.ZonedDateTime setupZonedDateTime, int durationDays)
    TimeInForce Constructor
  • Method Summary

    Modifier and Type Method Description
    java.lang.String code()
    Retrieve the TIF Code
    static TimeInForce CreateDay()
    Create a DAY Version of TIF
    static TimeInForce CreateDayTillCanceled()
    Create a DTC Version of TIF
    static TimeInForce CreateGoodTillCanceled​(int durationDays)
    Create a GTC Version of TIF
    static TimeInForce CreateImmediate()
    Create an Immediate Version of TIF
    static TimeInForce CreateMarketClose()
    Create a Market Close Version of TIF
    static TimeInForce CreateMarketOpen()
    Create a Market Open Version of TIF
    int durationDays()
    Retrieve the Duration Tenor in Days
    boolean hasLapsed​(java.time.ZonedDateTime currentZonedDateTime)
    Indicate if the Input Time represents a TIF Lapse
    java.time.ZonedDateTime setupZonedDateTime()
    Retrieve the Setup Instant
    int tifType()
    Retrieve the TIF Type

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TIF_DAY

      public static final int TIF_DAY
      TIF Type DAY
      See Also:
      Constant Field Values
    • TIF_EXTENDED

      public static final int TIF_EXTENDED
      TIF Type EXTENDED
      See Also:
      Constant Field Values
    • TIF_IMMEDIATE

      public static final int TIF_IMMEDIATE
      TIF Type IMMEDIATE
      See Also:
      Constant Field Values
    • TIF_ON_MARKET_OPEN

      public static final int TIF_ON_MARKET_OPEN
      TIF Type ON MARKET OPEN
      See Also:
      Constant Field Values
    • TIF_ON_MARKET_CLOSE

      public static final int TIF_ON_MARKET_CLOSE
      TIF Type ON MARKET CLOSE
      See Also:
      Constant Field Values
  • Constructor Details

    • TimeInForce

      public TimeInForce​(java.lang.String code, int tifType, java.time.ZonedDateTime setupZonedDateTime, int durationDays) throws java.lang.Exception
      TimeInForce Constructor
      Parameters:
      code - TIF Code
      tifType - TIF Type
      setupZonedDateTime - Setup Instant
      durationDays - Duration Tenor in Days
      Throws:
      java.lang.Exception - Thrown if TimeInForce cannot be constructed
  • Method Details

    • CreateImmediate

      public static final TimeInForce CreateImmediate()
      Create an Immediate Version of TIF
      Returns:
      Immediate Version of TIF
    • CreateDay

      public static final TimeInForce CreateDay()
      Create a DAY Version of TIF
      Returns:
      DAY Version of TIF
    • CreateDayTillCanceled

      public static final TimeInForce CreateDayTillCanceled()
      Create a DTC Version of TIF
      Returns:
      DTC Version of TIF
    • CreateGoodTillCanceled

      public static final TimeInForce CreateGoodTillCanceled​(int durationDays)
      Create a GTC Version of TIF
      Parameters:
      durationDays - Duration Tenor in Days
      Returns:
      GTC Version of TIF
    • CreateMarketOpen

      public static final TimeInForce CreateMarketOpen()
      Create a Market Open Version of TIF
      Returns:
      Market Open Version of TIF
    • CreateMarketClose

      public static final TimeInForce CreateMarketClose()
      Create a Market Close Version of TIF
      Returns:
      Market Close Version of TIF
    • code

      public java.lang.String code()
      Retrieve the TIF Code
      Returns:
      The TIF Code
    • tifType

      public int tifType()
      Retrieve the TIF Type
      Returns:
      The TIF Type
    • setupZonedDateTime

      public java.time.ZonedDateTime setupZonedDateTime()
      Retrieve the Setup Instant
      Returns:
      The Setup Instant
    • durationDays

      public int durationDays()
      Retrieve the Duration Tenor in Days
      Returns:
      The Duration Tenor in Days
    • hasLapsed

      public boolean hasLapsed​(java.time.ZonedDateTime currentZonedDateTime)
      Indicate if the Input Time represents a TIF Lapse
      Parameters:
      currentZonedDateTime - Input Time
      Returns:
      TRUE - Input Time represents a TIF Lapse