PriceGenerator 2.2.1

Package 2.2.1 on PyPI

PriceGenerator makes synthetic market candles for testing trading systems. In 2.2 you can put a historical series beside a generated one and see where they differ. You can also share a complete experiment so a colleague can reproduce the same candles, charts and comparison.

What changed since 2.1

How to read the chart

We ran the same scenario 32 times. The candles and volume bars show the first run. Each thin grey line follows one of the other 31 runs. The three coloured lines show how closing prices are distributed across all 32 runs at each hour.

Hourly candles and volume for path 00, 31 grey price paths and three coloured percentile lines.

Pick the last hour. Sort its 32 closing prices from lowest to highest. The purple line marks the middle at 101.27. The blue and yellow lines mark the lower and upper edges of the central 90% of the distribution, roughly 75.01 to 150.46 for that hour. At another hour, different runs can set those marks. The spread helps you see how far outcomes can vary under the same scenario settings.

See the 32 individual paths and download their OHLCV files.

Try it

With PriceGenerator 2.2.1 installed, generate 240 hourly candles and open the resulting HTML chart in your browser. The chart works offline.

python -m pip install pricegenerator==2.2.1
pricegenerator generate --seed 42 --horizon 240 --start 2025-01-06T00:00:00Z --timeframe-seconds 3600 --output candles.csv
pricegenerator chart candles.csv --output candles.html --analysis --view

Want indicator buttons? Rebuild the HTML from the same CSV with --analysis (or use Chart(prices, "chart.html", analysis=True) in Python). Open the HTML in your browser. Click Bollinger bands to see the price envelope, SMA 50 / 200 to compare moving averages, or Midpoint to mark the middle of each candle’s high–low range. Other groups include HMA, VWMA, PSAR, Alligator and Zig-Zag. Expand Individual series to toggle one line at a time. SMA 200 needs at least 200 candles.

Use the wheel or Box zoom to focus on an interval. Switch to Light theme if you prefer, or download the current view with Export PNG. The brief overview sits below the chart. Expand Detailed statistics for the full report.

Offline candlestick chart with volume, Bollinger Bands and 50- and 200-bar moving averages enabled

Run the full experiment · Compare two CSV files · Python API reference · Upgrade from 1.4.93

Русский · 简体中文