我如何构建SAS循环以获取要付款的数量?
希望你能帮我。
下表希望通过使用SAS代码来显示我想获得的结果。 基本上,这是关于计算分期付款的数量,从10.000欧元开始,为10年的利率为6%,在每个时期结束时支付固定分期付款。
fiele_installment | 758,68 | 兴趣 | capital_paid | loan_paid | to_be_paid |
---|---|---|---|---|---|
1 | 1.358,68 | 600,00 | 758,68 | € | 9.241,32 |
2 | € | 758,68 | € | € | € |
1.358,68 | € ,68欧元 | 506,23€ | 852,45€ | 2.415,33€ | 7.584,67€ |
1.358,68 | € | 455,08 | € | 3.318,93€3.318,93 | 6.681,07 |
4 | 欧元 | € | 903,60 ,82欧元 | 4.276,75€ | 5.723,25€ |
6 | 1.358,68€ | 343,40€ | 1.015,28€ | 5.292,03€ | 4.707,97€ |
7 | 1.358,68€ | 7 | 1.358,68 | € | 282,48 ,77€ |
8 | 1.358,68€ | 217,91€ | 1.140,77€ | 7.509,01€ | 2.490,99€ |
1.358,68 | 欧元 | 149,46欧元 | 1.209,22 | € | 8.718,23€ |
9 | 8.718,23 | 76,91欧元 | 1.281,77€ | 10.000,00€ | 0,00€0,00欧元 |
的利息是通过将6%的利率乘以PAR_VALUE获得的;
Capital_paid是分期付款和给定年份支付的利息之间的差额。
Loan_paid是每年获得付款的资本部分的总和。
TO_BE_PAID是支付在给定年份的资本之间的差额(第一排第一年的价值为10000-1358,68)。
hope you can help me.
The below table wants to show the result I want to get by using a sas code.
Basically, it's about calculating the amount of an installment, starting from par_value of 10.000€, with 6% interest rate for 10 years, paying a fixed installment at the end of each period.
year | fixed_installment | interests | capital_paid | loan_paid | to_be_paid |
---|---|---|---|---|---|
1 | 1.358,68 € | 600,00 € | 758,68 € | 758,68 € | 9.241,32 € |
2 | 1.358,68 € | 554,48 € | 804,20 € | 1.562,88 € | 8.437,12 € |
3 | 1.358,68 € | 506,23 € | 852,45 € | 2.415,33 € | 7.584,67 € |
4 | 1.358,68 € | 455,08 € | 903,60 € | 3.318,93 € | 6.681,07 € |
5 | 1.358,68 € | 400,86 € | 957,82 € | 4.276,75 € | 5.723,25 € |
6 | 1.358,68 € | 343,40 € | 1.015,28 € | 5.292,03 € | 4.707,97 € |
7 | 1.358,68 € | 282,48 € | 1.076,20 € | 6.368,23 € | 3.631,77 € |
8 | 1.358,68 € | 217,91 € | 1.140,77 € | 7.509,01 € | 2.490,99 € |
9 | 1.358,68 € | 149,46 € | 1.209,22 € | 8.718,23 € | 1.281,77 € |
10 | 1.358,68 € | 76,91 € | 1.281,77 € | 10.000,00 € | 0,00 € |
interests is obtained by multiplying the 6% interest rate per the par_value;
capital_paid is the difference between the installment and the interest paid for a given year.
loan_paid is the sum of the parts of the capital each year that got paid.
to_be_paid is the difference between the capital to pay at given year minus the capital_paid (the value of the first year in the first row is 10000-1358,68).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你尝试了什么?
我可以提出这样的建议:
What did you tried?
I can propose something like this: