Skip to content

ENH: lib: Add deflated_sharpe_ratio() to judge optimize() results #932

ENH: lib: Add deflated_sharpe_ratio() to judge optimize() results

ENH: lib: Add deflated_sharpe_ratio() to judge optimize() results #932

Workflow file for this run

name: CI
on:
push: { branches: [master] }
pull_request: { branches: [master] }
schedule: [ cron: '2 2 1 * *' ]
env:
TQDM_DISABLE: 1
PYTHONWARNINGS: always::FutureWarning,always::DeprecationWarning
BOKEH_BROWSER: none
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- run: pip install flake8 mypy
- run: flake8 backtesting setup.py
- run: mypy --no-warn-unused-ignores backtesting
coverage:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 4
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.11'
- run: pip install -U --pre bokeh pandas numpy coverage && pip install -U .[test]
- run: time coverage run -m backtesting.test
- run: coverage combine && coverage report
build:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 3
strategy:
matrix:
python-version: [3.12]
experimental: [false]
include:
- python-version: '3.*'
experimental: true
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- run: pip install -U .[test]
- run: time python -m backtesting.test
deps_prereleases:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 3
continue-on-error: true
steps:
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: 3.13
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- run: pip install --pre -U .[test]
- run: time python -m backtesting.test
docs:
needs: lint
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
fetch-depth: 3
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- run: pip install -e .[doc,test] # -e provides ./backtesting/_version.py for pdoc
- run: time doc/build.sh
win64:
needs:
- build
- docs
runs-on: windows-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: 3.14
- run: pip install .[test]
- run: python -m backtesting.test
workflow-keepalive:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: liskin/gh-workflow-keepalive@f72ff1a1336129f29bf0166c0fd0ca6cf1bcb38c # v1.2.1