FastPrepHedges Outperforming Their Trades
Problems/Hedges Outperforming Their Trades

Hedges Outperforming Their Trades

Wolverine Trading logoWolverine Trading● EasyINTERNNEW GRADOA
QuestionConstraints

Problem statement

Source note: The visible source does not include the complete hedge-table schema or sample output. The judged core task matches the visible source at about 90%.

Two tables describe option trades and their optional hedges. Each row in wolve_trades contains a trade's profit and loss, and a matching row in wolve_hedges contains the hedge profit and loss.

Return the trade_id values for trades whose hedge PnL is strictly greater than the trade PnL. If a trade has no hedge row or its hedge_pnl is NULL, use 0 as its hedge PnL.

The result must contain one column named Trade_id. Row order does not matter.

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.

wolve_trades

One row per option trade.

ColumnTypeNullableDescription
trade_idPKIntegerNoUnique trade identifier.
symbolTextNoTicker symbol.
trade_qtyIntegerNoTrade quantity.
trade_pnlIntegerNoTrade profit and loss.
option_typeTextNoOption type.

wolve_hedges

At most one optional hedge row per option trade.

ColumnTypeNullableDescription
trade_idPKIntegerNoIdentifier of the hedged trade.
hedge_pnlIntegerYesHedge profit and loss.

Foreign key: trade_id → wolve_trades(trade_id)

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
Trade_idIntegerNo—

Row order: any order is accepted. Numeric tolerance: 0.

Constraints

  • wolve_trades.trade_id is unique.
  • For this exercise, assume each trade has at most one matching row in wolve_hedges, identified by the same trade_id.
  • Every hedge row references an existing trade.
  • For this exercise, assume trade_pnl is never NULL, while hedge_pnl may be NULL.

More Wolverine Trading problems

  • Market Share Ticker with ImbalanceOA · Seen Aug 2026
  • Longest Cumulative Kitchen Delivery TimeOA · Seen Aug 2026
  • Trade and Hedge Totals by SymbolOA · Seen Aug 2026
All Wolverine Trading interview questionsSee Wolverine Trading hiring insights