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

Naive "at-touch-mm" #429

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions vega_sim/devops/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from vega_sim.scenario.common.agents import (
ArbitrageLiquidityProvider,
ExponentialShapedMarketMaker,
AtTheTouchMarketMaker,
)

from vega_sim.devops.classes import (
Expand Down Expand Up @@ -247,4 +248,15 @@
state_update_freq=10,
tag="agent",
),
"basic_at_the_touch_mm_ethusd": lambda: AtTheTouchMarketMaker(
wallet_name=None,
key_name=None,
initial_asset_mint=0,
market_name=None,
asset_name=None,
order_size=0.01,
tag="at_touch_mm",
peg_offset=0,
max_position=0.05,
),
}
4 changes: 2 additions & 2 deletions vega_sim/scenario/common/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -3261,7 +3261,7 @@ def step(self, vega_state: VegaState):
self.current_position = float(
position.open_volume if position is not None else 0
)

print("Position open volume "+str(self.current_position))
# Get a list of live orders for the party
orders = list(
(
Expand All @@ -3277,7 +3277,7 @@ def step(self, vega_state: VegaState):
if self.market_id in vega_state.market_state
else []
)

# Check buy_order_reference and sell_order_reference are still live:
buys = []
sells = []
Expand Down
3 changes: 0 additions & 3 deletions vega_sim/scenario/configurable_market/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,6 @@ def configure_agents(
initial_asset_mint=1e9,
market_name=self.market_name,
asset_name=self.asset_name,
market_decimal_places=market_config.decimal_places,
position_decimal_places=market_config.position_decimal_places,
asset_decimal_places=self.asset_decimal,
peg_offset=0,
max_position=10 * 10 ** (-market_config.position_decimal_places),
tag="a",
Expand Down
1 change: 1 addition & 0 deletions vega_sim/scenario/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ class Network(Enum):
STAGNET3 = "vegawallet-stagnet3"
FAIRGROUND = "vegawallet-fairground"
TESTNET2 = "testnet2"
MAINNET1 = "mainnet1"