SAS 金融函数 PMT IRR

  1. Syntax1
    FINANCE(‘PMT’, rate, nper, pv, , );
    计算年度的定期支付。

rate=存款/贷款每期的利率
specifies the interest rate.
nper =存款/贷款期数
specifies the number of payment periods.
pv =需要存款/贷款的金额
specifies the present value or the lump-sum amount that a series of future payments is worth currently. If pv is omitted, it is assumed to be 0 (zero), and you must include the fv argument.
fv =存款/贷款终值
specifies the future value or a cash balance that you want to attain after the last payment is made. If fv is omitted, it is assumed to be 0 (for example, the future value of a loan is 0).
type 作为指示变量,显示付息情况
specifies the number 0 or 1 and indicates when payments are due. If type is omitted, it is assumed to be 0.

**Example**  : Computing Description: PMT
The following example computes the periodic payment for an annuity.

data _null_;
   rate = 0.08;
   nper = 5;
   pv = 91;
   fv = 3;
   type = 0;
   r = finance('pmt', rate, nper, pv, fv, type);
   put r = ;
run;
The value of r that is returned is -23.30290673.
举例:某同学房贷20万,准备15年还清,年利率为7.5%,则每 
月需还贷多少金额?

rate=0.075/12
nper=15*12
pv=200000
pmt=np.pmt(0.075/12,15*12,200000)
print("每期需要还款:{}元".format(pmt))
-------------------->每期需要还款:-1854.0247200054619元
  1. Syntax2
    FINANCE(‘IRR’, value1, value2, …, value_n);
    计算一系列现金流量的内部回报率

value
specifies a list of numeric arguments that contain numbers for which you want to calculate the internal rate of return.

**Example **: Computing Description: IRR
The following example computes the internal rate of return for 
a series of cash flows.

data _null_;
   v1 = -70000;
   v2 = 12000;
   v3 = 15000;
   v4 = 18000;
   v5 = 21000;
   v6 = 26000;
   r = finance('irr', v1, v2, v3, v4, v5, v6);
   put r = ;
run;
The value of r that is returned is 0.086630948.

版权声明:本文为weixin_43093831原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。