19 using System.Collections.Generic;
78 throw new ArgumentNullException(nameof(settings),
"Settings cannot be null or empty");
83 throw new ArgumentNullException(nameof(random),
"Randomizer cannot be null");
86 switch (settings.SecurityType)
105 if (!
Settings.Tickers.IsNullOrEmpty())
114 for (var i = 0; i <
Settings.SymbolCount; i++)
129 protected abstract IEnumerable<Symbol>
GenerateAsset(
string ticker =
null);
142 throw new ArgumentException(
"Please use OptionSymbolGenerator or FutureSymbolGenerator for SecurityType.Option and SecurityType.Future respectively.");
164 var symbol =
Symbol.
Create(ticker, securityType, market);
165 if (_symbols.Add(symbol))
185 var existingTickers = _symbols
186 .Where(sym => sym.ID.Market == market && sym.ID.SecurityType == securityType)
187 .Select(sym => sym.Value);
191 .Select(kvp => kvp.Key.Symbol), existingTickers)
195 if (availableTickers.Count == 0)
200 return availableTickers[
Random.
NextInt(availableTickers.Count)];
213 var expiry =
Random.
NextDate(minExpiry, maxExpiry, DayOfWeek.Friday);
219 expiry = expiry.AddDays(-1);
233 var str =
string.Empty;
235 for (
int i = 0; i < length; i++)