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

Make the strategy more sensible #72

Merged
merged 17 commits into from
Sep 7, 2023
Merged

Make the strategy more sensible #72

merged 17 commits into from
Sep 7, 2023

Conversation

Adamantios
Copy link
Collaborator

Makes the strategy more sensible and potentially more profitable.

@Adamantios Adamantios added the enhancement New feature or request label Sep 6, 2023
bet_amount = self.params.get_bet_amount(confidence)
fee = self.synchronized_data.sampled_bet.fee
return bet_amount - fee >= bet_threshold
potential_net_profit = num_shares - net_bet_amount - mech_price - bet_threshold
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe that the mech's price should be removed from the profitability calculation as this has already been paid.
If 0 < num_shares - net_bet_amount - bet_threshold < mech_price, then the service would at least have a chance to cover a part of the mech's costs plus the threshold's amount.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes it can be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok! We need to add the mech cost to the outer decision making problem later

Copy link
Collaborator Author

@Adamantios Adamantios Sep 7, 2023

Choose a reason for hiding this comment

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

Removed on 30bf870 and opened #75.

Comment on lines +226 to +227
def _calc_binary_shares(self, net_bet_amount: int, vote: int) -> Tuple[int, int]:
"""Calculate the claimed shares. This calculation only works for binary markets."""
Copy link
Collaborator Author

@Adamantios Adamantios Sep 6, 2023

Choose a reason for hiding this comment

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

The output of this method was tested with multiple examples and the returned number of shares is accurate.

@Adamantios Adamantios merged commit 618ac27 into main Sep 7, 2023
6 checks passed
@Adamantios Adamantios deleted the refactor/strategy branch September 7, 2023 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants