Hi,

I just installed Lean CLI by 'pip install lean'. I also used 'lean data generate --start 20201230 --end 20210404 --symbol-count 2 --security-type Crypto --resolution Daily' to generate some random daily crypto data for testing first.

It do create some random crypto coins under data/crypto/gdax/daily folder, like htm_trade.zip.

But when I do backtest, in main,py. I added below:

self.AddCrypto('htm',Resolution.Daily)

When run backtest, I always met below error:

20210406 06:02:24.528 ERROR:: During the algorithm initialization, the following exception has occurred: ArgumentException : Symbol can't be found in the Symbol Properties Database: 
HTM
at QuantConnect.Securities.SecurityService.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, 
System.Boolean addToSymbolCache) [0x0009f] in <c30ce690247848b4a0fd72de161d85ef>:0
at QuantConnect.Securities.SecurityManager.CreateSecurity (QuantConnect.Symbol symbol, System.Collections.Generic.List`1[T] subscriptionDataConfigList, System.Decimal leverage, 
System.Boolean addToSymbolCache) [0x00000] in <c30ce690247848b4a0fd72de161d85ef>: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 <8aacd975115945239bf5a2a558e45dc3>:0
 

When I replace with below standard btcusd, then all backtest OK.

self.AddCrypto('btcusd',Resolution.Daily)

 

Does this mean only the special symbol's name we can use during local backtest?

 

Thanks,

henry 

Author