Skip to content

Add calculate_max_long and calculate_max_short#675

Merged
sentilesdal merged 12 commits intomainfrom
matt-max-long-and-short
Jul 17, 2023
Merged

Add calculate_max_long and calculate_max_short#675
sentilesdal merged 12 commits intomainfrom
matt-max-long-and-short

Conversation

@sentilesdal
Copy link
Copy Markdown
Contributor

@sentilesdal sentilesdal commented Jul 17, 2023

This adds news methods for calculate_max_long and calculate_max_short. Also included are the functions that these need for the calculation, including calculate_max_buy and calculate_spot_price. There is some overlap with our existing functions but I wanted to have a copy that was a transliteration of the solidity code so that we can compare if anything changes or breaks. There is some cleanup to do here still but this is ready for some eyes.

  • transliterate functions
  • add new max long/short methds
  • copy file
  • convert tests to use new calc methods
  • add minimum_share_reserves
  • add test for short and long

@vercel
Copy link
Copy Markdown

vercel Bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elf-simulations ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 7:09pm

@sentilesdal sentilesdal changed the title matt max long and short Add calculate_max_long and calculate_max_short Jul 17, 2023
@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4993 🚀

Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4987 🚀

Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
Comment thread elfpy/markets/hyperdrive/hyperdrive_pricing_model.py Outdated
@github-actions
Copy link
Copy Markdown

Remaining rate limit: 5000 🚀

@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4999 🚀

@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4991 🚀

@sentilesdal sentilesdal force-pushed the matt-max-long-and-short branch from c197a35 to 6fe0cc4 Compare July 17, 2023 18:14
@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4991 🚀

Comment thread tests/pricing_models/test_calc_max_long_short.py Outdated
Comment thread tests/pricing_models/test_calc_max_long_short.py Outdated
Comment thread tests/pricing_models/test_calc_max_long_short.py Outdated
Comment thread elfpy/markets/hyperdrive/yieldspace_pricing_model_sol.py
Comment thread elfpy/markets/hyperdrive/yieldspace_pricing_model_sol.py
Copy link
Copy Markdown
Contributor

@dpaiton dpaiton left a comment

Choose a reason for hiding this comment

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

@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4959 🚀

@github-actions
Copy link
Copy Markdown

Remaining rate limit: 4953 🚀

@sentilesdal sentilesdal merged commit 7840cac into main Jul 17, 2023
@sentilesdal sentilesdal deleted the matt-max-long-and-short branch July 17, 2023 19:43
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