Learn / Library / Statistics
The cost of a look-ahead bug
Closing prices on consecutive days are , , , , . An honest rule is flat over the first move, then holds over a move if the previous move was up and if it was down. A buggy version uses the sign of the move it is about to hold, for all moves. By how much does the buggy total profit exceed the honest total profit? Ignore costs. Give a whole number.
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Write the moves first. The buggy rule earns the size of every move.
Solution
- The moves are , , , , so the buggy rule earns .
- The honest rule holds , , , , earning .
- The overstatement is .
Answer: