Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: microprediction/precise
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.2
Choose a base ref
...
head repository: microprediction/precise
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing 757 changed files with 33,522 additions and 758 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
python-version: ["3.10","3.11"]

steps:
- uses: actions/checkout@v2
41 changes: 41 additions & 0 deletions .github/workflows/tests_312.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

name: tests_312

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install flake8 pytest setuptools
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install test dependecies
run: |
pip install -e .[test]
- name: Test with pytest
run: |
pytest
45 changes: 45 additions & 0 deletions .github/workflows/tests_sans_ppo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: tests-sans-ppo
# This is a basic workflow to help you get started with Actions

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10","3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install scipy
python -m pip uninstall pyportfolioopt -y
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Install test dependecies
run: |
pip install -e .[test]
- name: Test with pytest
run: |
pytest
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -127,3 +127,8 @@ dmypy.json

# Pyre type checker
.pyre/


private_examples
private_examples/*.py
private_examples/*.csv
16 changes: 16 additions & 0 deletions COMMENTARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

By topic

On rebalancing frequency:

- [What does rebalancing really achieve?](https://www.semanticscholar.org/paper/What-Does-Rebalancing-Really-Achieve-Cuthbertson-Hayley/ccceb3d3dd5ba2c88394b72559f5485998c7e0cf) <-- Good lit survey
- [Measuring volatility pumping benefits in equity markets](https://risk.edhec.edu/sites/risk/files/measuring-volatility-pumping-benefits-in-equity-markets.pdf)
- [Chasing down the rebalancing premium](https://www.soa.org/globalassets/assets/library/newsletters/risks-and-rewards/2020/september/rr-2020-09-glacy.pdf)
- [Is Portfolio rebalancing good for investors?](https://core.ac.uk/download/pdf/84873313.pdf)
- [Will my risk parity portfolio outperform](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2101898)
- [Why regular rebalancing is key to maximizing factor premiums](https://advisors.vanguard.com/insights/article/whyregularrebalancingiskeytomaximizingfactorpremiums#:~:text=By%20breaking%20the%20returns%20down,monthly%20or%20bi%2Dannual%20rebalancing.)
- [The rebalancing premium](http://www.efficientfrontier.com/ef/996/rebal.htm)
- [Daily versus monthly...](https://www.bogleheads.org/forum/viewtopic.php?t=63189)
- [Estimating rebalancing premium in cryptocurrencies](https://quantpedia.com/estimating-rebalancing-premium-in-cryptocurrencies/)
- [An in-depth look at portfolio rebalancing strategies](https://cpb-us-w2.wpmucdn.com/sites.udel.edu/dist/a/855/files/2020/08/Rebalancing-Strategies.pdf)
- [Portfolio rebalancing: Hype or Hope?](https://journals.uvu.edu/index.php/jbi/article/download/90/70/)
9 changes: 9 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
You can help create Elo ratings as follows:

git clone https://github.com/microprediction/precise.git
cd precise
pip install -e .
python3 precise/skatervaluation/battlescripts/manager_var/stocks\?topic=stocks\&n_dim=int:500\&n_obs=int:225\&n_burn=int:200\&k=int:5.py

This should start to populate a new file which you can PR. It will go in [here](https://github.com/microprediction/precise/tree/main/precise/skatervaluation/battleresults/manager_var/stocks_5_days_p500_n200)

9 changes: 6 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
MIT License
Buy Me Beers License

Copyright (c) 2021 Peter Cotton

Permission is hereby granted, free of charge, to any person obtaining a copy
Begrudging permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
copies or substantial portions of the Software, I suppose.

However, should you win a prize in the M6 Financial Forecasting competition then
you are obligated to buy me a beer.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87 changes: 87 additions & 0 deletions LISTING_OF_COV_SKATERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
| covariance skater | location |
|-----|-----|
| buf_emp_pcov_d0_n20 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufemp.py |
| buf_emp_pcov_d0_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufemp.py |
| buf_emp_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufemp.py |
| run_emp_pcov_d0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/runemp.py |
| buf_sk_emp_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_lw_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_lw_pcov_d0_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_lw_pcov_d0_n300 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_gl_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_gl_pcov_d0_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d0_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d0_n300 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d0_n100_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d0_n200_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_lars_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_lars_d0_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_lars_d0_n300 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_mcd_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_oas_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_oas_pcov_d0_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_oas_pcov_d0_n300 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| ewa_emp_pcov_d0_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d0_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d0_r05 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d0_r10 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| buf_huber_pcov_d0_a1_b2_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a05_b2_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a1_b5_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a1_b2_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a05_b2_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a1_b5_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a1_b2_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a05_b2_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d0_a1_b5_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| ewa_pm_emp_scov_r01_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r01_n200 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r02_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r02_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r05_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r05_n25 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r01_n100_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r01_n200_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r02_n100_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r02_n50_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r05_n50_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_pm_emp_scov_r05_n25_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewapm.py |
| ewa_lw_scov_d0_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalw.py |
| ewa_lw_scov_d0_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalw.py |
| ewa_lz_scov_d0_r010_l010_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalz.py |
| ewa_lz_scov_d0_r005_l010_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalz.py |
| ewa_lz_scov_d0_r005_l020_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalz.py |
| weak_ewa_emp_pcov_d0_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_ewa_emp_pcov_d1_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_ewa_emp_pcov_d1_r05 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_ewa_lw_scov_d0_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_ewa_lw_scov_d0_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_ewa_lw_scov_d0_r05 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakewa.py |
| weak_pm_ewa_scov_r02_n100_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakpm.py |
| weak_pm_ewa_scov_r05_n50_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakpm.py |
| weak_lz_scov_d0_r010_l010_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weaklz.py |
| weak_lz_scov_d0_r005_l020_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weaklz.py |
| weak_sk_oas_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weaksk.py |
| weak_sk_lw_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weaksk.py |
| weak_sk_mcd_pcov_d0_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weaksk.py |
| avg_top_weakewa_ewalw_weakpm | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/avgtop.py |
| weak_boot_ewa_pm | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakboot.py |
| weak_boot_pm_ewa_scov_r05_n50_t0 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/weakboot.py |
| buf_emp_pcov_d1_n20 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufemp.py |
| buf_emp_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufemp.py |
| run_emp_pcov_d1 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/runemp.py |
| buf_sk_ec_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_lw_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_gl_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_glcv_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_mcd_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| buf_sk_oas_pcov_d1_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufsk.py |
| ewa_emp_pcov_d1_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d1_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d1_r05 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| ewa_emp_pcov_d1_r10 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewaemp.py |
| buf_huber_pcov_d1_a1_b2_n50 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| buf_huber_pcov_d1_a1_b2_n100 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/bufhuber.py |
| ewa_lw_scov_d1_r01 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalw.py |
| ewa_lw_scov_d1_r02 | https://github.com/microprediction/precise/blob/main/precise/skaters/covariance/ewalw.py |
Loading