Lean  $LEAN_TAG$
OptimizerArgumentParser.cs
1 /*
2  * QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
3  * Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14 */
15 
16 using System.Collections.Generic;
17 using McMaster.Extensions.CommandLineUtils;
18 
20 {
21  /// <summary>
22  /// Command Line arguments parser for Lean Optimizer
23  /// </summary>
24  public static class OptimizerArgumentParser
25  {
26  private const string ApplicationName = "Lean Optimizer";
27 
28  private const string ApplicationDescription = "Lean Optimizer is a strategy optimization engine for algorithms.";
29 
30  private const string ApplicationHelpText = "If you are looking for help, please go to https://www.quantconnect.com/lean/docs";
31 
32  private static readonly List<CommandLineOption> Options = new List<CommandLineOption>
33  {
34  new CommandLineOption("estimate", CommandOptionType.NoValue, "Estimate the optimization run time")
35  };
36 
37  /// <summary>
38  /// Parse and construct the args
39  /// </summary>
40  public static Dictionary<string, object> ParseArguments(string[] args)
41  {
42  return ApplicationParser.Parse(ApplicationName, ApplicationDescription, ApplicationHelpText, args, Options);
43  }
44  }
45 }