Closed kenorb closed 8 years ago
We need CLI script gen_bt_data.py which would generate artificial backtest data.
gen_bt_data.py
Output format in CSV (as shown in here).
Expected command-line parameters are:
[x] start_date end_date start_value end_value, e.g. to generate data for 2 days:
start_date end_date start_value end_value
./gen_bt_data.py 2014.01.01 2014.01.02 1.0 2.0
which would start from the specified value 1.0 and end with 2.0 (incrementing/decrementing the values accordingly)
1.0
2.0
-d
1.00000
-s
10
1.00010
-p
none
wave
curve
zigzag
random
-v
-o file
zigzag pattern:
We need CLI script
gen_bt_data.py
which would generate artificial backtest data.Output format in CSV (as shown in here).
Expected command-line parameters are:
[x]
start_date end_date start_value end_value
, e.g. to generate data for 2 days:which would start from the specified value
1.0
and end with2.0
(incrementing/decrementing the values accordingly)-d
for number of digits (default: 5, e.g.1.00000
)-s
for spread in points (the difference between buy and sell), default10
(1.00000
,1.00010
in case of 5 digits)-d
for density (how many changes) per minute (default: 1), 60 means every second, 120 every half a second-p
for patterns type (possible options: defaultnone
,wave
,curve
,zigzag
,random
)random
should be generated the same way each time-v
for sin/cos wave and other-o file
for output file, otherwise print to the standard outputPatterns
zigzag pattern:
wave
curve
-v
describe volatility/fury of random)