FastPrepOrder Latency Summary Statistics
Problems/Order Latency Summary Statistics

Order Latency Summary Statistics

Hudson River Trading logoHudson River Trading● EasyINTERNOA

Updated Nov 2022

QuestionConstraints

Problem statement

Source note: Seen in one Hudson River Trading algorithm development intern report from Chicago, posted in 2022, about the online assessment. One of its four questions asked for simple data processing and summary statistics with pandas. The report gives no data, columns or required outputs.

We wrote the whole task: the orders table and its reply times, dropping missing values as the processing step, and the list of statistics per symbol, which are the ones pandas describe() returns. The table and column names, the percentile rule, the 0.0001 tolerance and all the data are ours too.

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

A trading system sends orders to an exchange and logs each order in the orders table. latency_us is how long the exchange took to reply to the order, in microseconds. Some orders never got a reply time, so their latency_us is NULL (<NA> in Pandas).

Drop the orders with a missing latency_us. Then, for each symbol that still has at least one order, return one row with these columns, in this order, describing its latency_us values:

  • symbol
  • count: the number of orders with a reply time.
  • mean: the average.
  • std: the sample standard deviation, which divides by count - 1. It is NULL (<NA>, NaN or None in Pandas) when count is 1.
  • min: the smallest value.
  • p25, median and p75: the 25th, 50th and 75th percentiles. When a percentile falls between two sorted values, use linear interpolation: for q equal to 0.25, 0.5 or 0.75, the percentile sits at position q * (count - 1) in the sorted list, counting from 0.
  • max: the largest value.

A symbol whose orders all have a missing latency_us does not appear in the result. If no order has a reply time, return an empty table with these nine columns. Return the rows in any order. Each number is accepted when it is within 0.0001 of the exact value, and count may be a whole number such as 4 or 4.0.

Table schema

Pandas

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.

orders

One row per order sent to the exchange.

ColumnTypeNullableDescription
order_idPKIntegerNoUnique order ID.
symbolTextNoStock symbol, for example 'AAPL'.
latency_usIntegerYesMicroseconds until the exchange replied, or NULL when no reply time was logged.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
symbolTextNo—
countDecimalNo—
meanDecimalNo—
stdDecimalYes—
minDecimalNo—
p25DecimalNo—
medianDecimalNo—
p75DecimalNo—
maxDecimalNo—

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

Constraints

  • The orders table has between 1 and 1000 rows.
  • order_id values are unique.
  • symbol has 1 to 10 uppercase English letters.
  • latency_us is NULL or an integer with 0 <= latency_us <= 1000000.

More Hudson River Trading Online Assessment questions

  • Count Palindrome Addition ChoicesOA · Seen Nov 2026
  • Count Multiples of Three with Two SevensOA · Seen Oct 2026
  • Recursively Expanded Shell Command CountsOA · Seen Oct 2026
  • Rotate Matrix Regions Around the DiagonalsOA · Seen Oct 2026
  • Maximum Diamond SumOA · Seen Oct 2026
  • Smallest Most-Lit Street PositionOA · Seen Oct 2026
  • Rearrange String by Alternating EndsOA · Seen Sep 2026
  • Most Items Within Budget from a Start IndexOA · Seen Sep 2026
  • Count Fancy NumbersOA · Seen Sep 2026
  • Count Pieces After Othello MovesOA · Seen Sep 2026

Similar questions at other companies

  • Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
  • 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
  • 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

  • Hudson River Trading OA · 2022

Hudson River Trading interview experiences

  • Hudson River Trading Data Science Interviews: 2 Experiences
  • Hudson River Trading interviews · 2021
  • Hudson River Trading OA · 2021
  • Hudson River Trading interviews · 2022
  • Hudson River Trading interviews · 2023
All Hudson River Trading interview questionsSee Hudson River Trading hiring insights