17 using System.Collections.Generic;
31 private readonly List<IAlphaModel> _alphaModels =
new List<IAlphaModel>();
39 if (alphaModels.IsNullOrEmpty())
41 throw new ArgumentException(
"Must specify at least 1 alpha model for the CompositeAlphaModel");
44 _alphaModels.AddRange(alphaModels);
53 if (alphaModels.IsNullOrEmpty())
55 throw new ArgumentException(
"Must specify at least 1 alpha model for the CompositeAlphaModel");
58 foreach (var pyAlphaModel
in alphaModels)
69 : this(new[] { alphaModel} )
84 foreach (var model
in _alphaModels)
86 var name = model.GetModelName();
87 foreach (var insight
in model.Update(algorithm, data))
89 if (
string.IsNullOrEmpty(insight.SourceModel))
92 insight.SourceModel = name;
108 foreach (var model
in _alphaModels)
110 model.OnSecuritiesChanged(algorithm, changes);
120 _alphaModels.Add(alphaModel);
130 if (!pyAlphaModel.TryConvert(out alphaModel))
134 _alphaModels.Add(alphaModel);