Class TransactionCostAnalyzer

java.lang.Object
com.quantfinlib.microstructure.TransactionCostAnalyzer

public final class TransactionCostAnalyzer extends Object
Transaction Cost Analysis: benchmarks matched trades against the arrival mid, the interval market VWAP, and the prevailing mid at each fill (effective spread). All costs are signed so positive = cost to the trader, for both buys and sells.
  • Method Details

    • analyze

      public static TransactionCostAnalyzer.TcaReport analyze(List<Execution> fills, double arrivalMid, double marketVwap, double[] midAtFill)
      Parameters:
      fills - the child fills of one parent order (all same side)
      arrivalMid - market mid when the parent order was created
      marketVwap - market VWAP over the execution interval (or a synthetic forward benchmark for FX forwards/swaps)
      midAtFill - prevailing mid at each fill, aligned with fills