30 lines
1.4 KiB
Plaintext
30 lines
1.4 KiB
Plaintext
This test verifies that account loss limits work.
|
|
|
|
-1. This needs sim market data **not** to be merged with replay (or cert), so we can create our own markets.
|
|
|
|
0. Blow away the orders and fills databases (/home/bts/sparkdata/data/databases/orders,fills,
|
|
ex_sim_orders)
|
|
|
|
Pick a future and 2 accounts (lets call them A and B).
|
|
|
|
In the risk admin
|
|
a. make sure the clip limits and position limits are high enough for the 2 accounts so they
|
|
dont interfare and stop orders
|
|
b. for the loss limit enter 1000 for B.
|
|
|
|
1. Bring up 2 ladders for the contract you selected, each set to one of the accounts above. Bring up the
|
|
PNL window and set it to Mid. Now from account A enter a 100 lot bid and 100 lot ask (so now we have markets).
|
|
|
|
2. From Account B cross the sell with a 1 lot buy. Now you should see a negative PNL for B, and a positive for A
|
|
(because we bought at higher than the mid in B, and sold for higher than the mid in A)
|
|
|
|
3. Go to the risk admin and enter a loss limit for account B (~4 times the PNL for B)
|
|
|
|
4. Repeat 2 and continue monitoring the PNL. Sell a few more at the market bid. As soon as the PNL goes below
|
|
the loss limits, orders should be rejected with a message saying exactly why.
|
|
|
|
5. Increase the loss limit, and hit it again with a few loser trades.
|
|
|
|
6. Move the market mid (by moving the 100 lots orders in 1) and try to get B's PNL within the loss limit range.
|
|
Now enter more loser trades in B and make it hit the limit again.
|