Vous êtes sur la page 1sur 11

Financial Class

Name Description
DDB
Returns a Double specifying the depreciation of an asset for a specific time
period using the double-declining balance method or some other method you
specify.
Equals(Object) Determines whether the specified object is equal to the current object.
FV
Returns a Double specifying the future value of an annuity based on periodic,
fixed payments and a fixed interest rate.
GetHashCode Serves as the default hash function.
GetType Gets the Type of the current instance.
IPmt
Returns a Double specifying the interest payment for a given period of an
annuity based on periodic, fixed payments and a fixed interest rate.
IRR
Returns a Double specifying the internal rate of return for a series of periodic
cash flows (payments and receipts).
MIRR
Returns a Double specifying the modified internal rate of return for a series of
periodic cash flows (payments and receipts).
NPer
Returns a Double specifying the number of periods for an annuity based on
periodic fixed payments and a fixed interest rate.
NPV
Returns a Double specifying the net present value of an investment based on a
series of periodic cash flows (payments and receipts) and a discount rate.
Pmt
Returns a Double specifying the payment for an annuity based on periodic, fixed
payments and a fixed interest rate.
PPmt
Returns a Double specifying the principal payment for a given period of an
annuity based on periodic fixed payments and a fixed interest rate.
PV
Returns a Double specifying the present value of an annuity based on periodic,
fixed payments to be paid in the future and a fixed interest rate.
Rate Returns a Double specifying the interest rate per period for an annuity.
SLN
Returns a Double specifying the straight-line depreciation of an asset for a single
period.
SYD
Returns a Double specifying the sum-of-years digits depreciation of an asset for
a specified period.
ToString Returns a string that represents the current object.


Financial.FV Method
Returns a Double specifying the future value of an annuity based on periodic, fixed payments and a fixed
interest rate.
Public Shared Function FV ( _
Rate As Double, _
NPer As Double, _
Pmt As Double, _
PV As Double, _
Due As DueDate _
) As Double

Parameters
Rate
Type: System.Double
Required. Double specifying interest rate per period. For example, if you get a car loan at
an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per
period is 0.1/12, or 0.0083.
NPer
Type: System.Double
Required. Double specifying total number of payment periods in the annuity. For
example, if you make monthly payments on a four-year car loan, your loan has a total of
4 x 12 (or 48) payment periods.
Pmt
Type: System.Double
Required. Double specifying payment to be made each period. Payments usually contain
principal and interest that doesn't change over the life of the annuity.
PV
Type: System.Double
Optional. Double specifying present value (or lump sum) of a series of future payments.
For example, when you borrow money to buy a car, the loan amount is the present value
to the lender of the monthly car payments you will make. If omitted, 0 is assumed.
Due
Type: Microsoft.VisualBasic.DueDate
Optional. Object of type DueDate that specifies when payments are due. This argument
must be either DueDate.EndOfPeriod if payments are due at the end of the payment
period, or DueDate.BegOfPeriod if payments are due at the beginning of the period. If
omitted, DueDate.EndOfPeriod is assumed.
Return Value
Type: System.Double
Returns a Double specifying the future value of an annuity based on periodic, fixed payments and a fixed
interest rate.
Remarks: An annuity is a series of fixed cash payments made over time. An annuity can be a
loan (such as a home mortgage) or an investment (such as a monthly savings plan).
The Rate and NPer arguments must be calculated using payment periods expressed in the same
units. For example, if Rate is calculated using months, NPer must also be calculated using
months.
For all arguments, cash paid out (such as deposits to savings) is represented by negative
numbers; cash received (such as dividend checks) is represented by positive numbers.
EXAMPLE:
This example uses the FV function to return the future value of an investment given the percentage rate
that accrues per period (APR / 12), the total number of payments (TotPmts), the payment (Payment),
the current value of the investment (PVal), and a number that indicates whether the payment is made at
the beginning or end of the payment period (PayType). Note that because Payment represents cash paid
out, it is a negative number.
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

Financial.PV Method
Returns a Double specifying the present value of an annuity based on periodic, fixed payments to be
paid in the future and a fixed interest rate.
'Declaration
Public Shared Function PV ( _
Rate As Double, _
NPer As Double, _
Pmt As Double, _
FV As Double, _
Due As DueDate _
) As Double

