自己写了个程序,算了下招财宝的约定年化收益率6.30%(按月等额本金还款),发现相当于到期一次性还本付息的年化收益率3.4128%,感觉自己被坑了。。。
以下为JS代码,以本金10000元,期限1年为例:
document.writeln("
document.writeln("
");document.writeln("
月份");document.writeln("
剩余本金");document.writeln("
已归还本金");document.writeln("
已归还收益");document.writeln("
累计已归还本金");document.writeln("
累计已归还收益");document.writeln("
");var x=10000,y=12,z=(x/y).toFixed(2); //本金,时长(月),每月返还本金数
var p=0.063; //约定年化收益率
var s1=0,s2=0; //累计已归还本金,累计已归还收益
var m=x,n; //剩余本金,已归还收益
document.writeln("
");document.writeln("
0");document.writeln("
" + x + "");document.writeln("
0");document.writeln("
0");document.writeln("
0");document.writeln("
0");document.writeln("
");for(var i=1; i<=y; i++){
document.writeln("
");document.writeln("
" + i + ""); //月份n=(x*p/12).toFixed(2); //已归还收益
x=(x-z).toFixed(2); //剩余本金
document.writeln("
" + x + ""); //剩余本金document.writeln("
" + z + ""); //已归还本金document.writeln("
" + n + ""); //已归还收益s1=(Number(s1)+Number(z)).toFixed(2); //累计已归还本金
document.writeln("
" + s1 + ""); //累计已归还本金s2=(Number(s2)+Number(n)).toFixed(2); //累计已归还收益
document.writeln("
" + s2 + ""); //累计已归还收益document.writeln("
");}
document.writeln("
");说明:以上代码并没有什么卵用,仅供娱乐和学习参考。