Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Stock"/> class.
 /// </summary>
 /// <param name="spot"></param>
 /// <param name="assetId">The asset id.</param>
 /// <param name="name">The name.</param>
 /// <param name="today"></param>
 /// <param name="rateCurve"></param>
 /// <param name="divCurve"></param>
 /// <example>
 ///     <code>
 ///     // Creates a BHP stock instance
 ///     IStock stock = new Stock("123", "BHP");
 ///     </code>
 /// </example>
 public Stock(DateTime today, decimal spot, string assetId, string name, RateCurve rateCurve, List <Dividend> divCurve)
 {
     Valuations = new List <Valuation>();
     InputValidator.IsMissingField("AssetId", assetId, true);
     InputValidator.IsMissingField("Name", name, true);
     AssetId   = assetId;
     Name      = name;
     RateCurve = rateCurve;
     Dividends = divCurve;
     Date      = today;
     Spot      = spot;
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LeadStock"/> class.
 /// </summary>
 /// <param name="spot"></param>
 /// <param name="id">The id.</param>
 /// <param name="name">The name.</param>
 /// <param name="date"></param>
 /// <param name="rc"></param>
 /// <param name="dc"></param>
 /// <example>
 ///     <code>
 ///     // Creates a BHP lead stock instance
 ///     IStock stock = new Stock("123", "BHP");
 ///     </code>
 /// </example>
 public LeadStock(DateTime date, decimal spot, string id, string name, RateCurve rc, List <Dividend> dc) : base(date, spot, id, name, rc, dc)
 {
 }