Home > Article > Backend Development > .NET Framework-detailed introduction to WinForm Mortgage Analyzer (graphics and text)
To buy a house loan, choose equal principal and interest? Or an equal amount of principal? How much interest do each need to pay?
Of the monthly loan repayments, how much is the principal and how much is the interest?
If the loan is for 30 years, can you calculate the monthly repayment details for these 360 months?
Do you know how many ways to repay a large amount? How much money can you save with a balloon payment?
There are two ways to get a loan from a bank: equal principal and equal principal and interest. Equal principal, the principal of the monthly loan repayment is fixed, for example, a loan of 300,000 yuan, repaid in 30 years, the first month’s repayment is about 2,100 yuan, of which the principal is more than 800 yuan and the interest is more than 1,200 yuan. , the principal will be the same every month in the future. This method will generate less interest than the same amount of principal and interest. Equal principal and interest, the monthly principal and interest repayment is fixed, the same loan is 300,000 yuan, and it will be repaid in 30 years. In this way, the monthly repayment is close to 1,600 yuan, although the monthly repayment is more than the equal principal amount. The loan is smaller, but during the repayment cycle, the interest accrued is more than the equivalent principal amount.
The software source code is open source, github download address: Despositor source code: visual studio 2013 C#.net, welcome to download.
Support functions
1) Supports configuration of loan information; 2) Supports two loan methods, loan repayment status and each Monthly details: principal and interest, principal, interest, interest rate; 3) Large-amount repayment, currently only supports one large-amount repayment method: after shortening the repayment cycle, the latest loan repayment status and details; 4) Provide page browsing Display function.
Public 4-layer structure: Lib layer, which provides local storage service for xml loan configuration, business model layer, business logic layer, and interface layer. The main objects include:
Model layer: IMRoot: model root interface; MDebt: loan model base object; MEqualCaptial: equal principal model object; MEqualInterest: Equal principal and interest model object.
Business layer: DebtAnalysis: provides business logic for loan-related analysis; BaseBigRepay; base class for large-amount repayment business analysis. The reason why this object is separated is because of the large-amount repayment There are many ways to repay a loan; ShortMonthsBigRepay: Base class for shortening the period of large-amount repayment; IBigRepayDebt Large-amount repayment interface; ShortMonthsBigRepayS1: The loan method is equal amount of principal Fund; ShortMonthsBigRepayS2: The loan method is equal principal and interest.
Interface layer: BaseDlg: The master page of the page, the root class of all pages; BaseSettingDlg: Loan configuration base dialog box; DebtSettingDlg: Loan configuration Dialog box; DebtAnalysisDlg: Loan analysis dialog box; DetailDebtDlg: Loan details dialog box; MainForm: The main interface of the software.
The UML diagram of the software structure is as follows:
Assumed loan amount 300,000, the loan period is 30 years, the loan method is: equal principal amount, the annual interest rate of the loan is 4.9%, it is assumed that the loan starting date is October 2015.
Open the software. The interface is as shown below. Click "Loan Settings". In this interface, enter the loan information. After setting, click Save to save the configuration information locally.
Next, start analyzing the loan repayment situation, click Loan Analysis, the loan analysis interface is as follows shown. The analysis results show that the repaid amount column shows that the principal and interest repaid: 32,500, the principal repaid: 13,300, and the interest repaid: 19,100. You can see how the bank makes money, right? !
button to get Detailed chart of the repaid amount:
Large loan repayment
As you can see, the initial interest rate for loan repayment is still very high, about 60%. Therefore, if you have some money on hand, it’s better to get more loans! Click the "Repay Loan in Advance" button, enter the large-amount repayment time: "2017-02", enter the large-amount loan repayment amount of 100,000, and click "Calculate".
Obtain the unpaid principal and interest, principal, interest, and save interest. You can see that you can pay less More than 110,000! You can also see from the histogram that we saved a lot of money! ! ! Click "Details" to view the monthly loan repayment status after the large loan repayment in pages:
Time | Principal and interest | Principal | Interest | Interest rate | |
---|---|---|---|---|---|
2019-3 | 1922 | 833 | 1089 | 57% | |
2019-3 | 1514 | 833 | 681 | 45% |
The above is the detailed content of .NET Framework-detailed introduction to WinForm Mortgage Analyzer (graphics and text). For more information, please follow other related articles on the PHP Chinese website!