Back

Is it possible to backtest / trade other cryptos beyond BTC, ETH and LTC?

Hi there,

I can see in the data library that there are many other crypto data available beyond BTCUSD, ETHUSD and LTCUSD. However, whatever else I try to backtest (e.g. BCHUSD, ETCUSD, etc.) I got nothing happening. Is that because only the three cryptos mentioned above are currently supported by QuantConnect at the moment?

Maybe worth adding the answer to the crypto FAQ page: 

https://www.quantconnect.com/forum/discussion/3581/faq-trading-crypto-on-quantconnect

Thanks!

Update Backtest







0

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.


Hello.

The crypto data available is not limited to BTCUSD, ETHUSD, and LTCUSD. Check out the QuantConnect Data Explorer to see what crypto data is available.

In the attached backtest I use data from the GDAX exchange and add BCHUSD to the portfolio:

# In Initialize
self.SetBrokerageModel(BrokerageName.GDAX,AccountType.Cash)
self.AddCrypto("BCHUSD", Resolution.Daily)

You can also explore the data available from the Bitfinex exchange in the QuantConnect Data Explorer. Good luck!

0

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.


Hi Halldor,

Thanks a lot for your answer. Actually what is happening when I try to use BCH for example, is that I do get some trades executed in the backtest, but the backtest output screen is showing:

- Unrealized, Fees, Net Profits and Return are equal to 0 and appear in grey

- Equity remain unchanged at starting equity level

- The overview tab below the Strategy Equity graph is blank

I don't have this issue with BTC, ETH and LTC, but I have it with all the other pairs.

I have attached a backtest as an example. Maybe this is a bug? I hope you will see the same thing as me if you have a look.

Thanks again for your help.

0


Hi,

I looked at the backtest you attached and ran it. It looks like BCH wasn't listed until 12/22/2017, and if you set this as the Start Date then you should have no problem viewing all of the results. If you continue to encounter an issue, let us know!

0

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.


Thanks Jack!

Indeed, changing the date fix the problem, but I would have expect that the results appear anyway whatever is the starting date, and there is just nothing happening for the period where data are not available.

I see the actual behaviour as a bug, but this is a minor one as long as you are backtesting one pair at a time. This become more of an issue when you backtest an algo running several pair at a time. then you get the following error:

Runtime Error: 'BCHUSD' wasn't found in the Slice object, likely because there was no-data at this moment in time and it wasn't possible to fillforward historical data. Please check the data exists before accessing it with data.ContainsKey("BCHUSD") 

It would be nice to be able to backtest from whatever starting date (with one or several pairs in the same algo) and having just no trades happening for the period where no data are available.

I am happy to create a ticket in GitHub if you think that make sense.

0

I'd recommend looking into using the data.ContainsKey() method. This will allow you to tell the algorithm what to do if an asset doesn't have data at the same time as the others in your Universe. With equities, this occurs often when there is a Dividend, Split, or another significant event. With Crypto, it can be a number of things and I'd recommend testing out some data handling methods before opening an issue in GitHub. You can also open a private support ticket in the terminal if you feel you need additional help with the algorithm and handling the data.

1

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.


Thank you very much for the pointer Jack, that's very helpful. I will try to build some check using the data.ContainsKey() method and further explore the data handeling methods.

Sorry for all those beginner questions, I am learning to code to be able to use QuantConnect and the learing curve is quite steep. Really appreciate your support, thanks again!

0

Update Backtest





0

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.


Loading...

This discussion is closed