Financial.PPmt(Double, Double, Double, Double, Double, DueDate) 方法

定义

返回一个值,该值基于等额分期付款和固定利率指定年金在给定期间的本金付款额。

public static double PPmt (double Rate, double Per, double NPer, double PV, double FV = 0, Microsoft.VisualBasic.DueDate Due = Microsoft.VisualBasic.DueDate.EndOfPeriod);
static member PPmt : double * double * double * double * double * Microsoft.VisualBasic.DueDate -> double
Public Function PPmt (Rate As Double, Per As Double, NPer As Double, PV As Double, Optional FV As Double = 0, Optional Due As DueDate = Microsoft.VisualBasic.DueDate.EndOfPeriod) As Double

参数

Rate
Double

必需。 每期的利率。 例如,如果您的汽车贷款的年利率 (APR) 为 10%,按月还款,则每期利率为 0.1/12(即 0.0083)。

Per
Double

必需。 1 到 NPer.范围内的支付周期。

NPer
Double

必需。 年金付款总期数。 例如,如果您的汽车贷款的期限为四年,按月还款,则这笔贷款共有 4 * 12(即 48)个支付周期。

PV
Double

必需。 指定未来一系列支出或收入的现值。 例如,如果您贷款买车,贷款额就是您将以按月还款的方式付给贷方的现值。

FV
Double

可选。 完成最后一次付款后所希望的终值或现金余额。 例如,贷款的终值为 $0,这是因为终值是末期还款之后的价值。 但是,如果您想用 18 年的时间存储 $50,000 作为孩子的教育经费,则 $50,000 是终值。 如果省略,则假定为 0。

Due
DueDate

可选。 DueDate 类型的对象指定付款何时到期。 如果在付款期末付款,则此参数必须为 DueDate.EndOfPeriod;如果在付款期初付款,则此参数必须为 DueDate.BegOfPeriod。 如果省略,则假定为 DueDate.EndOfPeriod

返回

基于等额分期付款和固定利率的年金在给定期间的本金付款额。

例外

Per<=0 或 Per>NPer

示例

此示例使用 PPmt 函数来计算当所有付款值相等时,特定期间付款的本金金额。 给定每个周期 (APR / 12) 的利率百分比, 需要本金部分的付款期 (Period) 、 () TotPmts 的付款总数、贷款 () PVal 的现值或本金、贷款 (FVal) 的未来价值,以及指示付款期的开始或结束时 (PayType) 到期的数字。

Sub TestPPMT()
    Dim PVal, APR, TotPmts, Payment, Period, P, I As Double
    Dim PayType As DueDate
    Dim Msg As String
    Dim Response As MsgBoxResult

    ' Define money format.
    Dim Fmt As String = "###,###,##0.00"
    ' Usually 0 for a loan.
    Dim Fval As Double = 0
    PVal = CDbl(InputBox("How much do you want to borrow?"))
    APR = CDbl(InputBox("What is the annual percentage rate of your loan?"))
    ' Ensure proper form.
    If APR > 1 Then APR = APR / 100
    TotPmts = CDbl(InputBox("How many monthly payments do you have to make?"))
    Response = MsgBox("Do you make payments at the end of month?", MsgBoxStyle.YesNo)
    If Response = MsgBoxResult.No Then
        PayType = DueDate.BegOfPeriod
    Else
        PayType = DueDate.EndOfPeriod
    End If
    Payment = Math.Abs(-Pmt(APR / 12, TotPmts, PVal, FVal, PayType))
    Msg = "Your monthly payment is " & Format(Payment, Fmt) & ". "
    Msg = Msg & "Would you like a breakdown of your principal and "
    Msg = Msg & "interest per period?"
    ' See if chart is desired. 
    Response = MsgBox(Msg, MsgBoxStyle.YesNo)
    If Response <> MsgBoxResult.No Then
        If TotPmts > 12 Then MsgBox("Only first year will be shown.")
        Msg = "Month  Payment  Principal  Interest" & Environment.NewLine
        For Period = 1 To TotPmts
            ' Show only first 12.
            If Period > 12 Then Exit For
            P = PPmt(APR / 12, Period, TotPmts, -PVal, FVal, PayType)
            ' Round principal.
            P = (Int((P + 0.005) * 100) / 100)
            I = Payment - P
            ' Round interest.
            I = (Int((I + 0.005) * 100) / 100)
            Msg = Msg & Period & vbTab & Format(Payment, Fmt)
            Msg = Msg & vbTab & Format(P, Fmt) & vbTab & Format(I, Fmt) & Environment.NewLine
        Next Period
        ' Display amortization table.
        MsgBox(Msg)
    End If
End Sub

注解

年金是一段时间内的一系列固定现金付款。 年金可以是贷款 (,如住房抵押贷款) 或投资 (如每月储蓄计划) 。

RateNPer 参数必须使用以相同单位表示的付款期限进行计算。 例如,如果 Rate 是使用月份计算的, NPer 则还必须使用月数进行计算。

对于所有参数,现金支付 (如存款到储蓄) 用负数表示:收到的 (现金(如股息支票) )由正数表示。

适用于

另请参阅