The Interview Book · Careers
8Mental Arithmetic
Across the desk: “Seven per cent of 340 million, spread over 250 trading days, per day?” The answer, about 95 thousand, comes back in five seconds from the candidate who turned seven per cent over 250 days into 2.8 basis points a day, and 2.8 basis points of 340 million into 340 times 280; the one who started long multiplication in her head is still carrying digits. Speed in arithmetic is not a talent for carrying digits; it is a small set of rewrites that turn a hard calculation into an easy one, practised until they are automatic, and a habit of checking the result.
8.1 Products and squares
Most fast products use one of four rewrites. Each replaces a multiplication by one that is done in a step.
Method 8.1 (Four rewrites for products)
- Difference of squares: when the factors are equally spaced around a round number: .
- Near a hundred: , valid for negative too: .
- Squares ending in 5: : .
- Friendly factors: multiply by 25 as by 100 then divide by 4, by 125 as by 1000 then divide by 8, by 5 as by 10 then halve: .
A product of two numbers that fit none of these is split: . The choice of split is the skill: subtract from the nearest round number rather than add partial products.
8.2 Fractions, percentages and reciprocals
Desk arithmetic is mostly percentages of large numbers and conversions between rates. Three facts make it fast. A percentage is symmetric: of equals of , so 18% of 50 is 50% of 18, which is 9. A basis point is , so a rate in basis points times a notional in millions is a number of hundreds of currency units: 2.8 basis points of 340 million is . And a small table of reciprocals turns every division by a small integer into a multiplication.
| 6 | 7 | 8 | 9 | 11 | 12 | 13 | 16 | 17 | |
| 0.1667 | 0.1429 | 0.125 | 0.1111 | 0.0909 | 0.0833 | 0.0769 | 0.0625 | 0.0588 |
8.3 Roots, logarithms and compounding
A square root near a known square is linear to first order: , with an error below for . , against the true 10.1489. For logarithms, three values and one series cover most questions: , , , and for small .
Definition 8.2 (Rule of 72)
The rule of 72 approximates the number of periods an amount takes to double at a rate of per cent a period, compounded once a period, by . The exact doubling time is .
Proposition 8.3 (Where the rule of 72 is exact)
The rule of 72 is exact at a rate of about 7.85%, overestimates the doubling time below it and underestimates above it. The rule of 70 is exact near 2%. The rule of 69.3 is exact for continuously compounded rates () and always underestimates for rates compounded once a period.
Proof. for , so , which is the last statement. The numerator 72 exceeds to compensate for ; the two effects balance where , solved numerically at , and the relative error is monotone in (Figure 8.1). ∎
fig_iv_rule72.py.Example 8.4 (Compounding by logarithms)
, and , so the exponent is about 0.2955 and the result about .
8.4 Checking an answer
A fast answer is useful only if it is checked as fast. Three checks cost a second each: the order of magnitude (count the digits, or compare with a round product), the last digit (it is the last digit of the product of the last digits), and the residue modulo 9.
Definition 8.5 (Casting out nines)
Casting out nines checks an integer calculation by replacing each number with the remainder of its digit sum on division by 9, which is the number’s residue modulo 9, and checking that the calculation holds for the residues.
A product passes if the residues of the factors multiply to the residue of the result: has digit sum 19, residue 1. The check fails to see errors that change the result by a multiple of 9, including the commonest slip, the transposition of two digits (Interview question 8.9): a passed check is evidence, a failed check is proof.
8.5 Worked answers
Example 8.6 (A P&L in mixed units)
“You bought 1 250 contracts; each tick is worth 12.50; the market moved three ticks in your favour. What did you make?” Both factors are eighths of powers of ten: and , so , and three ticks make . Check: the answer lies between and , and closer to the top because both factors were rounded down by more than they were rounded up. Saying the bounds takes three seconds and catches a slipped zero.
Example 8.7 (Fees on a fund’s return)
“A fund charges 2% of starting assets and 20% of the gain above that fee. It made 12% before fees. What did the investor make, and what gross return would net 10%?” On 100: the fee takes 2, leaving a gain of 10, of which 20% is 2, so the investor nets 8%. In general the net is for a gross gain of per 100, so netting 10 needs : a gross return of 14.5%. Check: at the investor nets zero and the fund keeps everything, which is what the formula says. Fee structures differ in the order of the two fees and in hurdles; state the one assumed.
Example 8.8 (From a monthly to a yearly return)
“A strategy returns 1.5% a month. What is that compounded over a year?” Take logarithms: ; twelve months give ; then , so about 19.6% a year, against 18% for the simple sum. The exact value is to five decimals. Check: compounding must add something to , and the excess, about , matches the first cross term.
8.6 Question bank
Interview question 8.1 ★ trader • market maker
.
Solution
Solution of Interview question 8.1.
.
What the interviewer is looking for: spotting the difference of squares at once.
Interview question 8.2 ★ trader • market maker
and .
Solution
Solution of Interview question 8.2.
. .
What the interviewer is looking for: the near-hundred rewrite, including negative offsets.
Interview question 8.3 ★ trader, risk • proprietary firm
, and without writing anything, .
Solution
Solution of Interview question 8.3.
. .
What the interviewer is looking for: the squares-ending-in-5 rule and factoring a difference of squares rather than computing both.
Interview question 8.4 ★ trader, bank • bank
12.5% of 360, then 36% of 25.
Solution
Solution of Interview question 8.4.
12.5% is : . 36% of 25 is 25% of 36: 9.
What the interviewer is looking for: percentages as fractions, and the symmetry of a percentage.
Interview question 8.5 ★ trader, researcher • any
and as decimals to three places.
Solution
Solution of Interview question 8.5.
. .
What the interviewer is looking for: a reciprocal table used as multiplication.
Interview question 8.6 ★★ researcher, trader • any
to four decimal places, with a bound on your error.
Solution
Solution of Interview question 8.6.
, with error below ; the true value is , so the estimate is high, inside the bound. (A second-order term, , corrects it to .)
What the interviewer is looking for: linearisation around a known square and a stated error bound.
Interview question 8.7 ★★ trader, bank • bank
By the rule of 72, how long does money take to double at 1%, 6% and 24% a year? Which of the three answers is furthest from the exact value, and in which direction?
Solution
Solution of Interview question 8.7.
The rule gives 72, 12 and 3 years; the exact values are 69.7, 11.9 and 3.22. The 24% answer is furthest in relative terms (about 7% short); the 1% answer is about 3.4% long. The rule overestimates below about 7.85% and underestimates above it (Proposition 8.3).
What the interviewer is looking for: the rule, the exact formula, and knowing the direction of the error.
Interview question 8.8 ★★ trader • market maker
A strategy earns 3.2 basis points on a daily turnover of 250 million. What does it earn a day, and in a year of 252 trading days?
Solution
Solution of Interview question 8.8.
3.2 basis points of 250 million is a day; over 252 days, million.
What the interviewer is looking for: basis points of millions as hundreds, and a clean multiplication by 252 ().
Interview question 8.9 ★★ trader, developer • proprietary firm
Check by casting out nines. A colleague wrote ; does it pass? What does this tell you about the check?
Solution
Solution of Interview question 8.9.
Residues: , , product residue 8; : it passes, and it is right. has the same digits, so the same residue: it passes too, and it is wrong. Casting out nines cannot see a transposition or any error by a multiple of 9; add the last-digit check ( ends in 3, which both pass) and a magnitude check, or recompute one partial product.
What the interviewer is looking for: the check and, more important, its blind spot.
Interview question 8.10 ★★ trader, risk • any
A price rises 20% then falls 20%. Where is it relative to its start? What fall, after a 25% rise, brings it back exactly?
Solution
Solution of Interview question 8.10.
: 4% below the start. After a 25% rise the price is of the start, so a fall of , 20%, brings it back: .
What the interviewer is looking for: multiplicative returns and the asymmetry of percentage moves.
Interview question 8.11 ★★★ trader, bank • bank
to four decimal places without a calculator, and from it the exact doubling time at 7% a year to two decimals.
Solution
Solution of Interview question 8.11.
(to four decimals; the exact value is ). The doubling time is years, against 10.29 from the rule of 72.
What the interviewer is looking for: three terms of the series and a clean division.
Interview question 8.12 ★★★ trader, researcher • market maker
to three decimal places.
Solution
Solution of Interview question 8.12.
; (exactly ).
What the interviewer is looking for: compounding through logarithms, with known or derived.
Interview question 8.13 ★★★ trader • market maker
, in under ten seconds. Say the rewrite you used.
Solution
Solution of Interview question 8.13.
and (125 is , and ), so the product is .
What the interviewer is looking for: recognising friendly factors before multiplying.
Interview question 8.14 ★★★ researcher, bank • any
Explain why the rule of 72 uses 72 rather than 69.3, and estimate the rate at which it is exact. Which rule would you use for continuously compounded rates?
Solution
Solution of Interview question 8.14.
For annual compounding the exact doubling time is and , so is always too short; a larger numerator compensates, and 72 also has many divisors (2, 3, 4, 6, 8, 9, 12). The rule is exact where , about : near the rates at which it is usually applied. For continuous compounding, is exact, so the rule of 69.3.
What the interviewer is looking for: the source of the rule’s error and why its constant is a compromise.
Sources and further reading
- The rules of the chapter are elementary; the error bound of the linearised square root is the Lagrange remainder of the Taylor series.
- One Quant Book 1, chapter 7 (carry and P&L arithmetic); One Quant Book 2, chapter 3 (compounding conventions).