Class FixedBpsSlippage

java.lang.Object
com.wualabs.qtsurfer.engine.strategy.backtest.simulation.FixedBpsSlippage
All Implemented Interfaces:
SlippageModel

public class FixedBpsSlippage extends Object implements SlippageModel
A SlippageModel that moves the execution price a fixed number of basis points adverse-to-trader: BUY fills execute higher than the signal price, SELL fills execute lower . Not the default — NoSlippage is (D-2).
  • Constructor Details

    • FixedBpsSlippage

      public FixedBpsSlippage(double bps)
      Parameters:
      bps - basis points (1 bps = 0.01%) of adverse price movement to apply
  • Method Details

    • adjust

      public BigDecimal adjust(SlippageContext ctx)
      Description copied from interface: SlippageModel
      Returns the adjusted execution price for the given signal.
      Specified by:
      adjust in interface SlippageModel
      Parameters:
      ctx - the slippage context (side, signal price)
      Returns:
      the execution price after slippage