Exemple #1
0
            public PaymentInfo[] Visit(AutoCall autocall)
            {
                var underlyingPayments = autocall.Underlying.Accept(this);
                var redemptionPayments = autocall.CallDates.Map(d => autocall.Redemption(d).Accept(this));

                return(redemptionPayments.Aggregate(underlyingPayments, (prev, d) => prev.Union(d).ToArray()));
            }
Exemple #2
0
            public IFixing[] Visit(AutoCall autocall)
            {
                var underlyingFixings = autocall.Underlying.Accept(this);
                var redemptionFixings = autocall.CallDates.Map(d => autocall.Redemption(d).Accept(this));
                var triggerFixings    = autocall.CallDates.Map(d => autocall.CallTrigger(d).Fixings);

                var mergedFixings = underlyingFixings.MergeWith(redemptionFixings)
                                    .MergeWith(triggerFixings);

                return(mergedFixings.OrderBy(f => f.Date).ToArray());
            }
Exemple #3
0
            public DateTime[] Visit(AutoCall autocall)
            {
                var underlyingDates = autocall.Underlying.Accept(this);
                var redemptionDates = autocall.CallDates.Map(d => autocall.Redemption(d).Accept(this));

                var result = EnumerableUtils.Merge(redemptionDates);

                result = EnumerableUtils.Merge(underlyingDates, result);
                result = EnumerableUtils.Merge(result, autocall.CallDates);
                result = result.OrderBy(d => d).ToArray();
                return(result);
            }