Fees
MarketGrid has the ability to levy fees on a per-trade basis.
Depending on market configuration, Fees may be charged to either the buyer and seller in a trade, or the maker and taker.
When MarketGrid is configured to track cash balances, the maximum fee payable against an order (resulting from any combination of fills against that order) will be reserved at the time of order entry, so that it is not possible for fees to reduce an account's balance below zero.
Fee value and currency
Fees are always calculated on the SettlementValue of an order or trade and are always in the same Currency as the SettlementValue, (the order’s or trade’s SettlementCurrency) using the same implied decimals as the SettlementValue.
Default fee calculations on InstrumentMarkets
InstrumentMarkets are the individual Products traded on MarketGrid. Each is an instance of an Instrument on a Market.
For each InstrumentMarket, there is a default method that is used for the calculation of trade fees, unless over-ridden for a particular Firm. The method is determined using the following parameters.
FeeBasis
The FeeBasis parameter controls the way that fees are calculated. It is one of the following values.
| FeeBasis | Description |
|---|---|
NotSet | This is a special value used when setting up the fee parameters for the InstrumentMarket (see next section for details). |
Percent | Fees are calculated as a percentage of the trade value. |
PerUnit | Fees are calculated as a fee amount multiplied by the unit quantity of the trade. |
Fixed | A fixed fee amount is specified that applies to the top-level Account within a hierarchy of accounts and fees are applied pro-rata across all trades for all accounts that share the same parent account |
NoFee | There are no fees for the particular InstrumentMarket. |
FeeType
The FeeType parameter controls to whom fees are charged. It is one of the following:
| FeeType | Description |
|---|---|
BuySell | Fees will be levied separately against the buyer and seller of a trade. |
MakerTaker | Fees will be levied separately against the maker and taker of a trade. |
Buyer/seller fees
If the FeeType is BuySell then the following parameters will be used:
FeeBuy and FeeSell
The values used for fee calculation may be different for the buy and sell side of the trade. The value of FeeBuy is used for calculations for the buy trade and FeeSell is used for calculations for the sell side.
MinFeeBuy, MinFeeSell, MaxFeeBuy, MaxFeeSell
MinFeeBuy, MinFeeSell and MaxFeeBuy, MaxFeeSell may be used to set a minimum and maximum fee for buy and sell trades respectively. If the calculated fee is less than the minimum value, then the minimum value will be used and similarly for the maximum. If these are set to zero, then there is no minimum (or maximum).
Maker/taker fees
If the FeeType is MakerTaker, the way that fees are calculated depends on whether the calculation is on an incoming order, a trade, or an RFQ.
For an incoming order, the fee is initially calculated using the higher of the maker or taker fee on the order. This is because at order entry time, we do not know whether the order quantity will be matched as maker, taker or some combination of both so the maximum fee that could be required is used to check against the Holding balance in the SettlementCurrency.
For a trade, the fee is calculated appropriately using either the maker or the taker value for the appropriate side of the trade.
For a trade generated from an RFQ (and for the purposes of reserving cash for an RFQ) the BuySell fee type is always used, regardless of the applicable FeeType configuration. This is because there is no maker or taker for an off-book trade.
If the FeeType is MakerTaker, then the following parameters will be used (other than for RFQs as described above):
FeeMaker and FeeTaker
The values used for fee calculation may be different for the maker and taker side of the trade. The value of FeeMaker is used for calculations for the maker trade and FeeTaker is used for calculations for the taker side.
MinFeeMaker, MinFeeTaker, MaxFeeMaker, MaxFeeTaker
MinFeeMaker, MinFeeTaker and MaxFeeMaker, MaxFeeTaker may be used to set a minimum and maximum fee for maker and taker trades respectively. If the calculated fee is less than the minimum value, then the minimum value will be used and similarly for the maximum. If these are set to zero, then there is no minimum (or maximum).
Calculation examples
The following examples show how the fee parameters determine the fee for a trade where the FeeType is BuySell. The example considers a buy trade with quantity 1,000 and value $12,000. It would work similarly for a sell trade (using SellFee and MinSellFee).
| Quantity | Value | FeeBasis | BuyFee | MinBuyFee | Fee |
|---|---|---|---|---|---|
| 1,000 | 12,000 | NONE | - | - | 0 |
| 1,000 | 12,000 | PERUNIT | 0.01 | 0 | 10 |
| 1,000 | 12,000 | PERUNIT | 0.01 | 15 | 15 |
| 1,000 | 12,000 | PERUNIT | 0.02 | 15 | 20 |
| 1,000 | 12,000 | PERCENT | 1.5 | 0 | 180 |
| 1,000 | 12,000 | PERCENT | 1.5 | 200 | 200 |
| 1,000 | 12,000 | PERCENT | 2 | 200 | 240 |
Fee parameter setup
For each InstrumentMarket, the parameters for fee calculations (described in the previous section) are inherited from the first entity in the following list which has a FeeBasis value other than NotSet:
InstrumentMarket->MarketInstrumentMarket->InstrumentGroupInstrumentMarket->InstrumentInstrumentMarket->Currency->InstrumentGroupInstrumentMarket->Currency->Instrument
If no applicable fee configuration is found, the InstrumentMarket's FeeBasis is set to NoFee.
Firm– and Enterprise-level fees
It is possible to override the default fee calculation for an Instrument (or for all Instruments) for a particular Firm (or for all the Firms in an Enterprise), by assigning a FeeSet to the Firm (or Enterprise). A FeeSet is a set of one or more Fee records that define the parameters to be used when calculating the fee for an Instrument, or for all Instruments.
FeeSet table
The FeeSet table defines the FeeSet records that are available to assign to Firms or Enterprises. Each FeeSet record is simply a name for that FeeSet. The table definition is as follows.
| Field | Description |
|---|---|
Id | Unique numeric key fields. |
ShortName | The name of the FeeSet. |
Fee table
The Fee table defines the Fee records that belong to each FeeSet. The table definition is as follows.
| Field | Description |
|---|---|
Id | Unique numeric key fields. |
FeeSet | Foreign key into the FeeSet table. |
Instrument | Optional foreign key into the Instrument table. This defines the Instrument to which the fee applies. If unset, the fee is applied to all Instruments. |
FeeBasis | A valid FeeBasis value. |
FeeType | A valid FeeType value. |
FeeBuy | The buy fee calculation value. |
FeeSell | The sell fee calculation value. |
MinFeeBuy | The minimum buy fee value. |
MinFeeSell | The minimum sell fee value. |
MaxFeeBuy | The maximum buy fee value. |
MaxFeeSell | The maximum sell fee value. |
FeeMaker | The maker fee calculation value. |
FeeTaker | The taker fee calculation value. |
MinFeeMaker | The minimum maker fee value. |
MinFeeTaker | The minimum taker fee value. |
MaxFeeMaker | The maximum maker fee value. |
MaxFeeTaker | The maximum taker fee value. |
Assigning a FeeSet to a Firm and Enterprise
Each Firm and Enterprise has a FeeSet field where the FeeSet to be used for that Firm or Enterprise is defined. This is optional, it need not be set. For each trade, the fee parameters to be used for calculating the fee are determined as follows.
- If the trade’s Firm has a
FeeSetand thatFeeSetincludes a Fee record for the trade’s Instrument or for all Instruments (the Fee record has Instrument set to NULL), then use the parameters from that Fee record. - else if the Enterprise of the trade’s Firm has a
FeeSetthatFeeSetcontains a Fee record for the trade’s Instrument or for all Instruments (the Fee record has Instrument set to NULL), then use the parameters from that Fee record. - else use the default parameters for the trades InstrumentMarket.
FeeSet examples
The following examples show how the fee parameters for a trade are determined. We have static data as follows.
FeeSet table
| Id | ShortName |
|---|---|
| 1 | Set1 |
| 2 | Set2 |
Fee table
| Id | FeeSet | Instrument | Fee Parameters (FeeBasis, FeeBuy, FeeSell, MinFeeBuy, MinFeeSell) |
|---|---|---|---|
| 1 | Set1 | BHP | FeeParamsA |
| 2 | Set1 | NULL | FeeParamsB |
| 3 | Set2 | NULL | FeeParamsC |
| 4 | Set3 | AAPL | FeeParamsD |
Firm table
| Id | ShortName | FeeSet | Other Fields … |
|---|---|---|---|
| 1 | ABC | Set1 | … |
| 2 | DEF | Set2 | … |
| 3 | KLM | Set3 | … |
| 3 | XYZ | NULL | … |
Trades
Fees for trades will be calculated as follows.
| Instrument | Market | Firm | Fee Parameters Used |
|---|---|---|---|
| BHP | AUDEQ | ABC | FeeParamsA |
| BHP | UKEQ | DEF | FeeParamsC |
| BHP | AUDEQ | KLM | Default for InstrumentMarket BHP/AUDEQ |
| BHP | UKEQ | XYZ | Default for InstrumentMarket BHP/UKEQ |
| AAPL | USDEQ | ABC | FeeParamsB |
| AAPL | USDEQ | DEF | FeeParamsC |
| AAPL | USDEQ | KLM | FeeParamsD |
| AAPL | USDEQ | XYZ | Default for InstrumentMarket AAPL/USDEQ |