Parameters
Rate
Type: System.Double
Required. Double specifies the interest rate per period. For example, if you get a car loan
at an annual percentage rate (APR) of 10 percent and make monthly payments, the rate
per period is 0.1/12, or 0.0083.
NPer
Type: System.Double
Required. Double specifies the total number of payment periods in the annuity. For
example, if you make monthly payments on a four-year car loan, your loan has 4 x 12 (or
48) payment periods.
Pmt
Type: System.Double
Required. Double specifies the payment to be made each period. Payments usually
contain principal and interest that does not change during the life of the annuity.
FV
Type: System.Double
Optional. Double specifies the future value or cash balance you want after you make the
final payment. For example, the future value of a loan is $0 because that is its value after
the final payment. However, if you want to save $50,000 over 18 years for your child's
education, then $50,000 is the future value. If omitted, 0 is assumed.
Due
Type: Microsoft.VisualBasic.DueDate
Optional. Object of type DueDate that specifies when payments are due. This argument
must be either DueDate.EndOfPeriod if payments are due at the end of the payment
period, or DueDate.BegOfPeriod if payments are due at the beginning of the period. If
omitted, DueDate.EndOfPeriod is assumed.
Return Value
Type: System.Double
Returns a Double specifying the present value of an annuity based on periodic, fixed payments to be
paid in the future and a fixed interest rate.
Remarks:
An annuity is a series of fixed cash payments made over a period of time. An annuity can be a
loan (such as a home mortgage) or an investment (such as a monthly savings plan).
The Rate and NPer arguments must be calculated using payment periods expressed in the same
units. For example, if Rate is calculated using months, NPer must also be calculated using
months.
For all arguments, cash paid out (such as deposits to savings) is represented by negative
numbers; cash received (such as dividend checks) is represented by positive numbers.

Example
In this example, the PV function returns the present value of an $1,000,000 annuity that will
provide $50,000 a year for the next 20 years. Provided are the expected annual percentage rate
(APR), the total number of payments (TotPmts), the amount of each payment (YrIncome), the
total future value of the investment (FVal), and a number that indicates whether each payment is
made at the beginning or end of the payment period (PayType). Note that YrIncome is a negative
number because it represents cash paid out from the annuity each year.
Sub TestPV()
' Define money format.
Dim Fmt As String = "###,##0.00"
' Annual percentage rate.
Dim APR As Double = 0.0825
' Total number of payments.
Dim TotPmts As Double = 20
' Yearly income.
Dim YrIncome As Double = 50000
' Future value.
Dim FVal As Double = 1000000
' Payment at beginning of month.
Dim PayType As DueDate = DueDate.BegOfPeriod
Dim PVal As Double = PV(APR, TotPmts, -YrIncome, FVal, PayType)
MsgBox("The present value is " & Format(PVal, Fmt) & ".")
End Sub

Financial.Rate Method
Returns a Double specifying the interest rate per period for an annuity.
'Declaration
Public Shared Function Rate ( _
NPer As Double, _
Pmt As Double, _
PV As Double, _
FV As Double, _
Due As DueDate, _
Guess As Double _
) As Double
Parameters
NPer
Type: System.Double
Required. Double specifies the total number of payment periods in the annuity. For
example, if you make monthly payments on a four-year car loan, your loan has a total of
4 * 12 (or 48) payment periods.
Pmt
Type: System.Double
Required. Double specifies the payment to be made each period. Payments usually
contain principal and interest that doesn't change over the life of the annuity.
PV
Type: System.Double
Required. Double specifies the present value, or value today, of a series of future
payments or receipts. For example, when you borrow money to buy a car, the loan
amount is the present value to the lender of the monthly car payments you will make.
FV
Type: System.Double
Optional. Double specifies the future value or cash balance you want after you make the
final payment. For example, the future value of a loan is $0 because that is its value after
the final payment. However, if you want to save $50,000 over 18 years for your child's
education, then $50,000 is the future value. If omitted, 0 is assumed.
Due
Type: Microsoft.VisualBasic.DueDate
Optional. Object of type DueDate that specifies when payments are due. This argument
must be either DueDate.EndOfPeriod if payments are due at the end of the payment
period, or DueDate.BegOfPeriod if payments are due at the beginning of the period. If
omitted, DueDate.EndOfPeriod is assumed.
Guess
Type: System.Double
Optional. Double specifying value you estimate is returned by Rate. If omitted, Guess is
0.1 (10 percent).
Return Value
Type: System.Double
Returns a Double specifying the interest rate per period for an annuity.

Remarks
An annuity is a series of fixed cash payments made over a period of time. An annuity can be a
loan (such as a home mortgage) or an investment (such as a monthly savings plan).
For all arguments, cash paid out (such as deposits to savings) is represented by negative
numbers; cash received (such as dividend checks) is represented by positive numbers.
Rate is calculated by iteration. Starting with the value of Guess, Rate cycles through the
calculation until the result is accurate to within 0.00001 percent. If Rate cannot find a result after
20 tries, it fails. If your guess is 10 percent and Rate fails, try a different value for Guess.

Example
This example uses the Rate function to calculate the interest rate of a loan given the total number
of payments (TotPmts), the amount of the loan payment (Payment), the present value or principal
of the loan (PVal), the future value of the loan (FVal), a number that indicates whether the
payment is due at the beginning or end of the payment period (PayType), and an approximation
of the expected interest rate (Guess).
VB
Sub TestRate()
Dim PVal, Payment, TotPmts, APR As Double
Dim PayType As DueDate

' Define percentage format.
Dim Fmt As String = "##0.00"
Dim Response As MsgBoxResult
' Usually 0 for a loan.
Dim FVal As Double = 0
' Guess of 10 percent.
Dim Guess As Double = 0.1
PVal = CDbl(InputBox("How much did you borrow?"))
Payment = CDbl(InputBox("What's your monthly payment?"))
TotPmts = CDbl(InputBox("How many monthly payments do you have to
make?"))
Response = MsgBox("Do you make payments at the end of the month?",
MsgBoxStyle.YesNo)
If Response = MsgBoxResult.No Then
PayType = DueDate.BegOfPeriod
Else
PayType = DueDate.EndOfPeriod
End If
APR = (Rate(TotPmts, -Payment, PVal, FVal, PayType, Guess) * 12) * 100

MsgBox("Your interest rate is " & Format(CInt(APR), Fmt) & " percent.")

Financial.NPer Method
'Declaration
Public Shared Function NPer ( _
Rate As Double, _
Pmt As Double, _
PV As Double, _
FV As Double, _
Due As DueDate _
) As Double
Parameters
Rate
Type: System.Double
Required. Double specifying interest rate per period. For example, if you get a car loan at
an annual percentage rate (APR) of 10 percent and make monthly payments, the rate per
period is 0.1/12, or 0.0083.
Pmt
Type: System.Double
Required. Double specifying payment to be made each period. Payments usually contain
principal and interest that does not change over the life of the annuity.
PV
Type: System.Double
Required. Double specifying present value, or value today, of a series of future payments
or receipts. For example, when you borrow money to buy a car, the loan amount is the
present value to the lender of the monthly car payments you will make.
FV
Type: System.Double
Optional. Double specifying future value or cash balance you want after you have made
the final payment. For example, the future value of a loan is $0 because that is its value
after the final payment. However, if you want to save $50,000 over 18 years for your
child's education, then $50,000 is the future value. If omitted, 0 is assumed.
Due
Type: Microsoft.VisualBasic.DueDate
Optional. Object of type DueDate that specifies when payments are due. This argument
must be either DueDate.EndOfPeriod if payments are due at the end of the payment
period, or DueDate.BegOfPeriod if payments are due at the beginning of the period. If
omitted, DueDate.EndOfPeriod is assumed.
Return Value
Type: System.Double
Returns a Double specifying the number of periods for an annuity based on periodic fixed payments and
a fixed interest rate.

Remarks:
An annuity is a series of fixed cash payments made over a period of time. An annuity can be a
loan (such as a home mortgage) or an investment (such as a monthly savings plan).
For all arguments, cash paid out (such as deposits to savings) is represented by negative
numbers; cash received (such as dividend checks) is represented by positive numbers.
Example
This example uses the NPer function to return the number of periods during which payments
must be made to pay off a loan whose value is contained in PVal. Also provided are the interest
percentage rate per period (APR / 12), the payment (Payment), the future value of the loan
(FVal), and a number that indicates whether the payment is due at the beginning or end of the
payment period (PayType).
VB
Sub TestNPer()
Dim TotPmts As Double
Dim PVal, APR, Payment As Double
Dim PayType As DueDate
Dim Response As MsgBoxResult

' 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?"))
' Usually 0 for a loan.
If APR > 1 Then APR = APR / 100
Payment = CDbl(InputBox("How much do you want to pay each month?"))
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
TotPmts = NPer(APR / 12, -Payment, PVal, FVal, PayType)
If Int(TotPmts) <> TotPmts Then TotPmts = Int(TotPmts) + 1

MsgBox("It will take you " & TotPmts & " months to pay off your loan.")
End Sub

Vous aimerez peut-être aussi