Interface FeeModel

All Known Implementing Classes:
FixedFeeModel, MakerTakerFeeModel

public interface FeeModel
Decides the fee RATE (decimal, e.g. 0.001 = 0.1%) charged on a backtest fill .

This model decides how much; the FeeLeg (see BacktestOrderTradeExecution) decides in which asset the fee lands. This is a deliberate divergence from the TS FeeModel (which returns a quote-denominated amount) because the Java engine has an orthogonal fee-leg concept the TS port does not.

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the decimal fee rate to charge for the given fill context.
  • Method Details

    • rate

      double rate(FeeContext ctx)
      Returns the decimal fee rate to charge for the given fill context.
      Parameters:
      ctx - the fill context (side, liquidity, price, amount, instrument)
      Returns:
      the decimal fee rate (e.g. 0.001 = 0.1%)