Hi everybody,
Sorry for the provocative title but it seems appropriate given the high returns. I have been experimenting with a triangular arbitrage strategy on crypto for some time but something is not working well. Specifically, I have the following questions:
- Why is the leverage so high?
- Why is net profit not changing?
- Are positions actually closing?
- What is the most appropriate brokerage model and data provider for cryptocurrencies? In particular, is the Coinbase model/data better than the BitFinex one?
- Are there ways to standardize order sizes to something like $100?
NB: I am well aware that the strategy is not using a brokerage model at the moment
Louis Szeto
Hi Pietro
Trading cryptos and forexes are not like exchanging currency. Opening a long position in "BTCUSD", "ETHBTC" and a short position in "ETHUSD", even in the right hedging ratio, will not leave only the net balance of the 3 currencies, but 3 open positions. Thus, by adding a lot of market orders, the leverage is very high. We suggest using self.Portfolio.Invested to stop new trade if invested.
Net profit is referring to closed trades. Like what has been mentioned above, all positions are in open status, except the ones closed by margin calls. So the net profit is not changing. Exit criteria should be included.
There is no definite answer on this one, all brokerages have their strengths and weaknesses. Some would have more trading pairs, some have better liquidity, some are listed so their finance is more healthy, some support both wallet and trading. Individual needs and different strategies would affect the choice of broker.
Note that in your backtest, GDAX is picked but shorting ETH is performed. GDAX has not yet support short selling yet if the account doesn't have sufficient base currency for the pair (ETH in your case). One may use self.SetCash("ETH", your_amount) to provide sufficient fund at the initialize method. Otherwise like in our attached backtest example, Bitfinex and margin account type is supported for shorting.
Order size of self.MarketOrder("BTCUSD", 100/data["BTCUSD"].Ask.Close) could be used.
Our attached backtest is an example of this strategy, we recommend using ImmediateExecutionModel as arbitrage opportunity is non-waiting.
Best
Louis Szeto
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
PokerWinner
Hi Louis,
Thanks for your reply. As far as you know, does the brokerage model take into account fee rebates?
Louis Szeto
Hi Pietro
We're sorry that we currently don't have a brokerage model with fee rebates. We suggest creating a custom brokerage model to suit your need. Please refer to the attached backtest as an example.
Best
Louis Szeto
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
PokerWinner
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!