-
Notifications
You must be signed in to change notification settings - Fork 25
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
Conversation
pdr_backend/pdr_dashboard/util/db.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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
Please also add a tooltip for the metric |
pdr_backend/pdr_dashboard/util/db.py
Outdated
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) |
There was a problem hiding this comment.
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
Work on #1559