 Math Functions: Introduction to Finance Functions

 Introduction
 The Visual Component Library provides a series of functions destined to perform various types of financially related operations. These functions use common factors depending on the value that is being calculated. Many of these functions deal with investments or loan financing.

The Present Value is the current value of an investment or a loan. For a savings account, a customer could pledge to make a set amount of deposit on a bank account every month. The initial value that the customer deposits or has in the account is the PresentValue as referenced in the VCL functions. The sign of the variable, when passed to a function, depends on the position of the customer. If the customer is making deposits, this value must be negative. If the customer is receiving money (lottery installment, family inheritance, etc), this value should be positive.

The Number Of Periods is the number of periods that make up a full cycle of a loan or an investment. This period could be the number of months of a year, which is 12; but it could be another length. This variable is passed as NPeriods. Suppose a customer is getting a car loan that would be financed in 5 years. This is equivalent to 5 * 12 = 60 months. In the same way, a cash loan can stretch from 0 to 18 months, a carpenter truck loan can have a life financing of 40 months, and a condominium can be financed for 15 years of 12 months plus an additional 8 months; this is equivalent to (15 * 12) + 8 = 188 months.

The Interest Rate is a fixed percent value applied during the life of the loan or the investment. The rate does not change during the length of the NPeriods. For deposits made in a savings account, because their payments are made monthly, the rate is divided by the number of periods (the NPeriods) of a year, which is 12. If an investment has an interest rate set at 14.50%, the Rate would be 14.50/12 = 1.208. Because the Rate is a percentage value, its actual value must be divided by 100 before passing it to the function. For a loan of 14.50% interest rate, this would be 14.50/12 = 1.208/100 = 0.012.

The Payment is the amount the customer will be paying. For a savings account where a customer has pledged to pay a certain amount in order to save a set (goal) amount, this would be the amount the customer would pay every month. If the customer is making payments (car loan, mortgage, deposits to a savings account), this value must be negative. If the customer is receiving money (lottery installment or annuity, family inheritance, etc), this value must be positive.

The Payment Time specifies whether the payment is made at the beginning or the end of the period. For a monthly payment, this could be the beginning or end of every month. The PaymentTime uses one of the values of the TPaymentTime enumerator. When passing this variable, select one of the members of the enumerator:

`enum TPaymentTime { ptEndOfPeriod, ptStartOfPeriod };`