public static bool UcfMatches(this IUnrealisedCashFlow lhs, IRealisedCashFlow other, int valueDate, bool isOoc)
 {
     return(lhs.ShortCashFlowType == other.ShortCashFlowType &&
            lhs.PayDate == valueDate
            //&& lhs.CashType==other.CashType
            && lhs.Currency == (isOoc ? lhs.Currency : other.Currency));
     //&& lhs.Amount==other.Amount // match except amount and FX Fix
     //&& lhs.FxFix==other.FxFix;
 }
Beispiel #2
0
        public RealisedCashFlow(IRealisedCashFlow rcf, bool dtd = false, double fxRate = double.NaN, bool round = false)
        {
            _rcf      = rcf;
            FxRate    = fxRate;
            LtdAmount = _rcf.LtdAmount;
            DtdAmount = _rcf.DtdAmount;
            FinAmt    = dtd ? DtdAmount : DtdAmount * FxFix;
            USDAmt    = FxRate == 0 ? double.NaN : FinAmt / FxRate;

            if (round)
            {
                Round();
            }
        }