This is a verified interview question from Squarepoint. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Tick Sizes" covers key patterns like Other.
"NOTE : Same for all IITS ### 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. You are given a set of tick size raw data from an exchange for a particular trading instrument. ### Task #1 Trim down the tick size rules to a more human-readable set of rules by switching to just a lower bound format. This can be done by, - Identifying and removing duplicate price increment intervals. - Removing the upper bound of the tick size interval. ### Task #2 Use the tick size rules that you have generated to find the next possible incremental price of the trading instrument at specific prices. ### Function Description Complete the function tick_sizes in the editor below. tick_sizes has the following parameter(s): - raw_tick_sizes (List[double]): raw-wise representation of the tick size raw data from exchange - float prices (List[double]): specific prices of the trading instrument ### Returns (List[List[double]], List[double]): row-wise representation of the human-readable set of rules and next incremental prices of the trading instrument"
Join thousands of developers practicing for Squarepoint.