Periscøpe
// Field note

Why your Python script worked in research but broke in live trading

The script didn't change. The world did. A short tour of why research code falls over the moment it meets a live market, and what that tells you.

June 19, 2026

You had a Python script that worked. It loaded your data, ran your logic, produced a clean backtest, and made sense every time you ran it. Then you pointed it at a live market, and it did something stupid almost immediately. The script didn’t change. So what did?

The world did. And your script was quietly assuming the world would hold still.

In research, you control everything

Running a script over historical data, you are god of that little universe. The data is complete and sits in a file. Time moves when you say so. There’s no broker to disagree with you, no order that might get rejected, no position from yesterday, no holiday you forgot about. Your script never had to handle any of that, because none of it existed.

Live, you control almost nothing

Point the same code at a live market and every absent thing shows up at once:

  • Data arrives in real time, with gaps, late prints, and latency. Your code assumed it was all just there.
  • Orders can be rejected or partially filled. Your code assumed an order was a fill.
  • The broker has opinions about your buying power and positions, and the broker wins. Your code assumed its own memory was the truth.
  • The clock is real. A holiday, an early close, a daylight-saving shift, none of which your script ever met in a tidy data file.

The script didn’t break because it was wrong. It broke because every assumption that was free in research now costs something.

What this is actually telling you

The lesson isn’t “you’re a bad programmer.” It’s that research code and a trading system are different artifacts, and the difference is exactly the set of things the live world forces on you: real-time data, order state, broker truth, the calendar, monitoring.

You can close that gap two ways. Build all of it yourself, carefully, and then maintain it, or run your strategy somewhere that already handles it, so the same Python logic meets the live world through infrastructure that expects the world to misbehave. Either way, the fix isn’t a smarter script. It’s admitting the script was never the system.

Related
// Access

Run one strategy through Periscøpe.

We onboard in focused cohorts. Tell us what you trade and how you work. Live access is rolled out to select users on request.

We only use your email to contact you about access.

Read the docs →