FastPrepExport Trade Records to CSV
Problems/Export Trade Records to CSV

Export Trade Records to CSV

Citadel logoCitadel● EasyINTERNPHONE SCREEN

Updated Apr 2026

QuestionConstraints

Problem statement

Source note: Seen in one software engineering intern report for Citadel Securities from Sydney, posted in 2026 about an interview in 2025. Before the interview there was an online coding test whose algorithm questions the report does not describe. In the interview the candidate used Pandas to turn financial data into a CSV file. The report gives no data, columns or file layout.

We chose trade records as the financial data and wrote the whole table: its columns, the US-style input time, the ISO 8601 output time, the notional column, the column order, the sort order with its tie-breaks, the 0.0001 tolerance, the limits and all the data. Returning the table that would be written to the file, instead of the file text, is ours too.

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

A trading desk keeps its raw trade records in a trades table and needs them written to a CSV file. Using Pandas, build the table that will be written to that file.

Each row of trades is one trade. It has a trade_id, the time executed_at, a symbol, a side (BUY or SELL), a quantity of shares and a price per share. The time is text in the form MM/DD/YYYY HH:MM:SS, on a 24-hour clock.

Return one row per trade with exactly these columns, in this order:

  1. trade_id
  2. trade_time: the time executed_at written in the ISO 8601 form YYYY-MM-DDTHH:MM:SS. For example, 04/07/2025 09:30:05 becomes 2025-04-07T09:30:05.
  3. symbol
  4. side
  5. quantity
  6. price
  7. notional: the value of the trade, quantity * price.

Sort the rows by time, earliest first. Break a tie by symbol in alphabetical order, and then by trade_id, smallest first.

The judge checks the table you return, the same table that to_csv(index=False) would then write to the file. A notional is accepted when it is within 0.0001 of the exact value.

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.

trades

One row per trade, as it arrives from the trading system.

ColumnTypeNullableDescription
trade_idPKIntegerNoUnique trade ID.
executed_atTextNoExecution time as MM/DD/YYYY HH:MM:SS (24-hour clock).
symbolTextNoStock symbol.
sideTextNoBUY or SELL.
quantityIntegerNoShares traded.
priceDecimalNoPrice per share.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
trade_idIntegerNo—
trade_timeTextNo—
symbolTextNo—
sideTextNo—
quantityIntegerNo—
priceDecimalNo—
notionalDecimalNo—

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

Constraints

  • trades has between 1 and 500 rows.
  • trade_id values are unique, and 1 <= trade_id <= 109.
  • Every executed_at is a real date and time in the form MM/DD/YYYY HH:MM:SS, with two digits for the month, day, hour, minute and second, and a year from 2000 to 2099. All times are in the same time zone.
  • symbol has 1 to 5 uppercase English letters.
  • side is BUY or SELL.
  • 1 <= quantity <= 10000
  • 0 < price <= 10000, with at most 4 digits after the decimal point.

More Citadel Phone Screen questions

  • Merge Price-Delta FeedsPHONE SCREEN · Seen Dec 2026
  • Speed Up a Slow FunctionOA · PHONE SCREEN · Seen Nov 2026
  • Portfolio Tickers with Constant-Time Random PickPHONE SCREEN · Seen Nov 2026
  • Square Root FunctionPHONE SCREEN · Seen Oct 2026
  • Reachable Transfer PositionsPHONE SCREEN · Seen Oct 2026
  • Spreadsheet Formula DependenciesPHONE SCREEN · Seen Oct 2026
  • Currency Arbitrage CyclePHONE SCREEN · Seen Sep 2026
  • Order Book with Cancel by Order IDPHONE SCREEN · Seen Sep 2026
  • Smart Queue of Latest PricesPHONE SCREEN · Seen Sep 2026
  • Reconcile Unmatched Trades with Timestamp TolerancePHONE SCREEN · Seen Sep 2026

Similar questions at other companies

  • Second Highest SalaryPaytm · PHONE SCREENPaytm interview questions
  • Employees Who Earn More Than Their ManagersNykaa · PHONE SCREENNykaa interview questions
  • Employees Who Joined More Than a Week AgoNewgen Software · PHONE SCREEN
  • Departments Without EmployeesDell Technologies · PHONE SCREENDell Technologies interview questions
  • Second-Highest Distinct SalaryChubb · PHONE SCREENChubb interview questions
  • Swap Two Gender ValuesInfosys · PHONE SCREENInfosys interview questions
  • Find Rows Common to Two TablesSalesforce · PHONE SCREENSalesforce interview questions
  • Count Records Present in A but Not BCapital One · PHONE SCREENCapital One interview questions
  • Customer Order Count Distribution by CountryApple · PHONE SCREENApple interview questions
  • Employees Earning More Than Their ManagerMygate · PHONE SCREENMygate interview questions

Citadel interview experiences

  • Citadel Securities Quant Researcher Intern Loop: 1 Experience
  • Citadel Securities Research Engineer Interview: 1 Experience
  • Citadel Securities SWE Intern First Round: 2 Experiences
  • Citadel Securities Experienced SWE Interviews: 1 Experience
  • Citadel SWE Intern Later Rounds and Superday: 13 Experiences
  • Citadel SWE Intern First-Round Questions: 20 Experiences
All Citadel interview questionsSee Citadel hiring insights