FastPrepMarket Share Ticker with Imbalance
Problems/Market Share Ticker with Imbalance

Market Share Ticker with Imbalance

Wolverine Trading logoWolverine Trading● MediumNEW GRADINTERNOA

Updated Nov 2026

QuestionConstraints

Problem statement

Source note: The report defines the three datasets, the market-share ratio, the imbalance formula, and a complete sample. It does not say how ties are handled or give limits for the data. Our version returns the dictionary as a one-row table. It is about 90% the same as the reported question.

An exchange publishes market trades, and one participant separately records the subset of trades in which it participated. A symbology table maps exchange product identifiers to ticker symbols.

For every product in which the participant traded, compute its market share as the participant's total traded quantity divided by the exchange's total traded quantity for that product. Select the product with the largest exact market-share ratio.

For the selected product, compute the participant's closing imbalance: total quantity on buy rows (B) minus total quantity on sell rows (S).

Return exactly one row with columns product and imbalance, in that order. FastPrep represents the source routine's two-key dictionary as this one-row result table.

Table schema

MySQLPostgreSQLPandas

Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.

market_trades

One row per market transaction.

ColumnTypeNullableDescription
product_idIntegerNoExchange product identifier.
trade_idPKIntegerNoUnique exchange transaction identifier.
quantityIntegerNoTotal exchange shares in the transaction.

participant_trades

The participant's subset of exchange transactions.

ColumnTypeNullableDescription
productTextNoTicker symbol.
trade_idPKIntegerNoReferenced exchange transaction identifier.
sideTextNoB for buy or S for sell.
quantityIntegerNoShares executed by the participant.

Foreign key: trade_id → market_trades(trade_id)

symbology

Mapping from ticker symbols to exchange product identifiers.

ColumnTypeNullableDescription
productTextNoTicker symbol.
product_idPKIntegerNoExchange product identifier.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
productTextNo—
imbalanceIntegerNo—

Row order: must match exactly. Numeric tolerance: 0.

Constraints

  • market_trades.trade_id, symbology.product, and symbology.product_id are unique.
  • Every participant row references one market trade, and its product matches that trade's mapped symbology product. Products with no participant row are not candidates.
  • Every participant product has a positive total exchange quantity. Market and participant quantities are positive integers, and all required sums fit a signed 64-bit integer.
  • side is exactly B or S, and at least one participant row is present.
  • Compare market-share ratios without rounding. If products tie, return the lexicographically smaller uppercase ASCII product.

More Wolverine Trading Online Assessment questions

  • Hedges Outperforming Their TradesOA · Seen Aug 2026
  • Longest Cumulative Kitchen Delivery TimeOA · Seen Aug 2026
  • Trade and Hedge Totals by SymbolOA · Seen Aug 2026
  • Permutation Operations 🌻OA · Seen Mar 2024
  • Shared Interest 🌷OA · Seen Mar 2024
  • The Huffman Decoder 🌼OA · Seen Mar 2024

Similar questions at other companies

  • Auction Lot Bid SummaryHackerRank · OAHackerRank interview questions
  • Bond Holders Above the Cash Flow ThresholdBirla Pivot · OA
  • Prepare Taxi Driver Classification DataBoston Consulting Group · OABoston Consulting Group interview questions
  • Find the Dominant SellerSquadStack.ai · OA
  • Track the Book and Mark Final PnLMillennium · OAMillennium interview questions
  • Overloaded Game Account InventoriesWells Fargo · OAWells Fargo interview questions
  • Transaction Totals and Ranked Failure ReasonsIntuit · OAIntuit interview questions
  • Employees Joined per MonthOdoo · OAOdoo interview questions
  • Bond Haircut by Ratings and MaturityJane Street · OAJane Street interview questions
  • Customer Order FeesAdobe · OAAdobe interview questions
All Wolverine Trading interview questionsSee Wolverine Trading hiring insights