FastPrepTransaction Fees by Instrument
Problems/Transaction Fees by Instrument

Transaction Fees by Instrument

Jane Street logoJane Street● EasyFULLTIMEOA

Updated Mar 2018

QuestionConstraints

Problem statement

Source note: Seen in one Jane Street trading desk operations report from New York, posted in 2018, about the first stage, an Excel test. The report says the test also teaches a finance idea and checks that you understood it. Its only stated task was a fee calculation for some financial products, with no fee rules, products or numbers given.

We wrote the whole fee schedule: a rate in basis points of the trade value plus a charge per unit, a minimum fee per trade, one rule per product type, and a fee total for each product, including products with no trades. Reading the fees as charges on single trades added up by product is ours. The table and column names, the product types, the 0.0001 tolerance and all the data are ours too.

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

A broker charges a fee on every trade. The instruments table gives each symbol an instrument_type, and the fee_schedule table gives the fee rule for each type. The trades table lists the trades, each with a symbol, a quantity of units and a price per unit.

The fee on one trade is worked out from the rule of its instrument's type:

  • The trade value is quantity * price.
  • The rate is in basis points. One basis point is 0.01%, so the rate part is trade value * rate_bps / 10000.
  • The unit part is quantity * per_unit_fee.
  • The fee is the rate part plus the unit part, but never less than minimum_fee. The minimum applies to each trade on its own.

Return one row for every symbol in instruments, with these columns:

  • symbol
  • trade_count: the number of trades in that symbol.
  • total_fee: the sum of the fees on those trades, or 0 when the symbol has no trades.

Return the rows in any order. A fee total 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.

instruments

One row per instrument.

ColumnTypeNullableDescription
symbolTextNoInstrument symbol.
instrument_typeTextNoType that decides the fee rule.

fee_schedule

One fee rule per instrument type.

ColumnTypeNullableDescription
instrument_typeTextNoInstrument type.
rate_bpsDecimalNoFee rate in basis points of the trade value.
per_unit_feeDecimalNoFee per unit traded.
minimum_feeDecimalNoSmallest fee on one trade.

trades

One row per trade.

ColumnTypeNullableDescription
trade_idPKIntegerNoUnique trade ID.
symbolTextNoInstrument traded.
quantityIntegerNoUnits traded.
priceDecimalNoPrice per unit.

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
symbolTextNo—
trade_countIntegerNo—
total_feeDecimalNo—

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

Constraints

  • instruments has between 1 and 100 rows, and its symbol values are unique.
  • fee_schedule has between 1 and 20 rows, its instrument_type values are unique, and every type used in instruments appears in it.
  • trades has between 1 and 2000 rows, trade_id values are unique, and every trade's symbol appears in instruments.
  • symbol and instrument_type have 1 to 20 characters: English letters, digits, spaces, dots and underscores. No two symbol values, and no two instrument_type values, differ only in letter case.
  • 1 <= quantity <= 10000 and 0 < price <= 10000, with at most 4 digits after the decimal point.
  • 0 <= rate_bps <= 100 and 0 <= minimum_fee <= 1000, each with at most 2 digits after the decimal point.
  • 0 <= per_unit_fee <= 10, 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
  • Trade Blotter Summary by TickerOA · Seen Jun 2021
  • Biggest Daily Move and Longest Rising StreakOA · ONSITE INTERVIEW · Seen Apr 2021
  • 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 Excel and VBA Test: 23 Experiences (Part 8 of 10)

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 TDO Phone Math Round: 26 Experiences (Part 9 of 10)
  • Jane Street TDOE UK Phone Screen: 15 Experiences (Part 4 of 10)
  • Jane Street TDOE UK Coding Round: 15 Experiences (Part 3 of 10)
All Jane Street interview questionsSee Jane Street hiring insights