Hi All,
Not sure if this is a bug or I missing a switch in the command:
lean data generate --start 20000101 --symbol-count 1 --security-type Equity --resolution Daily --include-coarse TRUE --market USA --update
this command generates extra columns in addition to Date+OHLC that is causing the “(String '1002900' was not recognized as a valid DateTime.)” error, feel free to correct me if I'm wrong.
here's the error:
20220511 16:29:20.521 ERROR:: CoarseUniverseGeneratorProgram.Run(): CoarseUniverseGeneratorProgram.Run(): FAILED! System.AggregateException: One or more errors occurred. (String '1004300'
was not recognized as a valid DateTime.) (String '1002900' was not recognized as a valid DateTime.)
---> System.FormatException: String '1004300' was not recognized as a valid DateTime.
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.ParseDailyFile(FileInfo dailyFile) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:line 333
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.<>c__DisplayClass9_0.<Run>b__0(SecurityIdentifierContext sidContext) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:line 164
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()
--- End of inner exception stack trace ---
at System.Threading.Tasks.TaskReplicator.Run[TState](ReplicatableUserAction`1 action, ParallelOptions options, Boolean stopOnFirstFailure)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3
bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.ThrowSingleCancellationExceptionOrOtherException(ICollection exceptions, CancellationToken cancelToken, Exception otherException)
at System.Threading.Tasks.Parallel.PartitionerForEachWorker[TSource,TLocal](Partitioner`1 source, ParallelOptions parallelOptions, Action`1 simpleBody, Action`2 bodyWithState, Action`3
bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally)
at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body)
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.Run() in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:line 138
---> (Inner Exception #1) System.FormatException: String '1002900' was not recognized as a valid DateTime.
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.ParseDailyFile(FileInfo dailyFile) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:line 333
at QuantConnect.ToolBox.CoarseUniverseGenerator.CoarseUniverseGeneratorProgram.<>c__DisplayClass9_0.<Run>b__0(SecurityIdentifierContext sidContext) in
/LeanCloud/CI.Builder/bin/Debug/src/QuantConnect/Lean/ToolBox/CoarseUniverseGenerator/CoarseUniverseGeneratorProgram.cs:line 164
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
at System.Threading.Tasks.TaskReplicator.Replica.Execute()<---
20220511 16:29:20.523 TRACE:: RandomDataGeneratorProgram(): Press any key to exit...
this how the generated data looks like in the csv: (C:\LeanCLI\data\equity\usa\daily)
Please help…
Thanks
DipTrader
This is a copy of the generated data file:
https://www.dropbox.com/s/s0oxrr6mxgr6f1j/vqw.zip?dl=1
Alexandre Catarino
Hi DipTrader ,
Thank you for your patience.
This issue was solved by the following patch:
Do not generate Equity Quote Daily data #6483
Best regards,
Alex
DipTrader
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!