Class FixedFeeModel

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

public class FixedFeeModel extends Object implements FeeModel
The DEFAULT FeeModel: a fixed decimal rate per side, ignoring liquidity . Wraps the existing buyFeeRate/sellFeeRate substrate on BacktestConfig so the default fill path reproduces today's numbers byte-for-byte.
  • Constructor Details

    • FixedFeeModel

      public FixedFeeModel(double buyRate, double sellRate)
      Parameters:
      buyRate - decimal fee rate charged on BUY fills
      sellRate - decimal fee rate charged on SELL fills
  • 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%)