Skip to content

Main content

Liquidity Bidask Midpoint Relative Gap Tool

Calculate liquidity bidask midpoint relative gap from explicit caller-supplied inputs.

Loading tool…

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

  1. Enter bid, ask. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
bidBidRequired. Finite number; minimum 0.
askAskRequired. Finite number.
Output fieldInterpretationReturned shape
midpointMidpointRequired. Finite number.
spreadSpreadRequired. Finite number.
relativeSpreadRelative SpreadRequired. Finite number.
json
{
  "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

  1. Calculation and input contract: financial-economics/liquidity-bidask-midpoint-relative-gap — tool.io

Similar or alternative tools