Real prices are random numbers with memory, so an EMA of noise plus a cumulative sum makes a passable synthetic chart. Generate thousands to put error bars on a backtest, but never to prove edge.
Fixed-lag cross-correlation assumes the delay between two markets never moves. It does. Dynamic time warping aligns two series with a stretchable path, scoring shape similarity and recovering a lead-lag that varies through time.
Profiling a slow algo points at JSON decode, not your alpha. Put the simple hot path (decode, filter, forward) in Rust and keep the complex stateful brain (OMS, reporting, unwinding) in Python. Split at the JSON, forward binary, and match your backtest exactly.