ParlayAPI Field Guides

Replaying a decision

For analysts rebuilding a past decision from a log. All six source messages in the replay are fictional.

Would your backtest give the analyst 2.10 too soon?

At 14:00:04 the analyst had seen 1.90. The 2.10 update carried an earlier source timestamp but arrived two seconds later. Try the cutoff that separates those answers.

At 14:00:04 the known price was 1.90. The 2.10 update stamped 14:00:03 arrived at 14:00:06.

Replay 14:00:04 in R

The last message in the queue can be older

At 14:00:07 a late packet carries 1.85. A fresher source update already put the home price at 2.10. Run both selection rules on the same six messages and compare their answers.

Compare the two rules

Ask the room what to print at 14:00:09

Give everyone the six-message log. Have them write down a price or a state before revealing the withdrawal. Then advance to 14:00:11 and see who can explain why a price returns.

Open the six-message lesson

What should a replay do when two updates disagree?

Give two observations the same source timestamp and different prices. The test file includes this tie and checks that the result carries a conflict state and an unknown price.

Inspect the replay tests

Try all six deadlines in your browser

Start before the first observation arrives. Move through the six cutoffs and write down the first moment you can use 2.10. Compare your answer with the receipt time in the log.

Launch the replay from the tutorial

Can I calculate a parlay return from two historical singles?

In the fictional replay, both legs won. Their separate decimal prices multiply to 3.42, but the book accepted the ticket at 3.20. A $10 winning ticket returned $32 including stake. Another case moves the decision time five seconds before a quote reached the desk.

Run the six ticket cases and inspect the missing prices.

Replay a local CSV at a millisecond cutoff

Download the base-R log reader. In the kit’s separate fictional example, North receives the 2.10 update at 14:00:06.050 UTC. Run the two commands in the extracted directory. Watch only North’s Harbor Owls row. South’s price belongs to a different book.

Rscript replay-log.R example-log.csv 2026-10-01T14:00:06.049Z
Rscript replay-log.R example-log.csv 2026-10-01T14:00:06.050Z

The first snapshot shows 1.90. The second shows 2.10. The CSV format guide explains how to repeat the check on your own log and interpret a withdrawal or conflict.

Ready to record updates from your own account? Create a ParlayAPI account.

All six field guides