enzoampil / fastquant

fastquant — Backtest and optimize your ML trading strategies with only 3 lines of code!
MIT License
1.54k stars 239 forks source link

fix script import bug & update pse data cache #399

Closed jpdeleon closed 2 years ago

jpdeleon commented 2 years ago

resolves #366

Description

This fixes the issue by running the script update_data_cache i.e. update cache is committed. The import bug in update pse_data_cache is also fixed.

Checklist

jpdeleon commented 2 years ago

I cannot reproduce the CI build failure below.

I ran pytest in new conda environment with python 3.8 the test succeeded:

(py38) $ pytest test_fastquant.py
============================= test session starts ==============================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /media/jerome/20BA47B9BA4789EC/github/research/quant/fastquant
collected 5 items                                                              

test_fastquant.py .....                                                  [100%]

============================== 5 passed in 21.82s ==============================
mikeejazmines commented 2 years ago

I cannot reproduce the CI build failure below.

I ran pytest in new conda environment with python 3.8 the test succeeded:

(py38) $ pytest test_fastquant.py
============================= test session starts ==============================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /media/jerome/20BA47B9BA4789EC/github/research/quant/fastquant
collected 5 items                                                              

test_fastquant.py .....                                                  [100%]

============================== 5 passed in 21.82s ==============================

This issue is actually due to kucoin

self = ccxt.kucoin(), http_status_code = 429
http_status_text = 'Too Many Requests'
url = 'https://openapi-v2.kucoin.com/api/v1/market/candles?symbol=BTC-USDT&type=1day&startAt=1514764800&endAt=1644364800'

I'll try review the changes, and try rerunning the tests again! Thanks for the PR :)