I try to run backtest locally using data from Tiingo and try to run following example code.  

But `lean backtest` command give me following errors when try to run backtest using above example.  Any idea why it failed with the errors?

 

20220619 18:44:17.330 TRACE:: AlgorithmPythonWrapper(): main successfully imported.
20220619 18:44:17.340 TRACE:: AlgorithmPythonWrapper(): Creating IAlgorithm instance.
20220619 18:44:17.349 TRACE:: Config.GetValue(): api-data-update-period - Using default value: 1
20220619 18:44:17.449 TRACE:: Config.GetValue(): mute-python-library-logging - Using default value: True
20220619 18:44:17.469 TRACE:: LocalObjectStore.Initialize(): Storage Root: /Storage/QCAlgorithm. StorageFileCount 100. StorageLimitMB 5
20220619 18:44:17.480 TRACE:: BacktestingSetupHandler.Setup(): Setting up job: UID: 32621, PID: 372638924, Version: 2.5.0.0, Source: WebIDE
20220619 18:44:17.485 TRACE:: Config.Get(): Configuration key not found. Key: security-data-feeds - Using default value:
20220619 18:44:17.505 TRACE:: BacktestingResultHandler(): Sample Period Set: 04.00
20220619 18:44:17.508 TRACE:: Config.GetValue(): forward-console-messages - Using default value: True
20220619 18:44:17.598 ERROR:: Engine.Run(): During the algorithm initialization, the following exception has occurred: The custom data type 
TiingoPrice requires mapping, but the provided ticker is not in the cache. Please add this custom data type using a Symbol or perform this call after a 
Security has been added using AddEquity, AddForex, AddCfd, AddCrypto, AddFuture, AddOption or AddSecurity. An example use case can be found in 
CustomDataAddDataRegressionAlgorithm in Python.cs:line 164 The custom data type TiingoPrice requires mapping, but the provided ticker is not in the cache. 
Please add this custom data type using a Symbol or perform this call after a Security has been added using AddEquity, AddForex, AddCfd, AddCrypto, 
AddFuture, AddOption or AddSecurity. An example use case can be found in CustomDataAddDataRegressionAlgorithm
20220619 18:44:17.601 TRACE:: JOB HANDLERS:
20220619 18:44:17.602 TRACE::          DataFeed:     QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
20220619 18:44:17.604 TRACE::          Setup:        QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler
20220619 18:44:17.605 TRACE::          RealTime:     QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler
20220619 18:44:17.607 TRACE::          Results:      QuantConnect.Lean.Engine.Results.BacktestingResultHandler
20220619 18:44:17.607 ERROR:: During the algorithm initialization, the following exception has occurred: The custom data type TiingoPrice 
requires mapping, but the provided ticker is not in the cache. Please add this custom data type using a Symbol or perform this call after a Security has 
been added using AddEquity, AddForex, AddCfd, AddCrypto, AddFuture, AddOption or AddSecurity. An example use case can be found in 
CustomDataAddDataRegressionAlgorithm in Python.cs:line 164 The custom data type TiingoPrice requires mapping, but the provided ticker is not in the cache. 
Please add this custom data type using a Symbol or perform this call after a Security has been added using AddEquity, AddForex, AddCfd, AddCrypto, 
AddFuture, AddOption or AddSecurity. An example use case can be found in CustomDataAddDataRegressionAlgorithm
20220619 18:44:17.608 TRACE::          Transactions: QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler
20220619 18:44:17.611 TRACE::          Alpha:        QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler
20220619 18:44:17.612 TRACE::          ObjectStore:  QuantConnect.Lean.Engine.Storage.LocalObjectStore
20220619 18:44:17.614 TRACE::          History Provider:     QuantConnect.Lean.Engine.HistoricalData.HistoryProviderManager
20220619 18:44:17.616 TRACE:: FileSystemDataFeed.Exit(): Start. Setting cancellation token...
20220619 18:44:17.618 TRACE:: FileSystemDataFeed.Exit(): Exit Finished.

 

Author