Closed cdummett closed 1 year ago
Sounds fun!
Instead of the slightly confusing Incorrect InformedTrader
can we not just use the Uninformed trader with equally likely buy/sell probabilities?
Whilst the two scenarios mentioned above are probably useful to run for testing limits, I think I'd add a third where we use MarketOrderTrader
(the uninformed trader) with a reasonable amount of flow. InformedTrader
right/wrong can give us extreme cases but predominately random flow should hopefully give a more realistic picture of where the market maker's balance is going to end up.
Whilst the two scenarios mentioned above are probably useful to run for testing limits, I think I'd add a third where we use
MarketOrderTrader
(the uninformed trader) with a reasonable amount of flow.InformedTrader
right/wrong can give us extreme cases but predominately random flow should hopefully give a more realistic picture of where the market maker's balance is going to end up.
Could we add an accuracy
arg (float between 0
and 1
) to the InformedTrader
just to avoid adding agents to the scenario which aren't used in all cases @TomMcL ? Setting that to 0.5
should give us the more realistic case where a speculating party is right half the time.
Also, spin-off question, any objections to adding a lookahead
arg to the InformedTrader
also. At the moment if the market-makers spread is too large (fairly often with the hedged market-maker) the InformedTrader
never acts as it is only looking one step ahead.
Goal:
Create a scenario to mimic a Market-Maker (MM) who wants to follow a hedging strategy; i.e. making a market on a Vega network (profiting of fees) and hedging its position on a highly liquid external exchange.
Viability of strategy relies on the MM being able to move funds between the exchanges fast enough to prevent close-outs from insufficient margins.
Aim:
Test whether Vega's withdrawal delay is too long or its margin requirements too strict for this strategy to be viable
Scenario
Markets
Scenario will have two markets:
MarketA
- represents an expected early Vega market (price_process
can followMarketB
)MarketB
- represents a highly liquid external market (price_process
can follow an external source)The MM will operate in both markets and have a separate key for each market (
KeyA
andKeyB
). The keys represent the separate accounts on the Vega network and external exchange. The MM will be able to transfer funds between keys but subject to delays. Moving funds fromKeyB
tooKeyA
will have small delays (e.g.15m
) but moving funds fromKeyA
tooKeyB
will have large delays (e.g.24h
). This is to mimic Vega's withdrawal delays.The MM will follow a hedging strategy, posting limit orders on
MarketA
, and hedging its position onMarketB
(the "external" market). The MMs order depths will be determined such that is it able to profit off the liquidity + maker fees. The MM will then move funds between keys to manage it's margins and prevent close-outs.Agents
In
MarketA
anInformedTrader
who is aware of the next price will generate a position for the MM. We can run two cases one where theInformedTrader
is correct (and the MM will have to transfer funds fromKeyB
toKeyA
, encountering no delays) and one where theInformedTrader
is incorrect (and the MM will have to transfer funds fromKeyA
toKeyB
, encountering delays)ToDo: