feat(Core): ensemble models, correct forward returns calculation, scaling, only train from when asset returns are available, major bug fixed in walk_forward_train_test (#35)

* fix(Core): correct forward returns calculation, classifiers are now working again, only train from when asset returns are available

* feat(Utils): added get_first_valid_return_index()

* feat(Ensemble): return models from `run_whole_pipeline`

* feat(Ensemble): added ensemble step, fixed walk_forward_train_test predictions index confusion,

* chore(Pipeline): remove unnecessary extra ensemble results dataframe

* refactor(Core): removed unnecessary ensemble_train_predict, moved run_single_asset_trainig_pipeline to a separate file

* feat(Training): added scaling on expanding window (the past) to walk_forward_train_test(), now printing out mean sharpe ratio

* feat(CI): added environment.yml file

* chore(Environment): update env.yml

* feat(CI): added testing workflow

* fix(CI): renamed enviroment.yml

* fix(Tests): added missing new parameter to walk_forward_train_test()
This commit is contained in:
Mark Aron Szulyovszky
2021-12-17 14:32:17 +01:00
committed by GitHub
parent 1eaba0c221
commit cc7061b456
12 changed files with 385 additions and 195 deletions
+42
View File
@@ -0,0 +1,42 @@
name: run-test
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}
# env:
# WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
run: |
pytest --junit-xml pytest.xml
- 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: |
# # Post reports as comments in GitHub PRs
# # cat results.txt >> report.md
# # cml-send-comment report.md