45 lines
2.3 KiB
Plaintext
45 lines
2.3 KiB
Plaintext
This test verifies that fractional hedges work. That is, when a fill in a quoting leg does
|
|
not equate to one full contract in the hedging leg, we accumulate the unhedged
|
|
delta, until we can send one or more hedging contracts.
|
|
|
|
1. Create a new synthetic spread. For the legs choose SIF9 and SIH9 (if you don't
|
|
have these contracts, other contracts can be chosen too) and for the quantities choose 1 and -1.5
|
|
respectively (and same for the Price multiplier).
|
|
Enable quoting for SIH9, and disable all quoting, pre-hedge and post-hedge parameters.
|
|
Name the synthetic SIF9-1.5SIH9.
|
|
|
|
1. Bring up the ladder for the synthetic and for the 2 legs.
|
|
|
|
2. Enter a 10 lot sell order at 20.0 for SIF9 (If the ladder is showing blanks use the market view
|
|
to enter orders). The quoting order will lean against this.
|
|
|
|
3. Enter a 10 lot buy order for the synthetic at -9.900.
|
|
|
|
4. Verify that a 15 lot quoting order is sent for SIH9 at 19.935.
|
|
|
|
5. Now we will start filling the quoting order and verify the hedges. A 1 lot fill in the
|
|
quoting leg means a 2/3 contract in the hedging leg. Since we can not send 2/3 contracts,
|
|
we will add it to the "unhedged delta" till the unhedged delta > 1, and then we will send one
|
|
or more orders to get the unhedged delta < 1.
|
|
|
|
Force quoting fills based on the left most column (by lifting the quoting offer)
|
|
and verify that hedge orders of size "hedge_order_sent" (3rd column) are sent as a result.
|
|
The "unhedged_delta" column shows the unhedged delta immediately after the quoting fill
|
|
and the "remaining_unhedged_delta" column is the unhedged delta after the hedge order
|
|
has been sent.
|
|
You can check the hedge orders being sent easily by looking at the order reduction
|
|
happening on the order sent in step 2 (or look at the hedges in the orderbook).
|
|
------------------------------------------------------------------------------
|
|
quoting fill unhedged_delta hedge_order_sent remaining_unhedged_delta
|
|
------------------------------------------------------------------------------
|
|
1 2/3 0 2/3
|
|
1 4/3 1 1/3
|
|
1 1 1 0
|
|
4 8/3 2 2/3
|
|
5 4 4 0
|
|
2 4/3 1 1/3
|
|
1 1 1 0
|
|
|
|
6. At the end of this, the whole order should be filled. Check the order book
|
|
to make sure the fill price is -9.900, there are 10 total fills in SIF9 and
|
|
15 fills in SIH9. |