自己写了个程序,算了下招财宝的约定年化收益率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("
");
varx=10000,y=12,z=(x/y).toFixed(2);//本金,时长(月),每月返还本金数
varp=0.063;//约定年化收益率
vars1=0,s2=0;//累计已归还本金,累计已归还收益
varm=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(vari=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("
");
说明:以上代码并没有什么卵用,仅供娱乐和学习参考。