コード例 #1
0
 public virtual double Capital(Loan loan)
 {
     return(RiskAmount(loan) * Duration(loan) * RiskFactorFor(loan));
 }
コード例 #2
0
 public virtual double Duration(Loan loan)
 {
     return(YearsTo(loan.Expiry, loan));
 }
コード例 #3
0
 protected double RiskFactorFor(Loan loan)
 {
     return(RiskFactor.GetFactors().ForRating(loan.RiskRating));
 }
コード例 #4
0
 protected double YearsTo(DateTime endDate, Loan loan)
 {
     return(endDate.Subtract(loan.Start).Days / DAYS_PER_YEAR);
 }
コード例 #5
0
 protected abstract double RiskAmount(Loan loan);