public ActionResult <decimal> ZSpread(PlainListTermCashFlowSet cashFlowSet) { var cashFlowList = new ListTermCashflowSet(cashFlowSet.cashflowSet, cashFlowSet.termType); var res = new ZSpread(cashFlowList, cashFlowSet.nominal); var result = res.CalculateZspread(); return(result); }
AnnuityPresentValue(PlainListTermCashFlowSet cashFlowSet, int days, decimal nominal) { var cashFlowList = new ListTermCashflowSet(cashFlowSet.cashflowSet, cashFlowSet.termType); Annuity annuity = new Annuity(cashFlowList, days); var result = annuity.GetPV(); return(result); }