Hi there,
I am struggling for a while with my implementation of the Algo Framework for crypto on Binance. The concept is very simple, to show what I mean:
- filter small crypto coins
- trade on default EMA alpha
- no risk management
I do not understand why some trades happen. In my understanding (may be mistaken), there should be only trades when there is Insights. I have tried to de-activate any other signals that could result in trades (i.e. no portfolio rebalancing time, no universe adjustments, null risk management). I still see trades when there is no Insights in the direction of the trade. For instance, on 2022-01-05 19:00:00, there is only 1 insight on Cordana, but 3 trades are executed in the backtest.
Since I understand that it is not possible to flag the order by the algorithm module that caused it (i.e. is it a order coming from alpha vs. from rebalancing), I am quite lost to understand why this is happening.
Any help would be appreciated.
Thx,
G
Louis Szeto
Hi George
The default behavior is that a rebalancing of the whole portfolio will occur if any new insight is emitted, since the ratio of weightings of active insights are changed. You may suspend that default by
Checkout the details in this doc page.
Best
Louis
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.
George Riley
Thank you Louis Szeto . I am aware of this setting. However, I do want the algorithm to trade according to the Insights. The issue is, the algo (backtest above) trades MORE OFTEN than it should and I have no clue, why. There is trades on days where there is no Insights and I have deactivated all other sources of trade signals (risk management, rebalancing). Could you please check and give me a hint where those additional trades stem from?
Thx!
Derek Melchin
Hi George,
The algorithm above emits 3 insights on 2022-01-02 19:00:00, so it buys the 3 Crypto pairs in the insights. It emits another insight on 2022-01-05 19:00:00 to sell ADABUSD, which was one of the Crypto pairs for the insights on 2022-01-02 19:00:00. Since the algorithm holds 3 Crypto assets (excluding BUSD) when it receives the 4th insight, it needs to rebalance the whole portfolio. That's why we see 3 trades on 2022-01-05 19:00:00. This is the behavior we expect from the EqualWeightingPortfolioConstructionModel.
However, we notice that the algorithm also places 3 trades on 2022-01-03 19:00:00, even though there are no insights on that day. This is because the position sizing of the ImmediateExecutionModel doesn't work correctly with the BinanceFeeModel. To be notified when the issue is fixed, subscribe to GitHub Issue #6793.
To avoid the extra trading before we fix GitHub Issue #6793, create a custom execution model.
Best,
Derek Melchin
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.
George Riley
Thank you, Derek Melchin !
George Riley
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!