# From Python to Rust (/tutorials/from-python-to-rust)

[Members-only tutorial](https://members.vectorbt.pro/tutorials/from-python-to-rust/)

Backtesting code often grows up with its strategy. It starts as a few lines in a notebook, and it
can end up as a service with no Python in it at all. This three-part tutorial takes one
volatility-squeeze breakout along that path. The data and the rules never change, so the only
difference between the versions is how they are written.

✅ Learn how to write the same strategy four times, from short research code down to a standalone
program that runs without Python. All four are then checked against each other, order for order.

✅ Some rules cannot be prepared in advance, because they depend on what the strategy just did.
Learn where a rule like that belongs, and see it produce the one result in this tutorial that could
not have been worked out before the simulation ran.

✅ Finally, learn how to carry one portfolio forward as new bars arrive, instead of rerunning the
whole backtest each time, and how a Rust process picks up where it left off after a
restart 🔄

*   [Static simulation](https://members.vectorbt.pro/tutorials/from-python-to-rust/static): Learn how to backtest the same strategy with high-level VBT, Numba, PyO3 Rust, and native Rust
*   [Dynamic simulation](https://members.vectorbt.pro/tutorials/from-python-to-rust/dynamic): Learn how to implement stateful portfolio callbacks and stream the same strategy in native Rust
*   [Live simulation](https://members.vectorbt.pro/tutorials/from-python-to-rust/live): Learn how to continue a path-dependent simulation as new bars arrive and preserve it across restarts
