Forked from prystupa/MatchingEngine.ReferencePrice.feature
Created
November 26, 2017 03:49
-
-
Save jdrew1303/0f6df701004b2eeb49901be54b655925 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Maintaining reference price as trades occur | |
Scenario: Updating reference price as it is set at the opening and trades occur | |
Given the reference price is set to "10" | |
When the following orders are submitted in this order: | |
| Broker | Side | Qty | Price | | |
| A | Buy | 100 | 11 | | |
| B | Sell | 100 | 11 | | |
Then the following trades are generated: | |
| Buying broker | Selling broker | Qty | Price | | |
| A | B | 100 | 11 | | |
And the reference price is reported as "11" | |
When the following orders are submitted in this order: | |
| Broker | Side | Qty | Price | | |
| A | Buy | 100 | 12 | | |
| B | Sell | 100 | MO | | |
Then the following trades are generated: | |
| Buying broker | Selling broker | Qty | Price | | |
| A | B | 100 | 12 | | |
And the reference price is reported as "12" | |
When the following orders are submitted in this order: | |
| Broker | Side | Qty | Price | | |
| A | Buy | 100 | MO | | |
| B | Sell | 100 | MO | | |
Then the following trades are generated: | |
| Buying broker | Selling broker | Qty | Price | | |
| A | B | 100 | 12 | | |
And the reference price is reported as "12" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment