Hello,
Im trying to add crypto pairs to my current algorithm from bitfinex.
https://www.quantconnect.com/docs/data-library/cryptoI have been using this algorithm for about 1-2 years ago and it worked, but now when im trying to add the same pairs from bitfinex, e.g. DSHUSD or DSHBTC with data from 2018-01-01 it says the symbol does not exists? Does anyone have the same problems? Did they change the data library?
Davidii111
#https://www.quantconnect.com/forum/discussion/6171/dynamic-crypto-universe-portfolio/p1 #from Alphas.HistoricalReturnsAlphaModel import HistoricalReturnsAlphaModel from HistoricalReturnsAlphamodel_mod import HistoricalReturnsAlphaModel_mod from Execution.ImmediateExecutionModel import ImmediateExecutionModel from Portfolio.EqualWeightingPortfolioConstructionModel import EqualWeightingPortfolioConstructionModel class CryptoMomentum(QCAlgorithm): def Initialize(self): self.stateData = {} self.SetStartDate(2019, 1, 19) # Set Start Date self.SetEndDate(2019, 1, 22) self.SetCash(100000) # Set Strategy Cash self.SetCash("BTC", 1) self.SetBrokerageModel(BrokerageName.Bitfinex, AccountType.Margin) self.SetBenchmark(Symbol.Create('BTCUSD', SecurityType.Crypto, Market.Bitfinex)) # Add the pairs containing *BTC among all 346 pairs in Bitfinex symbols = ["LTCBTC", "ETHBTC", "ETCBTC", "RRTBTC", "ZECBTC", "XMRBTC", "DSHBTC", "XRPBTC", "IOTBTC", "EOSBTC", "SANBTC", "OMGBTC", "BCHBTC", "NEOBTC", "ETPBTC", "QTMBTC", "AVTBTC", "EDOBTC", "BTGBTC", "DATBTC", "QSHBTC", "YYWBTC", "GNTBTC", "SNTBTC", "BATBTC", "MNABTC", "FUNBTC", "ZRXBTC", "TNBBTC", "SPKBTC", "TRXBTC", "RCNBTC", "RLCBTC", "AIDBTC", "SNGBTC", "REPBTC", "ELFBTC", "IOSBTC", "AIOBTC", "REQBTC", "RDNBTC", "LRCBTC", "WAXBTC", "DAIBTC", "CFIBTC", "AGIBTC", "MTNBTC", "SNGBTC", "ODEBTC", "ANTBTC", "DTHBTC", "MITBTC", "STJBTC", "XLMBTC", "XVGBTC", "BCIBTC", "MKRBTC", "VENBTC", "KNCBTC", "POABTC", "LYMBTC", "UTKBTC", "VEEBTC", "DADBTC", "ORSBTC", "AUCBTC", "POYBTC", "FSNBTC", "CBTBTC", "ZCNBTC", "SENBTC", "NCABTC", "CNDBTC", "CTXBTC", "PAIBTC", "SEEBTC", "ESSBTC", "ATMBTC", "HOTBTC", "DTABTC", "IQXBTC", "WPRBTC", "ZILBTC", "BNTBTC", "XTZBTC", "OMNBTC", "DGBBTC", "BSVBTC", "BABBTC", "RBTBTC", "RIFBTC", "VSYBTC", "BFTBTC"] Symbols = [] for symbol in symbols: # add according forex data to add the crypto pairs self.AddCrypto(symbol[:3]+"USD", Resolution.Daily) Symbols.append(Symbol.Create(symbol, SecurityType.Crypto, Market.Bitfinex)) self.SetUniverseSelection(ManualUniverseSelectionModel(Symbols)) self.AddAlpha(HistoricalReturnsAlphaModel_mod(7, Resolution.Daily)) self.SetExecution(ImmediateExecutionModel()) self.SetPortfolioConstruction(EqualWeightingPortfolioConstructionModel()) def OnData(self, data): pass
Error message: During the algorithm initialization, the following exception has occurred: ArgumentException : Symbol can't be found in the Symbol Properties Database: DSHUSD at QuantConnect.Securities.SecurityService.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, System.Boolean addToSymbolCache) [0x0009f] in :0 at QuantConnect.Securities.SecurityManager.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, System.Boolean addToSymbolCache) [0x00000] in :0 at QuantConnect.Algorithm.QCAlgorithm.AddSecurity[T] (QuantConnect.SecurityType securityType, System.String ticker, System.Nullable`1[T] resolution, System.String market, System.Boolean fillDataForward, System.Decimal leverage, System.Boolean extendedMarketHours) [0x000a9] in :0 at QuantConnect.Algorithm.QCAlgorithm.AddCrypto (System.String ticker, System.Nullable`1[T] resolution, System.String market, System.Boolean fillDataForward, System.Decimal leverage) [0x00001] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in :0 at Initialize self.AddCrypto(symbol[:3]+"USD" in main.py:line 86 ArgumentException : Symbol can't be found in the Symbol Properties Database: DSHUSD at QuantConnect.Securities.SecurityService.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, System.Boolean addToSymbolCache) [0x0009f] in :0 at QuantConnect.Securities.SecurityManager.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, System.Boolean addToSymbolCache) [0x00000] in :0 at QuantConnect.Algorithm.QCAlgorithm.AddSecurity[T] (QuantConnect.SecurityType securityType, System.String ticker, System.Nullable`1[T] resolution, System.String market, System.Boolean fillDataForward, System.Decimal leverage, System.Boolean extendedMarketHours) [0x000a9] in :0 at QuantConnect.Algorithm.QCAlgorithm.AddCrypto (System.String ticker, System.Nullable`1[T] resolution, System.String market, System.Boolean fillDataForward, System.Decimal leverage) [0x00001] in :0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in :0
Â
Derek Melchin
Hi Davidii111,
DSH has been updated to DASH. See the attached backtest for reference. For a comprehensive list of the available crypto pairs, refer to the Symbol Properties Database.
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.
Davidii111
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!