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

feat: CFM bots #528

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open

feat: CFM bots #528

wants to merge 37 commits into from

Conversation

davidsiska-vega
Copy link
Contributor

@davidsiska-vega davidsiska-vega commented Oct 14, 2023

Description

A LP bot that places volume on the book following $xy = k$ and sets $k$ to control position.

Closes #522 .

Authored by @TomMcL - I think in the link you gave me you've not pressed "create".

@davidsiska-vega davidsiska-vega requested a review from a team as a code owner October 14, 2023 17:07
@TomMcL TomMcL changed the title Feat/cfm bot feat: CFM bots Oct 31, 2023
best_bid, best_ask = self.vega.best_prices(self.market_id)
# best_bid, best_ask = self.vega.best_prices(self.market_id)
buy_vwap = self._execution_price(buy_vol, vega_protos.SIDE_BUY)
sell_vwap = self._execution_price(buy_vol, vega_protos.SIDE_SELL)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
sell_vwap = self._execution_price(buy_vol, vega_protos.SIDE_SELL)
sell_vwap = self._execution_price(sell_vol, vega_protos.SIDE_SELL)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Lots of commented out blocks of code in this file?

Is to switch up the scenario quickly or not intentional?

"spam.protection.max.batchSize": "30",
"spam.protection.max.batchSize": "200",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure about how I feel moving away from mainnet values here.

Maybe a separate genesis for sim works now devops are using market-sim bots?


figs = price_comp_plots()
for i, fig in enumerate(figs.values()):
fig.savefig(f"./cfm_plots/trading-{i}.jpg")
Copy link
Collaborator

@cdummett cdummett Nov 1, 2023

Choose a reason for hiding this comment

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

I get an error here, manually adding a cfm_plots dir fixed it but may be worth adding a block which creates if it doesn't exist or add the dir it to git.

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.

Create simple "CFM" bot
3 participants