hummingbot / dashboard

Application that helps you create, backtest, deploy, and manage Hummingbot instances
Apache License 2.0
191 stars 127 forks source link

Feat/strategy performance page v2 #184

Closed tomasgaudino closed 1 week ago

tomasgaudino commented 2 months ago

Steps to run strategy performance page:

image

Then just run on dashboard project make run. Strategy performance page should be available.

image

To start analyzing, you should create a checkpoint. If your databases are running or has internal errors won't show in the select box. To create a checkpoint, just select a few and click on "Save", in Create checkpoint section. This will consolidate all databases into a single one.

image

image

Global Results

This section starts showing all controllers information within the checkpoint. You can select one or more to analyze performance.

image

Global Aggregated Metrics

Here you can see the overall performance of your controller or controllers over time.

image

Execution section

Here you can select a single controller, fetch candles via BackendAPI and see the performance on top of the asset price over time.

image

If you switch to Controller Config tab, you can see the controller config used to trade, and you can add a host and send it to someone (i.e. @nikspz can send to @rapcmia 's a config remotely)

image

Export Tables

In the last section, all raw information contained in the checkpoint should be downloadable in csv format

image

rapcmia commented 2 weeks ago

https://github.com/hummingbot/backend-api/pull/36

rapcmia commented 2 weeks ago

Ran initial tests:

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script exec(code, module.dict) File "/Users/rapcomia/github/hummingbot/dashboard/184/frontend/pages/performance/bot_performance/app.py", line 46, in asyncio.run(main()) File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/Users/rapcomia/github/hummingbot/dashboard/184/frontend/pages/performance/bot_performance/app.py", line 23, in main checkpoint_data = display_etl_section(backend_api) File "/Users/rapcomia/github/hummingbot/dashboard/184/frontend/visualization/performance_etl.py", line 9, in display_etl_section db_paths = backend_api.list_databases() File "/Users/rapcomia/github/hummingbot/dashboard/184/backend/services/backend_api_client.py", line 323, in list_databases return self.post(endpoint) File "/Users/rapcomia/github/hummingbot/dashboard/184/backend/services/backend_api_client.py", line 38, in post return self._process_response(response) File "/Users/rapcomia/github/hummingbot/dashboard/184/backend/services/backend_api_client.py", line 55, in _process_response return response.json() File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/requests/models.py", line 978, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)



Steps to reproduce:
1. Setup this PR with https://github.com/hummingbot/backend-api/pull/36 and broker
2. Go to `Strategy Performance` page
notion-workspace[bot] commented 2 weeks ago

Feat/strategy performance page v2 #184