This is a verified interview question from Squarepoint-capital. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Tick Sizes - Squarepoint Capital" covers key patterns like Other.
"Tick size is the minimum price change up or down of a trading instrument in a market. You are given a set of tick size raw data from an exchange for a particular trading instrument. ### Problem The tick size raw data gives a price band for which a minimum price increment needs to be adhered to for the instrument. The price of an instrument cannot go up or down in smaller increments than its stated tick size. For example, if an instrument last traded at $0.30, the next price up is $0.32 - you cannot sell it for $0.31 as the tick size at that price band is $0.02. Another example is that if you would like to buy this instrument at a slightly higher price than $1.00, you can only submit a bid at $2.00 as the tick size at that price band is $1.00. The last line in the tick size raw data stipulates the hypothetical maximum price of the trading instrument (i.e., you cannot ever trade above that price). ### Input - `raw_ticksizes`: A list of lists, where each sublist contains three elements: `start_price`, `end_price`, and `minimum_price_increment`. - `prices`: A list of prices of the trading instrument. ### Output - A list of lists, where each sublist contains two elements: the price and the next incremental price of the trading instrument. ### Constraints - The input `raw_ticksizes` will always be sorted in order of increasing start price. - The input `prices` will always be at the correct tick size intervals. - Tick sizes will at most have 2 decimal places. - Input prices will only be 1.0, 2.0, 3.0, 4.0 and 5.0."
Join thousands of developers practicing for Squarepoint-capital.