Why does timing matter?
Separate noticing a price from acting on it.
The idea
A program does not receive information and act at exactly the same moment.
There is time between a market update, your program reading it, a decision, and an order reaching a venue. That delay is often called latency.
A small example
Imagine this sequence:
- A seller offers one unit at 101.
- Your program receives that update.
- Another buyer takes the unit.
- Your program tries to buy.
The offer at 101 may no longer be available. A test that automatically gives the program that old price would be making an assumption.
Try it
Draw four boxes: update → receive → decide → act.
Mark where the program first knows the price. Then mark where a fill could happen.
Check your answer
The program first knows the price when it receives the update. A fill comes later, if the order can execute.
For our first project, we will keep these steps separate and make the paper-fill assumptions visible. Next, you will build the simple measurement the program uses.