Skip to content

v1.9

Choose a tag to compare

@chrisli-kw chrisli-kw released this 26 Aug 07:45
· 338 commits to main since this release

Refactoring Backtest System

  1. Refactoring backtest framework and other related modules.
  2. Backtest results add MDD info.
  3. Backtester remove unused parameters.
  4. Fixed the problem of no futures backtest records.
  5. Optimize the backtest procedures and performance.
  6. Upgrade the way to load local datasets (before: merge all datasets to one single dataset; after: use multiple datasets for backtesting).
  7. Update backtest_sample.

Modules Updated

  1. KBarTool
    1.1. update history_kbars and other functions.
    1.2. remove _update_kbar_table().
    1.3. remove _update_K60().
    1.4. remove get_kbars().
    1.5. remove update_today_previous_kbar().
    1.6. KBarTool now supports kbar-2T table.

  2. Crawler
    2.1. export_kbar_data() with daily crawler will only save .pkl files (to save storage usage), the filenames are also refactored.
    2.2. Kbar tables delete columns: date, hour, minute.
    2.3. Kbar tables update data types (including futures table).
    2.4. Update modules that are related to kbar tables.
    2.5. Update the return data structure of crawlfromHTML DowJones.
    2.6. Stock crawler creates folder only when it starts (not when init).

  3. Performance
    3.1. Add candlestick to performance charts.
    3.2. Update chart layouts.
    3.3. Performance figures now can export either in HTML format or in image format.
    3.4. Add post image to the runPerformanceReport task.
    3.5. Refactored BacktestReport.

  4. Others
    4.1. Tasker add framework, users now can add more custom tasks to the AutoTradingPlatform.
    4.2. Update framework structure. The system automatically set scripts once initialize. Users can also set scripts after system init.
    4.3. Add kbar-related settings to config.py.
    4.4. Upgrade shioaji to 1.1.8 to apply the data usage feature.
    4.5. TimeTool add utcfromtimestamp_()
    4.6. To improve backtest performance, read_tables_in_folder now can filter data by setting start and end dates before reading files.

Bug Fixed

  1. Requirements add redis.
  2. Fix ca_passwd error when not set by default.
  3. Fix config error when settings left blank.
  4. Add task exceptions for running during holidays.
  5. update_position: the monitor target is not removed when the quantity <= 0
  6. Fixed reports.py bug when not trading records.
  7. other bugs fixed.