FastPrepQuote One Request
Problems/Quote One Request

Quote One Request

Millennium logoMillennium● EasyNEW GRADINTERNOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Millennium online assessment for new grad and intern roles. The report gives the size penalty, the quote that depends on side, and the rounding direction. It leaves out the tick rule, the range of numbers, and the output precision. We wrote the number range ourselves. Every decimal fits on a 10^-7 integer grid, and quotes are capped at 2 * 10^8. So converting to that grid, and returning a double with six places, is clear in all enabled languages.

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

Quote one client request around a reference price. First add a size penalty to the supplied half spread:

adjustedHalfSpread = halfSpread + penaltyPerUnit * quantity

For a BUY request, form the ask price reference + adjustedHalfSpread and round it upward to the next multiple of tickSize. For a SELL request, form the bid price reference - adjustedHalfSpread and round it downward to the next multiple of tickSize. A price already on a tick remains unchanged.

Every decimal input is exact and has at most seven digits after the decimal point. Return the tick-rounded quote rounded half upward to six decimal places.

Function

quoteOneRequest(reference: double, halfSpread: double, penaltyPerUnit: double, quantity: int, side: String, tickSize: double) → double

Examples

Example 1

reference = 100.0halfSpread = 0.05penaltyPerUnit = 0.0002quantity = 100side = "BUY"tickSize = 0.01return = 100.07

The adjusted half spread is 0.05 + 0.0002 * 100 = 0.07. The raw ask 100.07 is already on a 0.01 tick.

Example 2

reference = 100.0halfSpread = 0.05penaltyPerUnit = 0.0002quantity = 125side = "SELL"tickSize = 0.01return = 99.92

The adjusted half spread is 0.075, so the raw bid is 99.925. Rounding downward to a 0.01 tick gives 99.92.

Constraints

  • 0 < reference <= 2 * 10^8
  • 0 <= halfSpread <= 10^6
  • 0 <= penaltyPerUnit <= 10^3
  • 1 <= quantity <= 10^6
  • side is either BUY or SELL.
  • 10^-6 <= tickSize <= 10^3.
  • Each decimal input has at most seven digits after the decimal point.
  • The raw quote and the rounded quote are positive and at most 2 * 10^8.

More Millennium Online Assessment questions

  • Calculate the Half SpreadOA · Seen Sep 2026
  • Debug the Impact ModelOA · Seen Sep 2026
  • Debug the Risk-Limit QuoterOA · Seen Sep 2026
  • Hedge Inventory with Return CovarianceOA · Seen Sep 2026
  • Risk Limits and Inventory SkewOA · Seen Sep 2026
  • Track the Book and Mark Final PnLOA · Seen Sep 2026
  • Clean the TapeOA · Seen Sep 2026
  • Client Markout AnalysisOA · Seen Sep 2026
  • Debug Fair-Value LookupOA · Seen Sep 2026
  • Debug the Tape CleanerOA · Seen Sep 2026

Similar questions at other companies

  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Diagonal Bounce TraversalAutodesk · OAAutodesk interview questions
  • Costliest ChocolateRippling · OARippling interview questions
  • Distinct Chapters Missed During a Cyclic AbsenceVisa · OAVisa interview questions
  • Count Palindromic Base RepresentationsSEDEMAC · OA
  • Reduce a Number to One DigitAccenture · OAAccenture interview questions
  • Online No-Intercept Linear RegressionTwo Sigma · OATwo Sigma interview questions
  • Plus Mult ArrayIBM · OAIBM interview questions
  • Product Minus Sum of DigitsTikTok · OATikTok interview questions
  • Progressive Tax CalculatorInteractive Brokers · OA

Millennium interview experiences

  • Millennium Full Stack Engineer Java Interview: 1 Experience
All Millennium interview questionsSee Millennium hiring insights
Saved
class Solution {
    public double quoteOneRequest(double reference, double halfSpread, double penaltyPerUnit, int quantity, String side, double tickSize) {
        // write your code here
    }
}
Checking account…