/// <summary> /// Initializes a new instance of the <see cref="Strike"/> class. /// </summary> /// <param name="style">The style.</param> /// <param name="strikePrice">The strike price.</param> public Strike(OptionType style, Double strikePrice) { InputValidator.EnumTypeNotSpecified("Option Type", style, true); InputValidator.NotZero("Strike Price", strikePrice, true); Style = style; StrikePrice = strikePrice; }
/// <summary> /// Transactions the complete. /// </summary> /// <param name="transaction">The transaction.</param> internal static void TransactionComplete(TransactionDetail transaction) { InputValidator.NotZero("Spot Price", transaction.CurrentSpot, true); InputValidator.NotNull("Trade Date", transaction.TradeDate, true); InputValidator.NotNull("Expiry Date", transaction.ExpiryDate, true); InputValidator.EnumTypeNotSpecified("Pay Style", transaction.PayStyle, true); if (transaction.ExpiryDate <= transaction.TradeDate) { throw new InvalidValueException( $"Expiry date {transaction.ExpiryDate} must fall after the Trade Darte {transaction.TradeDate}"); } }