Float accounts
MarketGrid supports a special type of account known as a Float Account. The purpose of a float account is to track collateral held by a Firm in order to offset trading activity by the Firm's Accounts. Each Firm may have up to one account that is designated as that Firm's float account.
Configuring an account as the float account for a Firm is done by setting the FloatAccount foreign key on the Firm to point to one of the Firm's accounts. The account pointed to may not be also used as a regular trading account.
erDiagram Firm ||--o| Account : FloatAccount
Details
The purpose of a Float Account is to accommodate and control trading limits for Firms where individual Accounts are each limited by their own Holdings (or Cash) balances but the total trading for the Firm is limited by its total collaterialised balance held in the Float account, which may be less than the total of its individual Accounts.
For each Firm, the Exchange may create an Account that is designated the Firm Float Account. The Firm Float Account may not be used for trading. It is used to control and limit trading at the Firm level, independent of the Account balances for the Firm's clients (individual Accounts).
If a Firm has a Firm Float Account, then for every order entered by/for that Firm:
Only the client Account will be checked for sufficient balance in the settlement currency for the order. If it has insufficient balance, the order will be rejected.
For a sell order, only the client Account will be checked for sufficient balance in the Traded Instrument for that order. If it has insufficient balance, the order will be rejected.
During matching, both the client Account and the Firm Float Account will be adjusted for the actual trades and if a balance in either will be insufficient for the trade, the Firm is suspended immediately (during the matching process) specifically from any further trading in that Instrument (whether the Traded Instrument or the Cash Instrument). Orders for the Firm that use the Instrument will be suspended. In order for the Firm (i.e., any of its Accounts) to be able to trade using the suspended Instrument, the Firm's Float Account must be topped up and released.
The balances in the Firm Float Account and any of the client Accounts for any Instrument may be adjusted completely independently using Holding Transactions (which may be entered using the MarketGrid UI, or another API integration).
Worked Example
Assume that a Firm has three clients, A, B, and C, and that each of them has an opening balance of 10,000 BHP and the Firm Float Account has a balance of 8,000 BHP. The actions of various transactions on the BHP balances are tracked (the other side of the orders and trades are not considered but would work in a similar fashion).
The operation of the Firm Float Account is illustrated in the following table:
| Transaction | Result | Client A Balance | Client B Balance | Client C Balance | Firm Float Account Balance |
|---|---|---|---|---|---|
| Load Opening Balances | Balances loaded | 10,000 | 10,000 | 10,000 | 8,000 |
| Client A sell order 1000 BHP | Matches with another Firm | 9,000 | 10,000 | 10,000 | 7,000 |
| Client B sell order 11,000 BHP | Order rejected, insufficient balance | 9,000 | 10,000 | 10,000 | 7,000 |
| Client C buy order 2,000 BHP | Order rests in book | 9,000 | 10,000 | 10,000 | 7,000 |
| Client B sell order 2,000 BHP | Matches with buy order from Client C | 9,000 | 8,000 | 12,000 | 7,000 |
| Client C buy order 3,000 BHP | Matches with another Firm | 9,000 | 8,000 | 15,000 | 10,000 |
| Client A withdraw 3,000 BHP from Account | Withdraw OK | 6,000 | 8,000 | 15,000 | 10,000 |
| Deposit 5,000 BHP to Firm Float Account | Deposit OK | 6,000 | 8,000 | 15,000 | 15,000 |
| Client B sell order 8,000 BTC | 3,000 Matched with another firm. Balance of 5,000 rests in book | 6,000 | 0 | 15,000 | 7,000 |
| Client B withdraws balance of previous order | Order withdrawn | 6,000 | 5,000 | 15,000 | 12,000 |