-
03-11-2018, 04:22 PM
#3961
Member
Below is the sort of function im working to get the true number - can anybody see issue ? note the recursion.
static public double CalcInterest(double InterestRate, int Months, double LoanAmount)
{
double TotalInterest = 0;
for (int i = 1; i < Months + 1; i++)
{
double PmtValue = Financial.Pmt(InterestRate / 12, Months, -LoanAmount);
double IPmtValue = Financial.IPmt(InterestRate / 12, i, Months, -LoanAmount);
double PPmtValue = Financial.PPmt(InterestRate / 12, i, Months, -LoanAmount);
TotalInterest += IPmtValue - ( (IPmtValue * 0.175) + (IPmtValue * 0.15) );
if(PPmtValue + IPmtValue > 0.01)
{
TotalInterest = TotalInterest + CalcInterest(InterestRate, Months - i, IPmtValue + PPmtValue);
}
//Console.WriteLine("{0},{1},{2},{3}", i, PmtValue, PPmtValue, IPmtValue);
}
return TotalInterest;
}
-
03-11-2018, 05:02 PM
#3962
yeah, nah
Maybe I'm not getting what you're trying to do but it is a very simple calculation for compound interest.
A VB example here:
http://www.vb-helper.com/howto_calculate_interest.html
-
03-11-2018, 09:58 PM
#3963
Originally Posted by IntheRearWithTheGear
Below is the sort of function im working to get the true number - can anybody see issue ? note the recursion.
static public double CalcInterest(double InterestRate, int Months, double LoanAmount)
{
double TotalInterest = 0;
for (int i = 1; i < Months + 1; i++)
{
double PmtValue = Financial.Pmt(InterestRate / 12, Months, -LoanAmount);
double IPmtValue = Financial.IPmt(InterestRate / 12, i, Months, -LoanAmount);
double PPmtValue = Financial.PPmt(InterestRate / 12, i, Months, -LoanAmount);
TotalInterest += IPmtValue - ( (IPmtValue * 0.175) + (IPmtValue * 0.15) );
if(PPmtValue + IPmtValue > 0.01)
{
TotalInterest = TotalInterest + CalcInterest(InterestRate, Months - i, IPmtValue + PPmtValue);
}
//Console.WriteLine("{0},{1},{2},{3}", i, PmtValue, PPmtValue, IPmtValue);
}
return TotalInterest;
}
Surely what you do is this?
Code:
static public double CalcInterest(double yearlyInterestRateAsPercentage, int monthLengthOfLoan, double originalLoanAmount)
{
// 12: months, 100: percent to decimal
double monthlyInterestRate = yearlyInterestRateAsPercentage/(12.0*100.0);
double monthlyRepayment = Financial.Pmt(monthlyInterestRate, monthLengthOfLoan, -originalLoanAmount);
double totalRepayments = monthlyRepayment * monthLengthOfLoan;
double totalInterest = totalRepayments - originalLoanAmount;
return(totalInterest);
}
-
03-11-2018, 11:07 PM
#3964
yeah, nah
Why use PMT?
It is a simple calculation:
CompInt.jpg
Note: The ^ is to the power of, if it's not obvious?
Last edited by myles; 03-11-2018 at 11:09 PM.
Reason: Note
-
03-11-2018, 11:13 PM
#3965
Member
in repy to Snow Leopard
This one dosnt do the tax and fees for harmony. Where are you investing the returned capital and interest as the loan progresses ? ie the totalrepayments could be another loan at the same investment settings starting up as soon as its returned your account.
I think a fault in my one is that it each "recursive loan" should be out to a full 60 months instead of a diminishing loan duration but the total interest from all subsquent loans should be to the end of the original 60 months.
My original code is coming from the idea of being a borrower and summing the interest payments to the lenders as our "in theory" net income (not taking defaults into account).
Food for thought.
Last edited by IntheRearWithTheGear; 03-11-2018 at 11:15 PM.
-
03-11-2018, 11:17 PM
#3966
yeah, nah
No, the calculation is based on re-investment of the interest - since the Principal remains invested for the entire period it is equivalent to re-investing the Principal that would be returned (as per p2p lending)...
Added: I think your reply may have been to Snow Leopard?
The calculation I provided above is correct and as you can see it's quite simple, but ignores defaults. If you can determine a rate to use for defaults it can be easily added in - this is the difficult part, coming up with a reliable default rate.
[Interest for Period - as I have it, has tax and fees taken out as per the Effective Rate.]
Last edited by myles; 03-11-2018 at 11:29 PM.
Reason: Post Confusion...
-
04-11-2018, 11:51 AM
#3967
Member
Originally Posted by humvee
Well I've sent harmoney a large list of loans that have extremely obvious reporting errors
Broken down into the following main areas
Showing as Paid off but still owe money = 67
Showing as Current but $0 owing = 54
Negitative outstanding principal = 17
They have said "The team has been made aware of the loan IDs and problems with each as detailed in your email and look to have this corrected soon. I don't have a timeframe at this stage as the list of loans with errors is, as stated, large."
Only time will tell how long they will take to fix these
Hi Humvee,
Have you received any more correspondence regarding the errors you reported, or have you seen corrections come through in your reports section? Very curious to know how you got on.
-
04-11-2018, 12:21 PM
#3968
Originally Posted by IntheRearWithTheGear
in repy to Snow Leopard
This one dosnt do the tax and fees for harmony. Where are you investing the returned capital and interest as the loan progresses ? ie the totalrepayments could be another loan at the same investment settings starting up as soon as its returned your account.
...
If that is what you want to calculate then as myles as said it is the simple compounding interest formula you need.
Code:
// monthlyRateOfReturn: monthly interest rate adjusted down for fees, taxes etc
double totalInterest = (Math.Pow(1.0 + monthlyRateOfReturn, months) - 1.0) * originalLoanAmount;
-
05-11-2018, 01:13 PM
#3969
Member
I'm intrigued to know - how does someone go about having 21 enquiries in the last 6 months??
Not trying to denigrate HM/the borrower. Genuinely curious to understand how this arises
Capture.JPG
-
05-11-2018, 01:23 PM
#3970
Member
Originally Posted by leesal
I'm intrigued to know - how does someone go about having 21 enquiries in the last 6 months??
Not trying to denigrate HM/the borrower. Genuinely curious to understand how this arises
Capture.JPG
They shopped around and 20 other lenders said NO or wanted higher interest?!!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|
Bookmarks