🔐
Before you upload anything: here's how we store your portfolio data — encrypted, with no plaintext in the database.
Try free Read more
Privora 泊睿

Python Strategy Backtesting · Privora

Turn your Python strategy into an auditable backtest report, not a pile of local print statements

Backtests run locally with backtrader are hard to audit, hard to compare side by side, and don't connect directly to paper trading. Privora runs single-asset or multi-asset portfolio backtests against platform data, producing Sharpe ratio, Sortino ratio, max drawdown, and more — with trade-by-trade detail and the equity curve persisted for later review and comparison.

Privora process run history showing strategy execution and persisted results

What is Python strategy backtesting?

Python strategy backtesting means running your single-asset or multi-asset portfolio strategy against platform historical market data, automatically computing performance metrics like Sharpe ratio and max drawdown, and persisting trade-by-trade detail and the equity curve into a report you can audit and compare later — not a one-off console printout.

Why running backtests locally isn't enough

1

Local results aren't auditable

backtrader or a homegrown script produces a console printout or a local file — switch machines or hand it to someone else and the same result is gone.

2

You can't compare runs side by side

Without a consistent metric schema and storage, it's hard to line up this version's Sharpe and drawdown against the last version's.

3

Connecting to paper trading means rebuilding everything

Local backtesting and live paper trading are usually two separate codebases and data sources, so validating a strategy means manually porting it over again.

What Privora's backtesting provides

1

Backtest directly against platform data

Single-asset or multi-asset portfolio backtests reuse the platform's A-share / HK / gold / fund historical data directly — no need to maintain your own market-data cache.

2

8 performance metrics computed automatically

Total return, CAGR, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit factor, and trade count — all produced from a single run.

3

Trade-by-trade detail and the equity curve, fully persisted

Trade detail, the equity curve, parameters, and metrics are all stored, so you can pull up the full history of any run at any time — not just a final number.

4

Supports benchmark-relative return comparison

You can specify a benchmark asset to compute benchmark return, alpha, and beta, for assessing a strategy's excess return and sensitivity relative to a benchmark — this capability is implemented; whether it's populated depends on whether you configured a benchmark asset for that run.

Questions it can help you answer

  • What's this version's Sharpe ratio and max drawdown, exactly?
  • Did performance improve or get worse after this parameter change?
  • When was this position opened, and what triggered it?
  • Once a backtest passes, how do I move to paper trading?

How this differs from running backtrader locally

Results are persisted, not a one-off printout

Every run's metrics, trade detail, and equity curve are stored on the platform and can be pulled up any time — not lost the moment you close the terminal.

Compare across many runs

A consistent metric schema lets you line up backtest results across different parameters and strategy versions.

Move straight to paper trading once a backtest passes

A validated strategy can switch to MARKET / LIMIT paper trading on the same platform to keep validating against real market data, without rebuilding an execution environment.

Who this is for

People already writing Python strategies who need trustworthy results

For quant hobbyists who already know how to write strategy logic but are frustrated that local results can't be saved or shared.

People comparing multiple strategy versions

For people iterating on parameters who need to compare backtest performance across runs side by side.

People who want to validate live performance after a backtest passes

For people who want backtesting, paper trading, and real-time alerts strung into one workflow.

Common questions about Python strategy backtesting

What performance metrics does backtesting support?
Every run outputs 8 metrics — total return, CAGR, Sharpe ratio, Sortino ratio, max drawdown, win rate, profit factor, and trade count — all persisted and available to pull up at any time.
Can I see the individual trades in a backtest result?
Yes. Every run's trade-by-trade detail and equity curve are persisted, so you can review each trade's open/close timing — not just a summary number.
Can I compare a strategy's performance against a benchmark?
You can specify a benchmark asset to compute benchmark return, alpha, and beta, for assessing a strategy's excess return and sensitivity relative to a benchmark — this capability is implemented; whether it's computed depends on whether you configured a benchmark asset for that run.
Are backtesting and paper trading the same system?
Yes, the same platform. Once a strategy passes backtesting, you can switch directly to MARKET / LIMIT paper trading (scheduler-driven matching with price-limit and suspension detection) to keep validating against real market data, without rebuilding an execution environment.
Could a backtest affect my production data pipeline?
No. Backtests run in an isolated sandbox mode and never write to production scheduling, so you can experiment with parameters freely.

Ready to turn your strategy into an auditable backtest report?

Start by previewing a sample backtest report without registering, then sign in to run your own strategy against platform data.