Closed dpaiton closed 11 months ago
Blocked by #919
LP BOT STRATEGY
l
, 0 < l < 1
, where the amount you place into more risky trades (longs/shorts) trade_budget = budget * (1-l)
and the amount you put into less risky (LP) lp_budget = budget * l
user sets start budgets by setting a total budget & LP factor.
what do we do with money won & lost?
lp_constant = lp_budget / total_budget
primary objective is adding liquidity
for non-LP amount (= total_budget - lp_budget
) we follow the "arb bot strategy"
sheng's arb bot
trade_budget
trade_budget
better arb bot
threshold_low < fixed_rate < threshold_high
trade_budget
is not in any open positions (should put it into LP position, or variable vault)NOTES
Some alternative bots:
fixed_rate = 5% variable_rate = 2%
open_long == I'm going to earn 5% for 6mo
... time passes ...
situation 1:
current fixed_rate = 3% -- doesn't matter bc I am locked in at 5% current_variable_rate = 10%
close my long, because I could be earning more in the underlying vault
if (fixed_rate_at_open (aka opening_spot_price) < current_variable_rate): close_long
situation 2: current_fixed_rate = 10% -- now I'm losing money current_variable_rate < 10%
I should close my long & re-open a new long if (current_fixed_rate > fixed_rate_at_open) AND (current_fixed_rate > varaible_rate): close_long() & open_new_long()
goal for this issue:
goal for next issue:
example steps calculate trade size such that fixed_rate will match variable_rate: https://github.com/delvtech/elf-simulations/blob/main/lib/elfpy/elfpy/agents/policies/smart_long.py#L91
The elfpy smart long bot will be converted to agent0 in this PR: https://github.com/delvtech/elf-simulations/pull/994
resolved by #1000
The LP bot will take some percent of deposits & LP with it; trade with the rest of it.
The LP bot is to:
Configurable params:
Alternative strategies to strictly arbing rates:
Metrics:
Experiments:
TODOs: