Financial.PPmt(Double, Double, Double, Double, Double, DueDate) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
定期的な固定支払いと固定利率に基づいて、特定の期間の年金の元金を指定する値を返します。
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
必須。 期間あたりの利率。 たとえば、10 パーセントの年間利率 (APR) で自動車ローンを契約し、月払いで返済を行う場合、1 か月の利率は 0.1/12 (0.0083) になります。
- Per
- Double
必須。 1 ~ NPerの範囲の支払い期間。
- NPer
- Double
必須。 年金の支払期間の合計数。 たとえば、4 年間の自動車ローンで月払いを行う場合、ローンの支払い期間は合計 4 x 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
注釈
これらの関数の対象となる投資は、定額の支払いが定期的に行われることが前提になっています。 投資としては、ローン (住宅ローンなど) または本来の投資 (毎月の貯蓄プランなど) が該当します。
Rate引数とNPer引数は、同じ単位で表される支払期間を使用して計算する必要があります。 たとえば、 Rate が月を使用して計算される場合、 NPer も月を使用して計算する必要があります。
すべての引数について、支払われた現金(預金から預金など)は負の数で表されます。受け取った現金 (配当チェックなど) は正の数値で表されます。