Modifying tests according to the limit changes

This commit is contained in:
Taha Afzal committed 2019-08-28 22:24:54 -04:00
1 parent 82535c915a
commit 0ff2fbc4ff
3 files changed
+20 -10

No files matched your search

+5
View File
@@ -27,6 +27,11 @@ _sod_time(sod_time){
// returns the timeval for today's hh,mm,ss (in local machine terms)
// (timeval is the microseconds from epoch)
timeval SODPosition::to_timeval(uint16_t hh, uint16_t mm, uint16_t ss) {
// function does the conversion the following way:
// 1. gets the now secs from epoch using time
// 2. converts it into local time (so we have now local time)
// 3. overrides the hh, mm, ss passed
// 4. converts it back into secs from epoch using mktime
bts_assert(hh < 24);
bts_assert(mm < 60);
bts_assert(ss < 60);
@@ -1,6 +1,4 @@
This test verifies that product position limits are enforced correctly. (Position limits are
enforced at both the security and account level)
This test verifies that product position limits are enforced correctly.
Use SIM for all steps of the test
0. Clear up your orders, fills and admin db so we don't have any lingering positions
@@ -17,11 +15,16 @@ and enter a big clip, say 500000, so that clip limits don't interfere with this
5. Enter a rule for SIM, Future, SI, 60, 120.
6. Send 3 10 lot buys for both the futures. Make sure they go through.
6. Send 3 20 lot buys for both the futures. Make sure they go through.
7. Send a 1 lot on SIU8. The limit of 60 should not allow it. Make sure the rejection
message is clear.
8. Cross 2 of the 20 lots enterred in 6 so that they fill.
9. Send a 1 lot on SIU8. The limit of 60 should not allow it. Make sure the rejection
message is clear.
8. Change the max to 70, and try a 10 lot again. This order should be allowed.
Try another 10 lot and it should be stopped.
@@ -4,17 +4,19 @@ ii. spread legs fills (and working orders) are applied toward enforcing
the position limits for the legs
iii. leg limits are checked when entering spread orders
i:
1. Pick a 2 legged spread (lets say SIU8-SIZ8). Set the clip limits high for both spreads and futures
so that they don't interfere.
2. For the Position Limits, set Max Long and Max Short of 100 and 110
for the SI futures and 20 and 30 for the SI spreads respectively.
3. Verify that the limits set in 2 work for futures(remember working orders count toward limit enforcement so you dont need
fills). Cancel all the orders.
3. Make sure "Ignore Spread Position Limits" is not checked
4. Verify that the limits set in 2. work for spreads. Cancel all the orders.
4. Verify that the limits set in 2 work for futures. Accrue future "positions" through a
combination of working orders and fills. Cancel all the orders.
5. Make these position limits 1,000,000 to make them irrelevant
5. Verify that the limits set in 2. work for spreads. Cancel all the orders.
6. Check "gnore Spread Position Limits" and make sure this disables spread limits.
7. Make these position limits 1,000,000 to make them irrelevant