Description
Return midpoint, ask-bid spread and spread/midpoint.
Market quotes and settlement values use instrument-specific units and timing. A spread or one settlement's cash movement can be calculated from supplied prices without establishing execution availability, total cost or a trading opportunity.
Return midpoint, ask-bid spread and spread/midpoint.
When to use this tool
Use Liquidity Bidask Midpoint Relative Gap when you need a quoted-price or settlement arithmetic term.
How to use the tool and how it works
- Enter bid, ask. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read midpoint, spread, relativeSpread. Use the output convention below.
Require nonnegative bid, ask at least bid and positive sum. Return midpoint, ask-bid spread and spread/midpoint.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| bid | Bid | Required. Finite number; minimum 0. |
| ask | Ask | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| midpoint | Midpoint | Required. Finite number. |
| spread | Spread | Required. Finite number. |
| relativeSpread | Relative Spread | Required. Finite number. |
{
"input": {
"bid": 99,
"ask": 101
},
"output": {
"midpoint": 100,
"spread": 2,
"relativeSpread": 0.02
}
} Limitations and assumptions
- Quotes must be comparable in currency, instrument and time. Relative spread is a fraction, not percent; midpoint is not a guaranteed executable price.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use actual instrument specifications and contemporaneous market data for trading or reconciliation. Include multiplier, currency, fees, timing and relevant account rules.
References
Similar or alternative tools
- Auction Second Price Gap
Require at least two nonnegative bids, sort a copy descending, and return the top two and their difference.
- Futures Margin Variation One Settlement
Multiply price change by contracts and multiplier, reversing sign for a short position.