preprocessed_backtest#
API documentation for tradeexecutor.backtest.preprocessed_backtest Python module in Trading Strategy.
Module description#
Preprocessed datasets.
Generate preprocessed backtest histories with certain parameters
Generated sets are free from survivorship bias, by having inclusion criteria as historical TVL threshold
To export / update all exported data:
python tradeexecutor/backtest/preprocessed_backtest_exporter.py ~/exported
Run using Docker. Created files will be placed in ~/exported
in the host FS:
mkdir ~/exported
# Get from https://github.com/tradingstrategy-ai/trade-executor/actions
export TRADE_EXECUTOR_VERSION=latest
docker run -it --entrypoint /usr/local/bin/python --env TRADING_STRATEGY_API_KEY -v ~/exported:/exported -v ~/.cache:/root/.cache ghcr.io/tradingstrategy-ai/trade-executor:${TRADE_EXECUTOR_VERSION} /usr/src/trade-executor/tradeexecutor/backtest/preprocessed_backtest_exporter.py /exported
Classes#
Predefined backtesting dataset |
|
SavedDataset(set: tradeexecutor.backtest.preprocessed_backtest.BacktestDatasetDefinion, parquet_path: pathlib.Path, csv_path: pathlib.Path, parquet_file_size: int, csv_file_size: int, pair_count: int, row_count: int, duration: datetime.timedelta | None) |
Functions#
|
Generate a base symbol. |
|
Generate a base-quote ticker for a pair. |
|
Get TradingStrategy.ai explorer link for the trading data |
|
Generate a ticker for a pair with fee and DEX info. |
|
Prepare a predefined backtesting dataset. |
|