I am attempting to run the code from the options tutorial on local SPY data (purchased from QC and downloaded using Lean CLI). The backtest runs fine in the cloud, but it doesn't run on any of my local data. How do I get the backtest to use local data?
Attached is the backtest, a directory listing showing I have the local data, and the output of the backtest when I run it.
friley@macbook options-backest % ls -l data/option/usa/minute/spy/20200[23]*
-rw-r--r-- 1 friley staff 47753589 Aug 14 12:01 data/option/usa/minute/spy/20200203_quote_american.zip
-rw-r--r-- 1 friley staff 2252931 Aug 14 15:51 data/option/usa/minute/spy/20200203_trade_american.zip
-rw-r--r-- 1 friley staff 43408726 Aug 14 12:01 data/option/usa/minute/spy/20200204_quote_american.zip
-rw-r--r-- 1 friley staff 1661104 Aug 14 15:51 data/option/usa/minute/spy/20200204_trade_american.zip
-rw-r--r-- 1 friley staff 45523617 Aug 14 12:01 data/option/usa/minute/spy/20200205_quote_american.zip
-rw-r--r-- 1 friley staff 2173078 Aug 14 15:51 data/option/usa/minute/spy/20200205_trade_american.zip
-rw-r--r-- 1 friley staff 43711398 Aug 14 12:01 data/option/usa/minute/spy/20200206_quote_american.zip
-rw-r--r-- 1 friley staff 1844780 Aug 14 15:51 data/option/usa/minute/spy/20200206_trade_american.zip
-rw-r--r-- 1 friley staff 46206075 Aug 14 12:02 data/option/usa/minute/spy/20200207_quote_american.zip
-rw-r--r-- 1 friley staff 1617675 Aug 14 15:51 data/option/usa/minute/spy/20200207_trade_american.zip
-rw-r--r-- 1 friley staff 43411037 Aug 14 12:02 data/option/usa/minute/spy/20200210_quote_american.zip
-rw-r--r-- 1 friley staff 1737519 Aug 14 15:51 data/option/usa/minute/spy/20200210_trade_american.zip
-rw-r--r-- 1 friley staff 45229931 Aug 14 12:01 data/option/usa/minute/spy/20200211_quote_american.zip
-rw-r--r-- 1 friley staff 2005208 Aug 14 15:51 data/option/usa/minute/spy/20200211_trade_american.zip
-rw-r--r-- 1 friley staff 43465788 Aug 14 12:02 data/option/usa/minute/spy/20200212_quote_american.zip
-rw-r--r-- 1 friley staff 1654295 Aug 14 15:51 data/option/usa/minute/spy/20200212_trade_american.zip
-rw-r--r-- 1 friley staff 46707493 Aug 14 12:01 data/option/usa/minute/spy/20200213_quote_american.zip
-rw-r--r-- 1 friley staff 1814891 Aug 14 15:51 data/option/usa/minute/spy/20200213_trade_american.zip
-rw-r--r-- 1 friley staff 44893676 Aug 14 12:01 data/option/usa/minute/spy/20200214_quote_american.zip
-rw-r--r-- 1 friley staff 1708356 Aug 14 15:51 data/option/usa/minute/spy/20200214_trade_american.zip
-rw-r--r-- 1 friley staff 45510506 Aug 14 12:01 data/option/usa/minute/spy/20200218_quote_american.zip
-rw-r--r-- 1 friley staff 1789260 Aug 14 15:51 data/option/usa/minute/spy/20200218_trade_american.zip
-rw-r--r-- 1 friley staff 41052719 Aug 14 12:01 data/option/usa/minute/spy/20200219_quote_american.zip
-rw-r--r-- 1 friley staff 1908741 Aug 14 15:51 data/option/usa/minute/spy/20200219_trade_american.zip
-rw-r--r-- 1 friley staff 49083886 Aug 14 12:02 data/option/usa/minute/spy/20200220_quote_american.zip
-rw-r--r-- 1 friley staff 1890454 Aug 14 15:51 data/option/usa/minute/spy/20200220_trade_american.zip
-rw-r--r-- 1 friley staff 49308095 Aug 14 12:01 data/option/usa/minute/spy/20200221_quote_american.zip
-rw-r--r-- 1 friley staff 1901786 Aug 14 15:51 data/option/usa/minute/spy/20200221_trade_american.zip
-rw-r--r-- 1 friley staff 52308392 Aug 14 12:02 data/option/usa/minute/spy/20200224_quote_american.zip
-rw-r--r-- 1 friley staff 2579073 Aug 14 15:51 data/option/usa/minute/spy/20200224_trade_american.zip
-rw-r--r-- 1 friley staff 57102045 Aug 14 12:02 data/option/usa/minute/spy/20200225_quote_american.zip
-rw-r--r-- 1 friley staff 3286304 Aug 14 15:51 data/option/usa/minute/spy/20200225_trade_american.zip
-rw-r--r-- 1 friley staff 59239969 Aug 14 12:02 data/option/usa/minute/spy/20200226_quote_american.zip
-rw-r--r-- 1 friley staff 3340062 Aug 14 15:51 data/option/usa/minute/spy/20200226_trade_american.zip
-rw-r--r-- 1 friley staff 62674560 Aug 14 12:02 data/option/usa/minute/spy/20200227_quote_american.zip
-rw-r--r-- 1 friley staff 3917201 Aug 14 15:51 data/option/usa/minute/spy/20200227_trade_american.zip
-rw-r--r-- 1 friley staff 66142167 Aug 14 12:02 data/option/usa/minute/spy/20200228_quote_american.zip
-rw-r--r-- 1 friley staff 4937108 Aug 14 15:51 data/option/usa/minute/spy/20200228_trade_american.zip
-rw-r--r-- 1 friley staff 67192788 Aug 14 12:02 data/option/usa/minute/spy/20200302_quote_american.zip
-rw-r--r-- 1 friley staff 3589811 Aug 14 15:51 data/option/usa/minute/spy/20200302_trade_american.zip
-rw-r--r-- 1 friley staff 69995087 Aug 14 12:02 data/option/usa/minute/spy/20200303_quote_american.zip
-rw-r--r-- 1 friley staff 4096797 Aug 14 15:51 data/option/usa/minute/spy/20200303_trade_american.zip
-rw-r--r-- 1 friley staff 66557093 Aug 14 12:02 data/option/usa/minute/spy/20200304_quote_american.zip
-rw-r--r-- 1 friley staff 3578004 Aug 14 15:51 data/option/usa/minute/spy/20200304_trade_american.zip
-rw-r--r-- 1 friley staff 66961410 Aug 14 12:02 data/option/usa/minute/spy/20200305_quote_american.zip
-rw-r--r-- 1 friley staff 3079844 Aug 14 15:51 data/option/usa/minute/spy/20200305_trade_american.zip
-rw-r--r-- 1 friley staff 67663035 Aug 14 12:02 data/option/usa/minute/spy/20200306_quote_american.zip
-rw-r--r-- 1 friley staff 3823665 Aug 14 15:51 data/option/usa/minute/spy/20200306_trade_american.zip
-rw-r--r-- 1 friley staff 67367211 Aug 14 12:02 data/option/usa/minute/spy/20200309_quote_american.zip
-rw-r--r-- 1 friley staff 5299952 Aug 14 15:51 data/option/usa/minute/spy/20200309_trade_american.zip
-rw-r--r-- 1 friley staff 72618504 Aug 14 12:03 data/option/usa/minute/spy/20200310_quote_american.zip
-rw-r--r-- 1 friley staff 5215660 Aug 14 15:51 data/option/usa/minute/spy/20200310_trade_american.zip
-rw-r--r-- 1 friley staff 73658247 Aug 14 12:02 data/option/usa/minute/spy/20200311_quote_american.zip
-rw-r--r-- 1 friley staff 4463397 Aug 14 15:51 data/option/usa/minute/spy/20200311_trade_american.zip
-rw-r--r-- 1 friley staff 75814709 Aug 14 12:02 data/option/usa/minute/spy/20200312_quote_american.zip
-rw-r--r-- 1 friley staff 5580114 Aug 14 15:51 data/option/usa/minute/spy/20200312_trade_american.zip
-rw-r--r-- 1 friley staff 84783685 Aug 14 12:02 data/option/usa/minute/spy/20200313_quote_american.zip
-rw-r--r-- 1 friley staff 6315289 Aug 14 15:51 data/option/usa/minute/spy/20200313_trade_american.zip
-rw-r--r-- 1 friley staff 79088637 Aug 14 12:02 data/option/usa/minute/spy/20200316_quote_american.zip
-rw-r--r-- 1 friley staff 5667808 Aug 14 15:51 data/option/usa/minute/spy/20200316_trade_american.zip
-rw-r--r-- 1 friley staff 85346745 Aug 14 12:02 data/option/usa/minute/spy/20200317_quote_american.zip
-rw-r--r-- 1 friley staff 5184423 Aug 14 15:51 data/option/usa/minute/spy/20200317_trade_american.zip
-rw-r--r-- 1 friley staff 82526499 Aug 14 12:04 data/option/usa/minute/spy/20200318_quote_american.zip
-rw-r--r-- 1 friley staff 6341258 Aug 14 15:51 data/option/usa/minute/spy/20200318_trade_american.zip
-rw-r--r-- 1 friley staff 85257852 Aug 14 12:03 data/option/usa/minute/spy/20200319_quote_american.zip
-rw-r--r-- 1 friley staff 5225139 Aug 14 15:51 data/option/usa/minute/spy/20200319_trade_american.zip
-rw-r--r-- 1 friley staff 83015867 Aug 14 12:03 data/option/usa/minute/spy/20200320_quote_american.zip
-rw-r--r-- 1 friley staff 4982689 Aug 14 15:51 data/option/usa/minute/spy/20200320_trade_american.zip
-rw-r--r-- 1 friley staff 79801472 Aug 14 12:03 data/option/usa/minute/spy/20200323_quote_american.zip
-rw-r--r-- 1 friley staff 5286225 Aug 14 15:51 data/option/usa/minute/spy/20200323_trade_american.zip
-rw-r--r-- 1 friley staff 77881731 Aug 14 12:03 data/option/usa/minute/spy/20200324_quote_american.zip
-rw-r--r-- 1 friley staff 5203366 Aug 14 15:51 data/option/usa/minute/spy/20200324_trade_american.zip
-rw-r--r-- 1 friley staff 80118422 Aug 14 12:03 data/option/usa/minute/spy/20200325_quote_american.zip
-rw-r--r-- 1 friley staff 5964632 Aug 14 15:51 data/option/usa/minute/spy/20200325_trade_american.zip
-rw-r--r-- 1 friley staff 77821358 Aug 14 12:02 data/option/usa/minute/spy/20200326_quote_american.zip
-rw-r--r-- 1 friley staff 5229676 Aug 14 15:51 data/option/usa/minute/spy/20200326_trade_american.zip
-rw-r--r-- 1 friley staff 77634822 Aug 14 12:03 data/option/usa/minute/spy/20200327_quote_american.zip
-rw-r--r-- 1 friley staff 4643357 Aug 14 15:51 data/option/usa/minute/spy/20200327_trade_american.zip
-rw-r--r-- 1 friley staff 69634631 Aug 14 12:03 data/option/usa/minute/spy/20200330_quote_american.zip
-rw-r--r-- 1 friley staff 4662889 Aug 14 15:51 data/option/usa/minute/spy/20200330_trade_american.zip
-rw-r--r-- 1 friley staff 69880097 Aug 14 12:03 data/option/usa/minute/spy/20200331_quote_american.zip
-rw-r--r-- 1 friley staff 4187819 Aug 14 15:51 data/option/usa/minute/spy/20200331_trade_american.zip
friley@macbook options-backest % lean backtest --data-provider Local --verbose "Options Tutorial"
Running 'lean-cli/engine:latest' with the following configuration:
{
'environment': {},
'stop_signal': 'SIGINT',
'mounts': [
{'Target': '/Lean/Launcher/bin/Debug/config.json', 'Source':
'/var/folders/_l/4zfgdljs7ld7f7b3n8grzmt00000gn/T/lean-cli-5k29rt7t/config.json', 'Type': 'bind', 'ReadOnly': True},
{'Target': '/lean-cli-start.sh', 'Source':
'/var/folders/_l/4zfgdljs7ld7f7b3n8grzmt00000gn/T/lean-cli-poi5gw8j/lean-cli-start.sh', 'Type': 'bind', 'ReadOnly': True}
],
'volumes': {
'/Users/friley/PycharmProjects/options-backest/data': {'bind': '/Lean/Data', 'mode': 'rw'},
'/Users/friley/PycharmProjects/options-backest/Options Tutorial/backtests/2021-08-14_16-55-45': {
'bind': '/Results',
'mode': 'rw'
},
'/Users/friley/PycharmProjects/options-backest/Options Tutorial/storage': {'bind': '/Storage', 'mode': 'rw'},
'/Users/friley/PycharmProjects/options-backest/Options Tutorial': {'bind': '/LeanCLI', 'mode': 'rw'}
},
'ports': {},
'name': 'lean_cli_2d4a32865c9747628ab57cc2524345ec',
'entrypoint': ['bash', '/lean-cli-start.sh'],
'detach': True,
'hostname': 'macbook.lan',
'tty': True,
'stdin_open': True,
'network': 'lean_cli'
}
+ exec dotnet QuantConnect.Lean.Launcher.dll
20210814 23:55:46.952 TRACE:: Config.Get(): Configuration key not found. Key: plugin-directory - Using default value:
20210814 23:55:46.966 TRACE:: Composer(): Loading Assemblies from /Lean/Launcher/bin/Debug
20210814 23:55:47.023 TRACE:: Python for .NET Assembly: Python.Runtime, Version=2.0.5.0, Culture=neutral,
PublicKeyToken=5000fea6cba702dd
20210814 23:55:47.108 TRACE:: Config.Get(): Configuration key not found. Key: data-directory - Using default value:
../../../Data/
20210814 23:55:47.113 TRACE:: Config.Get(): Configuration key not found. Key: version-id - Using default value:
20210814 23:55:47.114 TRACE:: Config.Get(): Configuration key not found. Key: cache-location - Using default value: /Lean/Data
20210814 23:55:47.115 TRACE:: Engine.Main(): LEAN ALGORITHMIC TRADING ENGINE v2.5.0.0 Mode: DEBUG (64bit) Host: macbook
20210814 23:55:47.122 TRACE:: Engine.Main(): Started 11:55 PM
20210814 23:55:47.125 TRACE:: Config.Get(): Configuration key not found. Key: lean-manager-type - Using default value:
LocalLeanManager
20210814 23:55:47.148 TRACE:: JobQueue.NextJob(): Selected /LeanCLI/main.py
20210814 23:55:47.239 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-capacity - Using default value: 120
20210814 23:55:47.240 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-time-interval-minutes - Using default value: 1440
20210814 23:55:47.241 TRACE:: Config.GetValue(): scheduled-event-leaky-bucket-refill-amount - Using default value: 18
20210814 23:55:47.245 TRACE:: Config.Get(): Configuration key not found. Key: job-organization-id - Using default value:
20210814 23:55:47.248 TRACE:: Config.Get(): Configuration key not found. Key: data-permission-manager - Using default value:
DataPermissionManager
20210814 23:55:47.269 TRACE:: AlgorithmManager.CreateTokenBucket(): Initializing LeakyBucket: Capacity: 120 RefillAmount: 18
TimeInterval: 1440
20210814 23:55:47.273 TRACE:: Config.GetValue(): algorithm-manager-time-loop-maximum - Using default value: 20
20210814 23:55:47.283 TRACE:: TextSubscriptionDataSourceReader.SetCacheSize(): Setting cache size to 71582788 items
20210814 23:55:47.581 TRACE:: Config.GetValue(): algorithm-creation-timeout - Using default value: 90
20210814 23:55:47.586 TRACE:: PythonInitializer.Initialize(): start...
PythonEngine.Initialize(): Runtime.Initialize()...
Runtime.Initialize(): Py_Initialize...
Runtime.Initialize(): PyEval_InitThreads...
Runtime.Initialize(): Initialize types...
Runtime.Initialize(): Initialize types end.
Runtime.Initialize(): AssemblyManager.Initialize()...
Runtime.Initialize(): AssemblyManager.UpdatePath()...
PythonEngine.Initialize(): GetCLRModule()...
PythonEngine.Initialize(): clr GetManifestResourceStream...
20210814 23:55:48.411 TRACE:: PythonInitializer.Initialize(): ended
20210814 23:55:48.416 TRACE:: AlgorithmPythonWrapper(): Python version 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:25:33)
[GCC 7.3.0]: Importing python module main
20210814 23:55:48.692 TRACE:: AlgorithmPythonWrapper(): main successfully imported.
20210814 23:55:48.696 TRACE:: AlgorithmPythonWrapper(): Creating IAlgorithm instance.
20210814 23:55:48.710 TRACE:: Config.GetValue(): api-data-update-period - Using default value: 1
20210814 23:55:49.581 TRACE:: Config.GetValue(): mute-python-library-logging - Using default value: True
20210814 23:55:49.621 TRACE:: LocalObjectStore.Initialize(): Storage Root: /Storage/QCAlgorithm
20210814 23:55:49.646 TRACE:: BacktestingSetupHandler.Setup(): Setting up job: Plan: Free, UID: 29444, PID: 709879848, Version:
2.5.0.0, Source: WebIDE
20210814 23:55:49.655 TRACE:: Config.Get(): Configuration key not found. Key: security-data-feeds - Using default value:
20210814 23:55:49.684 TRACE:: LocalZipMapFileProvider.Get(usa): Fetched map files for: 8/13/2021 NY
20210814 23:55:51.457 TRACE:: Config.GetValue(): data-feed-max-work-weight - Using default value: 400
20210814 23:55:51.459 DEBUG:: DataManager.AddSubscription(): Added ?SPY,SPY,Minute,ZipEntryName,Quote,Raw. Start: 2/1/2020
5:00:00 AM. End: 4/1/2020 3:59:59 AM
20210814 23:55:51.459 TRACE:: Config.GetValue(): data-feed-workers-count - Using default value: 6
20210814 23:55:51.460 TRACE:: WeightedWorkScheduler(): will use 6 workers and MaxWorkWeight is 400
20210814 23:55:51.466 DEBUG:: DataManager.AddSubscription(): Added
QC-UNIVERSE-USERDEFINED-USA-EQUITY,QC-UNIVERSE-USERDEFINED-USA-EQUITY,Minute,TradeBar,Trade,Adjusted,Internal. Start: 2/1/2020
5:00:00 AM. End: 4/1/2020 3:59:59 AM
20210814 23:55:51.482 TRACE:: Config.GetValue(): show-missing-data-logs - Using default value: False
20210814 23:55:51.485 TRACE:: BaseSetupHandler.SetupCurrencyConversions():
Symbol Quantity Conversion = Value in USD
USD: $ 100000.00 @ 1.00 = $100000.0
-------------------------------------------------
CashBook Total Value: $100000.0
20210814 23:55:51.492 TRACE:: SetUp Backtesting: User: 29444 ProjectId: 709879848 AlgoId: 1878990987
20210814 23:55:51.494 TRACE:: Dates: Start: 02/01/2020 End: 03/31/2020 Cash: ¤100,000.00
20210814 23:55:51.498 TRACE:: BacktestingResultHandler(): Sample Period Set: 21.60
20210814 23:55:51.500 TRACE:: Time.TradeableDates(): Security Count: 2
20210814 23:55:51.509 TRACE:: Config.GetValue(): forward-console-messages - Using default value: True
20210814 23:55:51.516 TRACE:: JOB HANDLERS:
20210814 23:55:51.518 TRACE:: DataFeed: QuantConnect.Lean.Engine.DataFeeds.FileSystemDataFeed
20210814 23:55:51.519 TRACE:: Setup: QuantConnect.Lean.Engine.Setup.ConsoleSetupHandler
20210814 23:55:51.521 TRACE:: RealTime: QuantConnect.Lean.Engine.RealTime.BacktestingRealTimeHandler
20210814 23:55:51.523 TRACE:: Results: QuantConnect.Lean.Engine.Results.BacktestingResultHandler
20210814 23:55:51.524 TRACE:: Transactions: QuantConnect.Lean.Engine.TransactionHandlers.BacktestingTransactionHandler
20210814 23:55:51.526 TRACE:: Alpha: QuantConnect.Lean.Engine.Alphas.DefaultAlphaHandler
20210814 23:55:51.527 TRACE:: ObjectStore: QuantConnect.Lean.Engine.Storage.LocalObjectStore
20210814 23:55:51.529 TRACE:: History Provider:
QuantConnect.Lean.Engine.HistoricalData.SubscriptionDataReaderHistoryProvider
20210814 23:55:51.557 TRACE:: Debug: Launching analysis for 1878990987 with LEAN Engine v2.5.0.0
20210814 23:55:51.561 TRACE:: AlgorithmManager.Run(): Begin DataStream - Start: 2/1/2020 12:00:00 AM Stop: 3/31/2020 11:59:59 PM
20210814 23:55:59.368 DEBUG:: DataManager.RemoveSubscription(): Removed ?SPY,SPY,Minute,ZipEntryName,Quote,Raw
20210814 23:55:59.392 DEBUG:: Synchronizer.SubscriptionFinished(): Finished subscription:?SPY,SPY,Minute,ZipEntryName,Quote,Raw
at 2/1/2020 5:00:00 AM UTC
20210814 23:56:01.693 TRACE:: LocalZipFactorFileProvider.Get(usa): Fetched factor files for: 8/13/2021 NY
20210814 23:56:01.695 DEBUG:: DataManager.AddSubscription(): Added SPY,SPY,Minute,TradeBar,Trade,Raw. Start: 2/1/2020 5:00:00
AM. End: 4/1/2020 3:59:59 AM
20210814 23:56:01.698 DEBUG:: DataManager.AddSubscription(): Added SPY,SPY,Minute,QuoteBar,Quote,Raw. Start: 2/1/2020 5:00:00
AM. End: 4/1/2020 3:59:59 AM
20210814 23:56:01.703 DEBUG:: UniverseSelection.ApplyUniverseSelection(): 2/1/2020 5:00:00 AM: SecurityChanges: Added: SPY
R735QTJ8XC9X
20210814 23:56:01.758 DEBUG:: DataManager.AddSubscription(): Added GOOG,GOOG,Hour,TradeBar,Trade,Adjusted,Internal. Start:
1/31/2020 5:00:00 AM. End: 4/1/2020 3:59:59 AM
20210814 23:56:01.759 TRACE:: UniverseSelection.AddPendingInternalDataFeeds(): Adding internal benchmark data feed
GOOG,GOOG,Hour,TradeBar,Trade,Adjusted,Internal
20210814 23:56:01.763 DEBUG:: DataManager.RemoveSubscription(): Removed GOOG,GOOG,Hour,TradeBar,Trade,Adjusted,Internal
20210814 23:56:01.764 DEBUG:: Synchronizer.SubscriptionFinished(): Finished
subscription:GOOG,GOOG,Hour,TradeBar,Trade,Adjusted,Internal at 2/1/2020 5:00:00 AM UTC
20210814 23:56:01.821 DEBUG:: BaseResultsHandler.SamplePerformance(): 5:00 AM >0
20210814 23:56:01.824 TRACE:: Debug: Warning: SetBenchmark(GOOG): no existing symbol found, benchmark security will be added
with Equity type.
Warning: The following securities were set to raw price normalization mode to work with options: SPY...
20210814 23:56:01.889 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:01.932 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:01.967 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:01.998 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.030 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.059 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.089 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.120 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.152 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.186 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.211 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.239 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.262 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.290 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.317 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.341 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.371 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.396 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.425 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.449 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.474 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.498 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.524 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.555 DEBUG:: BaseResultsHandler.SamplePerformance(): 9:00 PM >0
20210814 23:56:02.582 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.608 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.636 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.658 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.690 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.721 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.745 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.773 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.803 DEBUG:: DataManager.RemoveSubscription(): Removed SPY,SPY,Minute,TradeBar,Trade,Raw
20210814 23:56:02.804 DEBUG:: Synchronizer.SubscriptionFinished(): Finished subscription:SPY,SPY,Minute,TradeBar,Trade,Raw at
3/20/2020 4:00:00 AM UTC
20210814 23:56:02.806 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.808 DEBUG:: AlgorithmManager.Run(): 3/20/2020 12:00:00 AM: Applying Dividend: Dividend: SPY: 1.41 | 240.51
20210814 23:56:02.839 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0.00
20210814 23:56:02.861 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.887 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.913 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.939 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.964 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:02.987 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:03.013 DEBUG:: DataManager.RemoveSubscription(): Removed SPY,SPY,Minute,QuoteBar,Quote,Raw
20210814 23:56:03.015 DEBUG:: Synchronizer.SubscriptionFinished(): Finished subscription:SPY,SPY,Minute,QuoteBar,Quote,Raw at
3/31/2020 8:00:00 PM UTC
20210814 23:56:03.018 TRACE:: Synchronizer.GetEnumerator(): Exited thread.
20210814 23:56:03.020 TRACE:: AlgorithmManager.Run(): Firing On End Of Algorithm...
20210814 23:56:03.025 DEBUG:: BaseResultsHandler.SamplePerformance(): 8:00 PM >0
20210814 23:56:03.027 TRACE:: Engine.Run(): Exiting Algorithm Manager
20210814 23:56:03.030 DEBUG:: DataManager.RemoveSubscription(): Removed
QC-UNIVERSE-USERDEFINED-USA-EQUITY,QC-UNIVERSE-USERDEFINED-USA-EQUITY,Minute,TradeBar,Trade,Adjusted,Internal
20210814 23:56:03.034 TRACE:: FileSystemDataFeed.Exit(): Start. Setting cancellation token...
20210814 23:56:03.038 TRACE:: FileSystemDataFeed.Exit(): Exit Finished.
20210814 23:56:03.041 TRACE:: DefaultAlphaHandler.Exit(): Exiting...
20210814 23:56:03.048 TRACE:: DefaultAlphaHandler.Exit(): Ended
20210814 23:56:03.050 TRACE:: Debug: Algorithm Id:(1878990987) completed in 11.50 seconds at 1k data points per second.
Processing total of 15,936 data points.
20210814 23:56:03.050 TRACE:: BacktestingResultHandler.Exit(): starting...
20210814 23:56:03.053 TRACE:: BacktestingResultHandler.Exit(): Saving logs...
20210814 23:56:03.061 TRACE:: Debug: Your log was successfully created and can be retrieved from: /Results/1878990987-log.txt
20210814 23:56:03.061 TRACE:: StopSafely(): waiting for 'Result Thread' thread to stop...
20210814 23:56:03.062 TRACE:: BacktestingResultHandler.Run(): Ending Thread...
20210814 23:56:03.211 TRACE:: Config.GetValue(): regression-update-statistics - Using default value: False
20210814 23:56:03.213 TRACE::
STATISTICS:: Total Trades 0
STATISTICS:: Average Win 0%
STATISTICS:: Average Loss 0%
STATISTICS:: Compounding Annual Return 0%
STATISTICS:: Drawdown 0%
STATISTICS:: Expectancy 0
STATISTICS:: Net Profit 0%
STATISTICS:: Sharpe Ratio 0
STATISTICS:: Probabilistic Sharpe Ratio 0%
STATISTICS:: Loss Rate 0%
STATISTICS:: Win Rate 0%
STATISTICS:: Profit-Loss Ratio 0
STATISTICS:: Alpha 0
STATISTICS:: Beta 0
STATISTICS:: Annual Standard Deviation 0
STATISTICS:: Annual Variance 0
STATISTICS:: Information Ratio 0
STATISTICS:: Tracking Error 0
STATISTICS:: Treynor Ratio 0
STATISTICS:: Total Fees $0.00
STATISTICS:: Estimated Strategy Capacity $0
STATISTICS:: Lowest Capacity Asset
STATISTICS:: Fitness Score 0
STATISTICS:: Kelly Criterion Estimate 0
STATISTICS:: Kelly Criterion Probability Value 0
STATISTICS:: Sortino Ratio 79228162514264337593543950335
STATISTICS:: Return Over Maximum Drawdown 79228162514264337593543950335
STATISTICS:: Portfolio Turnover 0
STATISTICS:: Total Insights Generated 0
STATISTICS:: Total Insights Closed 0
STATISTICS:: Total Insights Analysis Completed 0
STATISTICS:: Long Insight Count 0
STATISTICS:: Short Insight Count 0
STATISTICS:: Long/Short Ratio 100%
STATISTICS:: Estimated Monthly Alpha Value $0
STATISTICS:: Total Accumulated Estimated Alpha Value $0
STATISTICS:: Mean Population Estimated Insight Value $0
STATISTICS:: Mean Population Direction 0%
STATISTICS:: Mean Population Magnitude 0%
STATISTICS:: Rolling Averaged Population Direction 0%
STATISTICS:: Rolling Averaged Population Magnitude 0%
STATISTICS:: OrderListHash d41d8cd98f00b204e9800998ecf8427e
20210814 23:56:03.214 TRACE:: BacktestingResultHandler.SendAnalysisResult(): Processed final packet
20210814 23:56:03.216 TRACE:: Engine.Run(): Disconnecting from brokerage...
20210814 23:56:03.217 TRACE:: Engine.Run(): Disposing of setup handler...
20210814 23:56:03.219 TRACE:: Engine.Main(): Analysis Completed and Results Posted.
Engine.Main(): Analysis Complete.
20210814 23:56:03.222 TRACE:: Engine.Main(): Packet removed from queue: 1878990987
20210814 23:56:03.224 TRACE:: LeanEngineSystemHandlers.Dispose(): start...
20210814 23:56:03.225 TRACE:: LeanEngineSystemHandlers.Dispose(): Disposed of system handlers.
20210814 23:56:03.226 TRACE:: LeanEngineAlgorithmHandlers.Dispose(): start...
20210814 23:56:03.233 TRACE:: LeanEngineAlgorithmHandlers.Dispose(): Disposed of algorithm handlers.
20210814 23:56:03.235 TRACE:: Program.Main(): Exiting Lean...
Successfully ran 'Options Tutorial' in the 'backtesting' environment and stored the output in 'Options
Tutorial/backtests/2021-08-14_16-55-45'
friley@macbook options-backest %
Jasper van Merle
Hi Frank,
To make your algorithm work locally like it does in the cloud you'll need equity data for the option's underlying security. In the case of your attached backtest that means you need minute SPY trade data, which you can download using the following command:
lean data download --dataset "US Equities" --organization "<your organization>" --data-type "Trade" --ticker "SPY" --resolution "Minute" --start "20200201" --end "20200331"
Frank Riley
I had actually already thought of that and downloaded the SPY data. It still doesn't work. Here is an ls of the SPY data:
Frank Riley
Ok, got it to work. I ran your CLI command, and it looks like it added the trade data in addition to the quote data. I guess both are needed to do a backtest? Why does the CLI download both, but when I downloaded the data interactively, it asked me to choose on only 1?
Jasper van Merle
Hi Frank,
“I guess both are needed to do a backtest?”
For your algorithm you only need SPY equity trade data.
“Why does the CLI download both, but when I downloaded the data interactively, it asked me to choose on only 1?”
I'm not sure what you mean by this. There are basically two ways of downloading data:
Frank Riley
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!