Skip to content

Conversation

@sli-tao
Copy link
Contributor

@sli-tao sli-tao commented Aug 6, 2024

Taoshi Pull Request

Description

Add drawdown attribute to position

Related Issues (JIRA)

[Reference any related issues or tasks that this pull request addresses or closes.]

Checklist

  • I have tested my changes on testnet.
  • I have updated any necessary documentation.
  • I have added unit tests for my changes (if applicable).
  • If there are breaking changes for validators, I have (or will) notify the community in Discord of the release.

Reviewer Instructions

[Provide any specific instructions or areas you would like the reviewer to focus on.]

Definition of Done

  • Code has been reviewed.
  • All checks and tests pass.
  • Documentation is up to date.
  • Approved by at least one reviewer.

Checklist (for the reviewer)

  • Code follows project conventions.
  • Code is well-documented.
  • Changes are necessary and align with the project's goals.
  • No breaking changes introduced.

Optional: Deploy Notes

[Any instructions or notes related to deployment, if applicable.]

/cc @mention_reviewer

for hotkey, positions in hotkey_to_positions.items():
for p in positions:
p.rebuild_position_with_updated_orders()
self.save_miner_position_to_disk(p, delete_open_position_if_exists=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why?

# calculate_drawdown
self.max_return = max(self.max_return, self.return_at_close)
self.drawdown = 1.0 + ((self.return_at_close - self.max_return) / self.max_return)
self.mdd = min(self.mdd, self.drawdown)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this code should go in the set_returns function so these values get updated in mdd_checker periodically.

@sli-tao sli-tao changed the title track drawdown for each position Track drawdown for each position Aug 22, 2024
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.

4 participants