Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM Dynamic - Error Fetching historical candles #203

Open
rapcmia opened this issue Nov 20, 2024 · 1 comment
Open

PMM Dynamic - Error Fetching historical candles #203

rapcmia opened this issue Nov 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rapcmia
Copy link
Contributor

rapcmia commented Nov 20, 2024

Describe the bug

One of our community reported that he was getting an IndexError: index 0 is out of bounds for axis 0 with size 0 when running backtests for PMM dynamic using bybit as connector

image
image

Config

  • Use bybit as connector and candles feed for PMM dynamic controller
  • Setup total amount around 10000
  • Reduce the days to visualize from 7 to 3 so we can run the backtest
  • Setup default 2 order levels
  • Intialize backtesting using 1m, 5m and 15m on backtesting resolution
  • Run tests on different connectors only returns error in Bybit ❌
    • Run tests on binance, okx and kucoin. All working ok ✅

Steps to reproduce bug

  1. Setup deploy and use bybit as connector and candles data feed for PMM Dynamic controller-config
  2. Review the config on the ticket description and run backtest for the controller
@rapcmia rapcmia added the bug Something isn't working label Nov 20, 2024
@rapcmia
Copy link
Contributor Author

rapcmia commented Nov 20, 2024

Reproduce:

  • Setup bybit and binance as candles data feed
  • Same config setup and the backtesting resolution used was 1m and 5m

image


INFO:     127.0.0.1:44872 - "POST /historical-candles HTTP/1.1" 200 OK
INFO:     127.0.0.1:44446 - "GET /is-docker-running HTTP/1.1" 200 OK
2024-11-20 20:20:00,916 - hummingbot.data_feed.candles_feed.bybit_spot_candles.bybit_spot_candles - ERROR - Error fetching historical candles: index 0 is out of bounds for axis 0 with size 0
Traceback (most recent call last):
  File "/home/rapcmia/miniconda3/envs/backend-api/lib/python3.10/site-packages/hummingbot/data_feed/candles_feed/candles_base.py", line 178, in get_historical_candles
    current_end_time = self.ensure_timestamp_in_seconds(candles[0][0])
IndexError: index 0 is out of bounds for axis 0 with size 0
2024-11-20 20:20:00,916 - asyncio - ERROR - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7611bc108c10>
2024-11-20 20:20:00,916 - asyncio - ERROR - Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7611bcd50a00>, 91574.822432378)])']
connector: <aiohttp.connector.TCPConnector object at 0x7611bc1082b0>
INFO:     127.0.0.1:48310 - "POST /run-backtesting HTTP/1.1" 200 OK
INFO:     127.0.0.1:44456 - "GET /is-docker-running HTTP/1.1" 200 OK
INFO:     127.0.0.1:44458 - "GET /all-controller-configs HTTP/1.1" 200 OK

Note: Issue most likely happen if the backtesting took more than 3-5mins of processing data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant