/// <summary>
 /// Adds the specified underlying.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="underlying">The underlying.</param>
 /// <param name="weight">The shares.</param>
 public void Add <T>(Underlying <T> underlying, decimal weight) where T : Security
 {
     Add(underlying.Security, weight);
 }
Exemple #2
0
 /// <summary>
 /// Options the ticker.
 /// </summary>
 /// <param name="underlying">The underlying.</param>
 /// <param name="expiration">The expiration.</param>
 /// <returns></returns>
 private static string OptionTicker(Underlying <T> underlying, DateTime expiration)
 {
     return(underlying.ToString() +
            expiration.ToDateCode() +
            expiration.SafeSubstring(3, 2));
 }
Exemple #3
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="Option{T}" /> class.
 /// </summary>
 /// <param name="type"> the type of option </param>
 /// <param name="rights"> The rights. </param>
 /// <param name="underlying"> The underlying. </param>
 /// <param name="strikePrice"> The strike price. </param>
 /// <param name="expiration"> The expiration. </param>
 public EquityOption(OptionType type, OptionRights rights, Underlying <Equity> underlying, decimal strikePrice, DateTime expiration)
     : base(type, rights, underlying, strikePrice, expiration)
 {
 }
Exemple #4
0
 /// <summary>
 /// Options the name.
 /// </summary>
 /// <param name="rights">The rights.</param>
 /// <param name="underlying">The underlying.</param>
 /// <param name="strike"> </param>
 /// <returns></returns>
 private static string OptionName(OptionRights rights, Underlying <T> underlying, decimal strike)
 {
     return(rights + " " + underlying.Security.Name + " @ " + strike);
 }