Пример #1
0
        private static StructuredTrade GetTrade()
        {
            var trade = new StructuredTrade();
            var decemberCorn = new Contract(CornProductId, new MonthOfYear(2010, 12));
            var position = -5000;
            var price = 5;
            var swapExpiration = DateTime.Now.Date.AddMonths(1);
            var swap = new Swap(decemberCorn, position, price, swapExpiration);
            trade.AddTrade(swap);

            var payoutAmount = position*1;
            var expirationDate = DateTime.Now.Date;
            var premium = 0.01m;
            var digitalOption = Option.Digital(payoutAmount, expirationDate, Option.OptionType.Call, price, premium);
            trade.AddTrade(digitalOption);

            var optionOnASwap = new Swap(decemberCorn, position, default(decimal), swapExpiration);
            var strike = 6;
            var option = Option.OnSwap(optionOnASwap, expirationDate, Option.OptionType.Call, strike, premium);
            trade.AddTrade(option);

            return trade;
        }
Пример #2
0
 public static Option OnSwap(Swap swap, DateTime expirationDate, OptionType callOrPut, decimal strike, decimal premium)
 {
     return new Option(swap, expirationDate, callOrPut, strike, premium);
 }