Financial.FV(Double, Double, Double, Double, DueDate) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一值,该值基于等额分期付款和固定利率指定年金的终值。
public static double FV (double Rate, double NPer, double Pmt, double PV = 0, Microsoft.VisualBasic.DueDate Due = Microsoft.VisualBasic.DueDate.EndOfPeriod);
static member FV : double * double * double * double * Microsoft.VisualBasic.DueDate -> double
Public Function FV (Rate As Double, NPer As Double, Pmt As Double, Optional PV As Double = 0, Optional Due As DueDate = Microsoft.VisualBasic.DueDate.EndOfPeriod) As Double
参数
- Rate
- Double
必需。 每期的利率。 例如,如果您的汽车贷款的年利率 (APR) 为 10%,按月还款,则每期利率为 0.1/12(即 0.0083)。
- NPer
- Double
必需。 年金付款总期数。 例如,如果您的汽车贷款的期限为四年,按月还款,则这笔贷款共有 4 * 12(即 48)个支付周期。
- Pmt
- Double
必需。 每期应付金额。 付款金额通常包含本金和利息,该值在年金的有效期限内都不会改变。
- PV
- Double
可选。 未来一系列付款金额(或一次付清款项)的现值。 例如,如果您贷款买车,贷款额就是您将以按月还款的方式付给贷方的现值。 如果省略,则假定为 0。
- Due
- DueDate
可选。 DueDate 类型的对象指定付款何时到期。 如果在付款期末付款,则此参数必须为 DueDate.EndOfPeriod
;如果在付款期初付款,则此参数必须为 DueDate.BegOfPeriod
。 如果省略,则假定为 DueDate.EndOfPeriod
。
返回
基于等额分期付款和固定利率的年金的终值。
示例
本示例使用 FV
函数返回投资的未来价值,因为给定每个周期 APR / 12
() 累积的百分比率、 () 的付款 TotPmts
总数、付款 Payment
() 、投资 PVal
() 的当前值,以及一个数字,指示付款是在付款期 PayType
的开头还是结束 () 。 请注意,由于 Payment
表示付款的现金,所以它是负数。
Sub TestFV()
Dim TotPmts As Integer
Dim Payment, APR, PVal, Fval As Double
Dim PayType As DueDate
Dim Response As MsgBoxResult
' Define money format.
Dim Fmt As String = "###,###,##0.00"
Payment = CDbl(InputBox("How much do you plan to save each month?"))
APR = CDbl(InputBox("Enter the expected interest annual percentage rate."))
' Ensure proper form.
If APR > 1 Then APR = APR / 100
TotPmts = CInt(InputBox("For how many months do you expect to save?"))
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
PVal = CDbl(InputBox("How much is in this savings account now?"))
Fval = FV(APR / 12, TotPmts, -Payment, -PVal, PayType)
MsgBox("Your savings will be worth " & Format(Fval, Fmt) & ".")
End Sub
注解
年金是一系列固定现金支付随时间推移。 年金可以是贷款 (,如住房抵押贷款) 或投资 (,如每月储蓄计划) 。
Rate
必须使用以相同单位表示的付款周期来计算参数NPer
。 例如,如果使用 Rate
月份计算, NPer
还必须使用月份来计算。
对于所有参数,现金支付 (,如存款储蓄) 以负数表示:收到现金 ((如股息检查) )由正数表示。