Exemplo n.º 1
0
        public override double GetPayoff(SortedList <DateTime, double> prices)
        {
            var priceAtExpiry = prices[ExpiryDate.PrevWorkingDay()];

            if (IsCall)
            {
                return(Math.Max(0, priceAtExpiry - Strike));
            }
            else
            {
                return(Math.Max(0, Strike - priceAtExpiry));
            }
        }