Package org.drip.oms.transaction
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
- Module = Product Core Module
- Library = Transaction Cost Analytics
- Project = Rd Order Specification, Handling, and Management
- Package = Order Specification and Session Metrics
- Author:
- Lakshmi Krishnamurthy
-
Field Summary
Fields Modifier and Type Field Description static int
TIF_DAY
TIF Type DAYstatic int
TIF_EXTENDED
TIF Type EXTENDEDstatic int
TIF_IMMEDIATE
TIF Type IMMEDIATEstatic int
TIF_ON_MARKET_CLOSE
TIF Type ON MARKET CLOSEstatic 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 Codestatic TimeInForce
CreateDay()
Create a DAY Version of TIFstatic TimeInForce
CreateDayTillCanceled()
Create a DTC Version of TIFstatic TimeInForce
CreateGoodTillCanceled(int durationDays)
Create a GTC Version of TIFstatic TimeInForce
CreateImmediate()
Create an Immediate Version of TIFstatic TimeInForce
CreateMarketClose()
Create a Market Close Version of TIFstatic TimeInForce
CreateMarketOpen()
Create a Market Open Version of TIFint
durationDays()
Retrieve the Duration Tenor in Daysboolean
hasLapsed(java.time.ZonedDateTime currentZonedDateTime)
Indicate if the Input Time represents a TIF Lapsejava.time.ZonedDateTime
setupZonedDateTime()
Retrieve the Setup Instantint
tifType()
Retrieve the TIF TypeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
TIF_DAY
public static final int TIF_DAYTIF Type DAY- See Also:
- Constant Field Values
-
TIF_EXTENDED
public static final int TIF_EXTENDEDTIF Type EXTENDED- See Also:
- Constant Field Values
-
TIF_IMMEDIATE
public static final int TIF_IMMEDIATETIF Type IMMEDIATE- See Also:
- Constant Field Values
-
TIF_ON_MARKET_OPEN
public static final int TIF_ON_MARKET_OPENTIF Type ON MARKET OPEN- See Also:
- Constant Field Values
-
TIF_ON_MARKET_CLOSE
public static final int TIF_ON_MARKET_CLOSETIF 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.ExceptionTimeInForce Constructor- Parameters:
code
- TIF CodetifType
- TIF TypesetupZonedDateTime
- Setup InstantdurationDays
- Duration Tenor in Days- Throws:
java.lang.Exception
- Thrown if TimeInForce cannot be constructed
-
-
Method Details
-
CreateImmediate
Create an Immediate Version of TIF- Returns:
- Immediate Version of TIF
-
CreateDay
Create a DAY Version of TIF- Returns:
- DAY Version of TIF
-
CreateDayTillCanceled
Create a DTC Version of TIF- Returns:
- DTC Version of TIF
-
CreateGoodTillCanceled
Create a GTC Version of TIF- Parameters:
durationDays
- Duration Tenor in Days- Returns:
- GTC Version of TIF
-
CreateMarketOpen
Create a Market Open Version of TIF- Returns:
- Market Open Version of TIF
-
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
-