~/talk

Simple Simulators with pandas and Generator Coroutines

Talkat PyData NYC 2023 · 2023-11-01..11-03· [python]
slides:none on file

Builds a backtester that actually runs in Python using plain pandas Series inputs/outputs and generator coroutines to model strategy and simulator loops. Implements an opaque market environment that prices and executes trades, tolerates arbitrary multi‑index “foreign data,” and avoids repeated concat by using list-of-series chunking. Claims moderate performance: typical five‑year low‑frequency backtests finish under a minute, and a prototype handles ~1M trades against ~100M pricing rows in ~2–3s.

AI-written summary · about

  1. 0:00Simple simulators intro
  2. 1:11Financial simulation with pandas
  3. 5:41Pandas Series for data
  4. 18:46Critique of price-volume modeling
  5. 21:10Trading environment class design
  6. 28:14Executing trades with pandas
  7. 35:42Portfolio construction
  8. 41:24Extending pandas with accessors
  9. 47:01Growing pandas structures
  10. 59:44Simulations with coroutines
  11. 1:07:29Coroutine modality issues
  12. 1:11:46Simulator loop implementation
  13. 1:19:52Performance and API design
  14. 1:21:15Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.