-
Notifications
You must be signed in to change notification settings - Fork 45
backtest usage
Benny Thadikaran edited this page Mar 21, 2024
·
8 revisions
This tool allows you to scan for patterns within a specified date range and visualize the chart pattern with look-ahead and look-back periods for backtesting.
Ensure you have user.json with DATA_PATH
and SYM_LIST
set.
py backtest.py -p vcpu
Provide a custom watchlist of symbols as a CSV or TXT file. Default watchlist should be specified in user.json
py backtest.py -p hnsd --file symlist.csv
By default, scan period is 30 candles prior to end date.
By default, end date is 120 days from current date. (For intraday data, you may need to adjust this closer)
py backtest.py -p trng --date 2023-12-01 --period 120
Use -h to see help
usage: backtest.py [-h] [-f FILE] [-p str] [--plot PLOT] [--idx IDX] [-d DATE] [--period PERIOD]
Run backdated pattern scan
options:
-h, --help show this help message and exit
-f FILE, --file FILE Filepath with symbol list. One on each line
-p str, --pattern str
Pattern to test. One of vcpu, vcpd, dbot, dtop, hnsu, hnsd, trng
--plot PLOT Plot results from json file
--idx IDX Index to plot
-d DATE, --date DATE Ending date of scan. Defaults to 120 days back
--period PERIOD Scan Period, prior to ending date. Default 30