在家宅久了,想寫點代碼,算什麼好呢?算算LPR吧
這有啥算頭?
算固定利率和LPR哪個划算?算等額本息和等額本金哪種方式划算:我們要用總還款的當前幣值折現值(未來花的錢相當於現在支出多少)來比較,還要在不同通脹情況下的折現值來體現各種方式的特點。
下面就讓我來算算吧,有錯請朋友們不吝指教~~
——————————————————————————正文分割線————————————————————
公式介紹:
LPR切換前,使用固定利率(當前是4.75%)——
等額本息還款方式:月供=本金*月利率*(1+月利率)^總貸款月數/[(1+月利率)^總貸款月數-1]
等額本金還款方式:月供=本金/總貸款月數+剩餘本金*月利率
LPR切換後,使用浮動利率(這裏就先考慮一年調整一次LPR的方式)——
等額本息還款方式(每年一調):月供=年剩餘本金*LPR*(1+LPR)^(剩餘年月數)/[(1+LPR)^(剩餘年月數)-1]
等額本金還款方式:月供=本金/總貸款月數+剩餘本金*LPR
注意的是:
每月所還的利息部分=貸款剩餘本金*月利率
每月所還本金部分=月供-每月所還的利息部分
公式參考來源(有更好的信息請補充更正~):
https://www.cnblogs.com/lixuwu/p/11125517.html
https://zhidao.baidu.com/question/428849979409866612.html
https://www.u8see.com/housetool.asp
https://zhidao.baidu.com/question/487889702484427292.html
https://www.rong360.com/baike/21.html#3
——————————————————————————公式升級————————————————————
我們關心的是總還款的折現值,所以現在給出計算公式:
還款總額折現值=sum(月供/累乘(1+月通脹率))
——————————————————————————代碼仿真————————————————————
以200萬貸款,30年還款爲例,當前利率4.75%,未來通脹率等於LPR 的整數倍(實際有不同說法,是否線性關係也請專業朋友指教?),而LPR的調整方向分爲3種——不變,降低,升高
下表是計算結果的統計表格:
根據表格,我的結論是:
1、通脹率有幾種表述——統計局給的CPI指數/央行統計的通脹率/實際購買力縮減程度——大概率當前的經濟情況和全球的低利率趨勢,通脹率可能出現較大值,因此,我個人願意取更大的通脹率結果。
2、通脹率>LPR,LPR增大 優於 LPR鎖定 優於LPR降低(非常反直覺!!!!!!!!也和網上的專家說的不一樣!!請有不同意見的同學來拍磚!)
3、等額本息 整體優於 等額本金
4、除了考慮折現款總額,還要看還款金額的變化趨勢,對當前家庭現金流的影響,如果有投資理財,還要考慮投資回報率來決定現金流最優方式。
5、LPR下降,等額本息月供減少,等額本金月供減少加快。LPR上升,等額本息月供增加,等額本金月供減少變慢。通脹率對月供無影響。月供對家庭現金流的影響受到還款方式和LPR決定。
本金 | 還款方式 | LPR月利率/通脹率 | 月供 | 總還款 |
總折現款(按LPR通脹) |
總折現款(按通脹率=2*LPR) | 總折現款(按通脹率=4*LPR) | |
200萬 | 等額本息 | 不變4.75% | 10432 | 3755860 | 2000000 | 1240755 | 656617 | |
降低4.75%勻降到0.5% | 10432~7958 | 3172902 | 1999997 | 1343253 | 724197 | |||
升高4.75%勻升到8% | 10432~12655 | 4257985 | 2000000 | 1191228 | 631003 | |||
等額本金 | 不變4.75% | 13472~5577 | 3428958 | 2000000 | 1330351 | 762237 | ||
降低4.75%勻降到0.5% | 13472~5558 | 3026684 | 2000000 | 1405184 | 814889 | |||
升高4.75%勻升到8% | 13472~5592 | 3736579 | 2000000 | 1295439 | 741351 |
|
下面是代碼鏈接:
https://github.com/yangh2333/-House-property-/blob/master/CalculateHousingLoan
下面是上述表格統計的情況的運行結果:
+++++++++++++++++++++++++++++++++++++等額本息++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=LPR++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.0475
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 10432.946730061847
total payedback is 3755860.8228223836
total conversion back is: 2000000.0000000116
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.005
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 7958.323764604197
total payedback is 3172902.8315327065
total conversion back is: 1999997.7040952134
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.08
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 12655.590181551723
total payedback is 4257985.192792086
total conversion back is: 2000000.9518129409
-------------end------------------------
分析:LPR下行,月供會減少,以後每月的家庭流水壓力逐漸減小。LPR上行,月供增加,流水壓力逐漸增加,但是幅度比較溫和。總之,和大通脹比起來都算很小的漲幅。
+++++++++++++++++++++++++++++++++++++等額本息+++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=2*LPR++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.0475
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 10432.946730061847
total payedback is 3755860.8228223836
total conversion back is: 1240755.7268539048
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.005
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 7958.323764604197
total payedback is 3172902.8315327065
total conversion back is: 1343253.0812919503
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.08
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 12655.590181551723
total payedback is 4257985.192792086
total conversion back is: 1191228.1835512465
-------------end------------------------
+++++++++++++++++++++++++++++++++++++等額本息+++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=4*LPR++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.0475
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 10432.946730061847
total payedback is 3755860.8228223836
total conversion back is: 656617.5359742445
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.005
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 7958.323764604197
total payedback is 3172902.8315327065
total conversion back is: 724197.0108411231
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus_and_interest
LPR change forme 0.0475 to 0.08
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 10432.946730062275
29 year 11 month monthly_payback= 12655.590181551723
total payedback is 4257985.192792086
total conversion back is: 631003.4974365009
-------------end------------------------
分析:通脹不影響月供金額數字。
+++++++++++++++++++++++++++++++++++++等額本金+++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=LPR+++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.0475
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5577.546296296348
total payedback is 3428958.3333333456
total conversion back is: 2000000.0000000165
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.005
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5558.526234567908
total payedback is 3026684.0277777864
total conversion back is: 2000000.0000000086
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.08
inflation rate times is 1
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5592.091049382803
total payedback is 3736579.8611111296
total conversion back is: 2000000.0000000056
-------------end------------------------
分析:等額本金下,LPR降低,月供加速減少。LPR升高,月供減緩減少。
+++++++++++++++++++++++++++++++++++++等額本金++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=2*LPR++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.0475
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5577.546296296348
total payedback is 3428958.3333333456
total conversion back is: 1330351.8914530918
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.005
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5558.526234567908
total payedback is 3026684.0277777864
total conversion back is: 1405184.0172224122
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.08
inflation rate times is 2
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5592.091049382803
total payedback is 3736579.8611111296
total conversion back is: 1295439.227252862
-------------end------------------------
+++++++++++++++++++++++++++++++++++++等額本金+++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++ 通脹率=4*LPR+++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.0475
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5577.546296296348
total payedback is 3428958.3333333456
total conversion back is: 762237.1675692783
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.005
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5558.526234567908
total payedback is 3026684.0277777864
total conversion back is: 814889.3600062618
-------------end------------------------
-------------begin----------------------
----------------------------------------
housing loan is 2000000
housing loan payback years 30
payback method is equality_corpus
LPR change forme 0.0475 to 0.08
inflation rate times is 4
-------------result----------------------
0 year 0 month monthly_payback= 13472.222222222223
29 year 11 month monthly_payback= 5592.091049382803
total payedback is 3736579.8611111296
total conversion back is: 741351.5412335462
-------------end------------------------