mirror of
https://github.com/webclinic017/drift.git
synced 2026-07-28 11:17:47 +00:00
2c03959315
* feat(Reporting): added vectorbt-based backtest * fix(Reporting): added transaction costs * feat(Reporting): added ability to rebalance only every n days * feat(Dependencies): added pytorch * fix(Dependencies): added pytorch-lightning * feat(CI): added portfolio reporting step * feat(Reporting): save weights as well * fix(Reporting): start with less cash
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: run test and pipeline
|
|
on: [push]
|
|
jobs:
|
|
run:
|
|
runs-on: [ubuntu-latest]
|
|
# optionally use a convenient Ubuntu LTS + CUDA + DVC + CML image
|
|
# container: docker://dvcorg/cml:0-dvc2-base1-gpu
|
|
# container: docker://ghcr.io/iterative/cml:0-dvc2-base1-gpu
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: conda-incubator/setup-miniconda@v2
|
|
with:
|
|
auto-update-conda: false
|
|
activate-environment: quant
|
|
environment-file: environment.yml
|
|
python-version: 3.9
|
|
- uses: iterative/setup-cml@v1
|
|
- name: Run pytest
|
|
shell: bash -l {0}
|
|
run: |
|
|
pytest --junit-xml pytest.xml
|
|
- name: Run pipeline
|
|
shell: bash -l {0}
|
|
run: |
|
|
python run_pipeline.py
|
|
- name: Run portfolio reporting
|
|
shell: bash -l {0}
|
|
run: |
|
|
python run_portfolio_reporting.py
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: artifacts
|
|
path: output
|
|
- name: Upload Unit Test Results
|
|
if: always()
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: Unit Test Results (Python ${{ matrix.python-version }})
|
|
path: pytest.xml
|
|
- name: Publish Unit Test Results
|
|
uses: EnricoMi/publish-unit-test-result-action@v1
|
|
if: always()
|
|
with:
|
|
files: pytest.xml
|
|
|
|
- name: Write CML report
|
|
env:
|
|
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
cat output/results_level2.csv >> report.md
|
|
cml-send-comment report.md
|