Skip to content

PriceGenerator 2.2.1

Latest

Choose a tag to compare

@Tim55667757 Tim55667757 released this 09 Nov 00:39
· 24 commits to master since this release
1b5e244

Alice at the PriceGenerator workstation, Fuzzy Technologies

PriceGenerator builds synthetic price histories for testing trading strategies under market conditions you choose. Set the starting price and candle interval, then choose how volatile prices are and how often sharp moves occur. Each candle records the open, high, low, close and volume. You can save the series as a CSV from the command line or use it as a pandas DataFrame in Python. For example, run a stop-loss rule through a volatile spell in your backtester. Keep the random seed to replay the exact candles that triggered an exit, or change it to test the same rule on a different price history.

Quick start · How candles are generated · Market experiments · Release notes

Python API reference · English · Русский · 简体中文

Open your first chart

python -m pip install pricegenerator==2.2.1
python -m pricegenerator generate --seed 42 --horizon 240 --output candles.csv
python -m pricegenerator chart candles.csv --analysis --output candles.html --view

Use the indicator buttons to turn on Bollinger bands or the 50- and 200-bar moving averages. Zoom in on a candle to see its price and whole-number synthetic volume. You can export the current candles and volume as a PNG. Imported market data keeps fractional asset quantities where the source uses them.

Candles and volume with Bollinger bands and moving averages

Explore several possible histories

Start 32 runs with the same model settings. At each hour, the three lines below show the lower, middle and upper closing prices (5th, 50th and 95th percentiles). The candles follow the first run. To test a strategy, feed the individual price paths into your own backtester.

One price path and closing-price percentiles across 32 runs

The default scenario starts at 100. To compare it with a named market, see the hourly Bitstamp BTC/USD experiment. All 16 fitted runs met the chosen tolerances for volatility and mean hourly BTC volume on the following month. The fitted volume stayed constant while exchange volume varied with the size of price moves.

PriceGenerator 2.2.1 on PyPI · Upgrade from 1.4.93 · Changes since 2.1