code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price_monitoring/price-monitoring-lognormal-identical-bounds.feature (about)

     1  Feature: Price monitoring test using forward risk model (bounds for the valid price moves around price of 100000 for the two horizons are: [99460,100541], [98999,101008])
     2  
     3    Background:
     4      Given time is updated to "2020-10-16T00:00:00Z"
     5      And the price monitoring named "my-price-monitoring":
     6        | horizon | probability | auction extension |
     7        | 10     | 0.95         | 180               |
     8        | 10     | 0.95         | 180                |
     9      And the log normal risk model named "my-log-normal-risk-model":
    10        | risk aversion | tau                    | mu | r     | sigma |
    11        | 0.000001      | 0.00011407711613050422 | 0  | 0.016 | 2.0   |
    12      And the markets:
    13        | id        | quote name | asset | risk model                    | margin calculator         | auction duration | fees         | price monitoring    | data source config     | linear slippage factor | quadratic slippage factor | sla params      |
    14        | ETH/DEC21 | ETH        | ETH   | default-log-normal-risk-model | default-margin-calculator | 60               | default-none | my-price-monitoring | default-eth-for-future | 0.01                   | 0                         | default-futures |
    15      And the following network parameters are set:
    16        | name                           | value |
    17        | market.auction.minimumDuration | 60    |
    18        | limits.markets.maxPeggedOrders | 2     |
    19  
    20    Scenario: Persistent order breaks a repeated trigger (upper bound)
    21      Given the parties deposit on asset's general account the following amount:
    22        | party  | asset | amount       |
    23        | party1 | ETH   | 10000000000  |
    24        | party2 | ETH   | 10000000000  |
    25        | aux    | ETH   | 100000000000 |
    26        | aux2   | ETH   | 100000000000 |
    27  
    28      When the parties place the following orders:
    29        | party | market id | side | volume | price  | resulting trades | type       | tif     |
    30        | aux2  | ETH/DEC21 | buy  | 1      | 110000 | 0                | TYPE_LIMIT | TIF_GTC |
    31        | aux   | ETH/DEC21 | sell | 1      | 110000 | 0                | TYPE_LIMIT | TIF_GTC |
    32      And the opening auction period ends for market "ETH/DEC21"
    33      Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC21"
    34      And the mark price should be "110000" for the market "ETH/DEC21"
    35      
    36  
    37      When time is updated to "2020-10-16T00:02:00Z"
    38      Then the market data for the market "ETH/DEC21" should be:
    39        | trading mode            | auction trigger             | extension trigger           | mark price | indicative price | indicative volume | horizon | ref price | min bound | max bound |
    40        | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | AUCTION_TRIGGER_UNSPECIFIED | 110000     | 0                | 0                 | 10      | 110000    | 109758    | 110242    |
    41  
    42      #T1 = T0 + 1min10s
    43      When time is updated to "2020-10-16T00:03:10Z"
    44      And the parties place the following orders:
    45        | party  | market id | side | volume | price  | resulting trades | type       | tif     |
    46        | party1 | ETH/DEC21 | sell | 1      | 111000 | 0                | TYPE_LIMIT | TIF_GTC |
    47        | party2 | ETH/DEC21 | buy  | 1      | 111000 | 0                | TYPE_LIMIT | TIF_GTC |
    48      And the market data for the market "ETH/DEC21" should be:
    49        | trading mode                    | auction trigger       | extension trigger           | mark price | indicative price | indicative volume | auction end |
    50        | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_UNSPECIFIED | 110000     | 111000           | 1                 | 180         |
    51  
    52      #T1 + 03min00s (last second of the auction)
    53      When time is updated to "2020-10-16T00:06:10Z"
    54      Then the market data for the market "ETH/DEC21" should be:
    55        | trading mode                    | auction trigger       | extension trigger           | mark price | indicative price | indicative volume | auction end | horizon | ref price | min bound | max bound |
    56        | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_UNSPECIFIED | 110000     | 111000           | 1                 | 180         | 10      | 110000    | 109758    | 110242    |
    57  
    58      #T2 = T1 + 03min01s (auction gets extended as the other trigger gets activated)
    59      When time is updated to "2020-10-16T00:06:11Z"
    60      Then the market data for the market "ETH/DEC21" should be:
    61        | trading mode                    | auction trigger       | extension trigger     | mark price | indicative price | indicative volume | auction end |
    62        | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_PRICE | 110000     | 111000           | 1                 | 360         |
    63  
    64      #T2 + 03min00s (market returns to continuous trading mode)
    65      When time is updated to "2020-10-16T00:09:11Z"
    66      Then the market data for the market "ETH/DEC21" should be:
    67        | trading mode            | auction trigger             | extension trigger           | mark price | indicative price | indicative volume | auction end | horizon | ref price | min bound | max bound |
    68        | TRADING_MODE_CONTINUOUS | AUCTION_TRIGGER_UNSPECIFIED | AUCTION_TRIGGER_UNSPECIFIED | 111000     | 0                | 0                 | 0           | 10      | 111000    | 110756    | 111245    |
    69  
    70