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

[Pdr Dashboard] Adds profit metric. #1650

Merged
merged 6 commits into from
Oct 4, 2024
Merged

Conversation

calina-c
Copy link
Contributor

@calina-c calina-c commented Oct 3, 2024

Work on #1559

@calina-c calina-c marked this pull request as ready for review October 3, 2024 12:32
@calina-c calina-c requested a review from KatunaNorbert October 3, 2024 12:32
@@ -436,11 +436,14 @@ def predictoors_metrics(self) -> dict[str, Union[int, float]]:
)
)

profit = tot_gross_income - (tot_stake * 2 * self.fee_cost if tot_stake else 0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the stake loses should also be subtracted from the gross income

@KatunaNorbert
Copy link
Member

Please also add a tooltip for the metric

@calina-c calina-c requested a review from KatunaNorbert October 4, 2024 05:13
self.file_reader._query_db(
query_predictoors_metrics,
scalar=True,
cache_file_name="predictoor_metrics_predictoors",
)
)

profit = (
tot_gross_income
- (tot_stake * 2 * self.fee_cost if tot_stake else 0)
Copy link
Member

@KatunaNorbert KatunaNorbert Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the costs calculation looks wrong. It should be nr_of_predictions * 2 * fee_costs.
An easy way to verify if the profit value is right is to sum up the profit column values from predictoors table

@calina-c calina-c merged commit 4609a1d into main Oct 4, 2024
5 checks passed
@calina-c calina-c deleted the issue-1559-profit-metric branch October 4, 2024 10:56
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

Successfully merging this pull request may close these issues.

2 participants