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.
Fred Painchaud
Hi Francis,
Tiingo is now a paid provider. It looks like you did not pay for it or you did but you did not enter your key.
In your error log:
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
Fred
Francis Hsu
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!