P2P高利率理财产品品的年化率高吗?有没有什么算法,我想算一下。。。

全台代码(1)
p2p一般按年化率来计算投资收益,下面是一个简单的算法计算天标、月标、年标的收益。
public class Arith{
public double computeIncomeAmount(){
double incomeAmount = 0.00;
double apr=15
int periodUnit =0
int period=1
switch (periodUnit) {
incomeAmount = Arith.round(apr / 100 * period * investAmount, 2);
incomeAmount = Arith.round(apr / 12 / 100 * period * investAmount,
incomeAmount = Arith.round(apr / 360 / 100 * period * investAmount,
return incomeA
* 功能:提供精确的小数位四舍五入处理。
* v 需要四舍五入的数字
* scale 小数点后保留几位
* 四舍五入后的结果
public static double round(double v, int scale) {
if (scale & 0) {
throw new IllegalArgumentException("精确度不能小于0!");
BigDecimal b = new BigDecimal(Double.toString(v));
return b.setScale(scale,BigDecimal.ROUND_HALF_UP).doubleValue();
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:9326次
排名:千里之外
(1)(2)(1)(1)(2)(1)(1)(3)推荐这篇日记的豆列
······

我要回帖

更多关于 理财产品的年化收益率 的文章

 

随机推荐