31 public static void Main(
string[] args)
34 var destinationDir =
Config.
Get(
"results-destination-folder");
35 if (!
string.IsNullOrEmpty(destinationDir))
37 Directory.CreateDirectory(destinationDir);
38 Log.
FilePath = Path.Combine(destinationDir,
"log.txt");
43 if (optionsObject.Count == 0)
45 PrintMessageAndExit();
52 var factorFileProvider
56 factorFileProvider.Initialize(mapFileProvider, dataProvider);
58 var targetApp = GetParameterOrExit(optionsObject,
"app").ToLowerInvariant();
59 if (targetApp.Contains(
"download") || targetApp.EndsWith(
"dl"))
61 var fromDate =
Parse.
DateTimeExact(GetParameterOrExit(optionsObject,
"from-date"),
"yyyyMMdd-HH:mm:ss");
62 var resolution = optionsObject.ContainsKey(
"resolution") ? optionsObject[
"resolution"].ToString() :
"";
63 var market = optionsObject.ContainsKey(
"market") ? optionsObject[
"market"].ToString() :
"";
64 var securityType = optionsObject.ContainsKey(
"security-type") ? optionsObject[
"security-type"].ToString() :
"";
66 var toDate = optionsObject.ContainsKey(
"to-date")
72 PrintMessageAndExit(1,
"ERROR: Unrecognized --app value");
81 case "algoseekfuturesconverter":
85 case "kaikodataconverter":
87 GetParameterOrExit(optionsObject,
"date"),
88 GetParameterOrDefault(optionsObject,
"exchange",
string.Empty));
91 case "coarseuniversegenerator":
95 case "randomdatagenerator":
98 GetParameterOrExit(optionsObject,
"start"),
99 GetParameterOrExit(optionsObject,
"end"),
100 GetParameterOrDefault(optionsObject,
"symbol-count",
null),
101 GetParameterOrDefault(optionsObject,
"market",
null),
102 GetParameterOrDefault(optionsObject,
"security-type",
"Equity"),
103 GetParameterOrDefault(optionsObject,
"resolution",
"Minute"),
104 GetParameterOrDefault(optionsObject,
"data-density",
"Dense"),
105 GetParameterOrDefault(optionsObject,
"include-coarse",
"true"),
106 GetParameterOrDefault(optionsObject,
"quote-trade-ratio",
"1"),
107 GetParameterOrDefault(optionsObject,
"random-seed",
null),
108 GetParameterOrDefault(optionsObject,
"ipo-percentage",
"5.0"),
109 GetParameterOrDefault(optionsObject,
"rename-percentage",
"30.0"),
110 GetParameterOrDefault(optionsObject,
"splits-percentage",
"15.0"),
111 GetParameterOrDefault(optionsObject,
"dividends-percentage",
"60.0"),
112 GetParameterOrDefault(optionsObject,
"dividend-every-quarter-percentage",
"30.0"),
113 GetParameterOrDefault(optionsObject,
"option-price-engine",
"BaroneAdesiWhaleyApproximationEngine"),
114 GetParameterOrDefault(optionsObject,
"volatility-model-resolution",
"Daily"),
115 GetParameterOrDefault(optionsObject,
"chain-symbol-count",
"1"),
121 PrintMessageAndExit(1,
"ERROR: Unrecognized --app value");