Class ParentOrder

java.lang.Object
com.quantfinlib.backtest.ParentOrder

public final class ParentOrder extends Object
One parent order worked by the ExecutionAwareBacktester: the signal that created it, the arrival price (close at signal time — the TCA benchmark), and the child fills with the bar index each filled on. reason is "ENTRY" for entries, or the exit reason (signal / STOP_LOSS / TAKE_PROFIT / END_OF_DATA).
  • Field Details

  • Constructor Details

    • ParentOrder

      public ParentOrder(Side side, int signalIndex, double arrivalPrice, String reason, List<Execution> fills, int[] fillBarIndices)
      Creates the value; array and collection arguments are copied.
  • Method Details

    • side

      public Side side()
      side.
    • signalIndex

      public int signalIndex()
      signalIndex.
    • arrivalPrice

      public double arrivalPrice()
      arrivalPrice.
    • reason

      public String reason()
      reason.
    • fills

      public List<Execution> fills()
      fills.
    • fillBarIndices

      public int fillBarIndices(int i)
      Element i of fillBarIndices.
    • fillBarIndicesLength

      public int fillBarIndicesLength()
      Length of fillBarIndices.
    • fillBarIndicesCopy

      public int[] fillBarIndicesCopy()
      A fresh copy of fillBarIndices.
    • filledQty

      public long filledQty()
    • avgFillPrice

      public double avgFillPrice()
    • fillDurationBars

      public int fillDurationBars()
      Bars from first to last fill (0 for unfilled or single-bar parents).
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object