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

Feat/strategy performance page v2 #184

Merged
merged 18 commits into from
Nov 16, 2024
Merged

Conversation

tomasgaudino
Copy link
Collaborator

@tomasgaudino tomasgaudino commented Sep 25, 2024

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

…tor data types handling + add short vs long analysis + fix dca render
- cache backend api requests
- remove pagination
- fix summary table results
- restore original dca builder params
- remove pnl 0 executors and filter options
- handle dca_amounts vs dca_amounts_pct in mm vs dt
- remove by controller section
- add win/loss ratio stacked area chart
- clean exceptions
- remove tabs logic and use separated sections
- replace generic backend_api_client by get_backend_api_client standard
@rapcmia rapcmia self-requested a review November 6, 2024 14:17
@rapcmia
Copy link
Contributor

rapcmia commented Nov 6, 2024

@rapcmia
Copy link
Contributor

rapcmia commented Nov 7, 2024

Ran initial tests:

  • Performance page / strategy performance now available on dashboard
  • Getting error when accessing the strategy performance page
2024-11-07 19:08:04.494 Uncaught app exception
Traceback (most recent call last):
  File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/requests/models.py", line 974, in json
    return complexjson.loads(self.text, **kwargs)
  File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "/Users/rapcomia/miniconda3/envs/dashboard/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

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 <module>
    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 Feat/performance page endpoints backend-api#36 and broker
  2. Go to Strategy Performance page

Copy link

@tomasgaudino tomasgaudino marked this pull request as ready for review November 12, 2024 22:23
@cardosofede cardosofede merged commit 358de22 into main Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Development 2.2.0
Development

Successfully merging this pull request may close these issues.

3 participants