FastPrepTrade Blotter Summary by Ticker
Problems/Trade Blotter Summary by Ticker

Trade Blotter Summary by Ticker

Jane Street logoJane Street● EasyFULLTIMENEW GRADOA

Updated Jun 2021

QuestionConstraints

Problem statement

Source note: Seen in nine Jane Street trading desk operations reports posted from 2018 to 2021, all about the Excel test. The fullest, a 2020 new-grad post, shows a screenshot of a sheet of stock trades with five formula questions about single tickers: the counts of buy and sell trades, the shares traded, the market value of the buys and the share-weighted average buy price. One other report mentions a per-ticker tally and one names share counts as a topic. The other six only say some Excel function work came with the haircut tasks; we matched those to this sheet by that position, not by content.

We turned the five formula questions into one query. Reporting every ticker at once instead of one named ticker per question, the table and column names, the trade ID, a buy value of 0 and an empty average for a ticker with no buys, the 0.0001 tolerance and all the data are ours.

Our version is about 70% the same as the reported question.

A trading desk keeps a blotter of the day's stock trades in the trades table. Each row is one trade: the stock's ticker, its direction ('B' for a buy, 'S' for a sell), the number of shares in quantity and the price per share in price.

Return one row for every ticker in the table, with these columns:

  • ticker
  • buy_trades: the number of buy trades in that ticker.
  • sell_trades: the number of sell trades in that ticker.
  • total_shares: the total number of shares traded in that ticker, buys and sells together.
  • buy_value: the total market value of the buys, which is the sum of quantity * price over the buy trades. It is 0 when the ticker has no buys.
  • buy_vwap: the volume-weighted average price of the buys, which is buy_value divided by the number of shares bought. It is NULL (None in Pandas) when the ticker has no buys.

Return the rows in any order. A decimal answer is accepted when it is within 0.0001 of the exact value.

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.

trades

One row per trade on the desk's blotter.

ColumnTypeNullableDescription
trade_idPKIntegerNoUnique trade ID.
tickerTextNoStock ticker, for example 'MSFT US'.
directionTextNo'B' for a buy, 'S' for a sell.
quantityIntegerNoNumber of shares traded.
priceDecimalNoPrice per share.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
tickerTextNo—
buy_tradesIntegerNo—
sell_tradesIntegerNo—
total_sharesIntegerNo—
buy_valueDecimalNo—
buy_vwapDecimalYes—

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

Constraints

  • The trades table has between 1 and 1000 rows.
  • trade_id values are unique.
  • ticker has 1 to 10 characters: uppercase English letters, digits and spaces.
  • direction is 'B' or 'S'.
  • 1 <= quantity <= 10000
  • 0 < price <= 1000, with at most 4 digits after the decimal point.

More Jane Street interview questions

  • Product Profit SummaryOA · Seen Sep 2026
  • Cheating CodemakerOA · Seen Mar 2026
  • Bond Haircut by Ratings and MaturityOA · Seen Aug 2024
  • Currency Haircut with FX ForwardsOA · Seen Aug 2024
  • Transform StringOA · Seen Jul 2024
  • Price Deviation AlertsOA · Seen Nov 2023
  • Biggest Daily Move and Longest Rising StreakOA · ONSITE INTERVIEW · Seen Apr 2021
  • Transaction Fees by InstrumentOA · Seen Mar 2018
  • Maximum-Scoring Consecutive Tree LevelsPHONE SCREEN · Seen Nov 2026
  • Tree Selection and VisibilityPHONE SCREEN · Seen Nov 2026

Similar questions at other companies

  • Students Scoring Above AverageCapstone Investment Advisors · OA
  • Bond Interest Summary Above 3%Wells Fargo · OAWells Fargo interview questions
  • Employee Promotion OpportunitiesIntuit · OAIntuit interview questions
  • Students and Their SubjectsBirla Pivot · OA
  • Companies with Average Salary Above 40000AT&T · OAAT&T interview questions
  • Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
  • Weekend Appointments for Consular Services ReschedulingMcKinsey & Company · OAMcKinsey & Company interview questions
  • Companies Above a Salary ThresholdVerisk · OA
  • Customer Resource Usage AnalysisIBM · OAIBM interview questions
  • Customers Who Never OrderedAccenture · OAAccenture interview questions

Interview reports that mention this question

  • Jane Street TDO Phone Math Round: 26 Experiences (Part 9 of 10)
  • Jane Street TDO Excel and VBA Test: 23 Experiences (Part 8 of 10)
  • Jane Street TDOE New Grad Interview Questions: 11 Experiences

Jane Street interview experiences

  • Jane Street TDO UK and Hong Kong: 22 Experiences (Part 10 of 10)
  • Jane Street TDOE US Final Round: 11 Experiences (Part 5 of 10)
  • Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
All Jane Street interview questionsSee Jane Street hiring insights