Using Python

How to set up your Python backtest to get the most from the Strategy Cruncher
Published Jun 1, 2025 | Python

If you write your own backtests in Python, have your backtest write its trades to a CSV file in the Generic CSV Format.

The format needs one row per trade with a few required fields, like the entry time, symbol and profit. Every column you want the Cruncher to search goes in with a name starting with entry_collect., like entry_collect.gap_percent.

Only add columns that are known when the trade is entered. A column measured after entry knows how the trade turned out and will win every split.