Open atkinson opened 2 years ago
Also, implement some better execution logic.
I think we should consider the use case where we know we want to trade an asset but acknowledge that it can be more profitable to get exposure via other instruments or even exchanges.
What do you think about removing the quote currency from the Security
model and adding a symbol
and exchange
attribute to? That way, when a StrategyPositionRequest
is created we can insert an additional piece of logic that will choose optimal symbol
and eventually exchange
.
Initially we can keep it simple, long = spot, short = perp
We will need to handle shifts from one symbol to another, and ensure frequency of this happening is as low as possible.
The ftx API treats futures and spot differently; we should not conflate them.
execution.exchanges.Exchange
defines a base class for Exchanges (currently the only implementation isexecution.exchanges.ftx.FtxExchange
which is incomplete).We need to support strategies that work with spot, and futures.