Class MakerTakerFeeModel

java.lang.Object
com.wualabs.qtsurfer.engine.strategy.backtest.simulation.MakerTakerFeeModel
All Implemented Interfaces:
FeeModel

public class MakerTakerFeeModel extends Object implements FeeModel
A FeeModel charging a different rate depending on whether the fill made or took liquidity. Not wired as a default in P1 — routing market fills as Liquidity.TAKER and limit fills as Liquidity.MAKER lands with the pending-order queue in P3; provided now so P2/P3 can consume it without another interface change.
  • Constructor Details

    • MakerTakerFeeModel

      public MakerTakerFeeModel(double makerRate, double takerRate)
      Parameters:
      makerRate - decimal fee rate charged on fills that add liquidity
      takerRate - decimal fee rate charged on fills that remove liquidity
  • Method Details

    • rate

      public double rate(FeeContext ctx)
      Description copied from interface: FeeModel
      Returns the decimal fee rate to charge for the given fill context.
      Specified by:
      rate in interface FeeModel
      Parameters:
      ctx - the fill context (side, liquidity, price, amount, instrument)
      Returns:
      the decimal fee rate (e.g. 0.001 = 0.1%)