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

[Strategy backtesting] Add portfolio value tracking of agents + Streamlit #549

Open
gabrielfior opened this issue Nov 7, 2024 · 1 comment

Comments

@gabrielfior
Copy link
Contributor

gabrielfior commented Nov 7, 2024

When selecting a strategy, we observe the profitability of each (strategy, agent) combination, as well as other financial metrics (https://github.com/gnosis/prediction-market-agent-tooling/pull/548/files). However, one missing ingredient is the value that the portfolio has across time.

For example, if I placed a $10 bet on YES on market A on day 1 and now it's day 10 (and my portfolio consists only of this one bet), I can track the value of my portfolio between days 1-10. This allows me to follow strategies that depend on the current value of each user_position.
A visualization that goes in this direction (but not completely equivalent) can be seen in the screenshot below (max/min/realizable balance). While we can have a good idea of the current value of the portfolio by analyzing min/max vs time, it would be nice to have a concrete number on each block so that we could take more informed decisions, portfolio-wise.

image

Deliverables
-> Expand the match_bets_with_langfuse_traces to also export a portfolio_df tracking user_position balances vs time
-> (Optional) Create a Streamlit app that plots the historical portfolio per agent

@kongzii
Copy link
Contributor

kongzii commented Nov 11, 2024

sounds good!

-> (Optional) Create a Streamlit app that plots the historical portfolio per agen

This could be added to the existing streamlit monitor app: https://github.com/gnosis/prediction-market-agent-tooling/blob/main/examples/monitor/monitor.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants