I just installed quantiacs for local devleopment using the instructions at https://github.com/quantiacs/toolbox?tab=readme-ov-file. I used pyenv not conda. I created a strategy.py by copying the example. When I run it I get an error as shown below. Any thoughts on what I am missing? I'm not experienced with python and im not sure how to troubleshoot this.
I am using ubuntu 22..04.3 under WSL on windows11.
During install I got a bunch of warnings like this
DEPRECATION: dash is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for dash ... done
I created a strategy.py file and ran it (as per the step 2 of the readme) and I get the following output
(qntdev) undrewb@LAPTOP-87ARNCG4:~/quantiacs$ python strategy.py
NOTICE: The environment variable DATA_BASE_URL was not specified. The default value is 'https://data-api.quantiacs.io/'
NOTICE: The environment variable CACHE_RETENTION was not specified. The default value is '7'
NOTICE: The environment variable CACHE_DIR was not specified. The default value is 'data-cache'
Run last pass...
Load data...
| | # | 9774919 Elapsed Time: 0:00:03
Run strategy...
Load data for cleanup...
Output cleaning...
fix uniq
Normalization...
Output cleaning is complete.
Write result...
NOTICE: The environment variable OUTPUT_PATH was not specified. The default value is 'fractions.nc.gz'
Write output: fractions.nc.gz
---
Run first pass...
Load data...
| | # | 8941163 Elapsed Time: 0:00:03
Run strategy...
---
Load full data...
---
Run iterations...
100% (521 of 521) |##################################| Elapsed Time: 0:00:02 Time: 0:00:02
Merge outputs...
Load data for cleanup and analysis...
Output cleaning...
fix uniq
ffill if the current price is None...
Check missed dates...
Ok.
Normalization...
Output cleaning is complete.
Write result...
NOTICE: The environment variable OUTPUT_PATH was not specified. The default value is 'fractions.nc.gz'
Write output: fractions.nc.gz
---
Analyze results...
Check...
Check missed dates...
Ok.
Check the sharpe ratio...
WARNING! There are not enough points in the data
The first point(2021-03-15) should be earlier than 2006-01-01
Load data more historical data.
WARNING! There are not enough points in the output.
The output series should start from 2006-01-01 or earlier instead of 2022-05-13
Period: 2021-03-15 - 2024-05-10
Sharpe Ratio = -0.4106872125669945
ERROR! The Sharpe Ratio is too low. -0.4106872125669945 < 0.7
Improve the strategy and make sure that the in-sample Sharpe Ratio more than 0.7.
---
Align...
Calc global stats...
---
Calc stats per asset...
---
Build plots...
ERROR:root:can't start dash
Traceback (most recent call last):
File "/home/undrewb/.pyenv/versions/qntdev/lib/python3.10/site-packages/qnt/backtester.py", line 520, in build_plots_dash
import dash
File "/home/undrewb/.pyenv/versions/qntdev/lib/python3.10/site-packages/dash/__init__.py", line 5, in <module>
from .dash import Dash, no_update # noqa: F401,E402
File "/home/undrewb/.pyenv/versions/qntdev/lib/python3.10/site-packages/dash/dash.py", line 22, in <module>
from werkzeug.debug.tbtools import get_current_traceback
ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools' (/home/undrewb/.pyenv/versions/qntdev/lib/python3.10/site-packages/werkzeug/debug/tbtools.py)