present_value

Evaluates the net present value of a stream of equal periodic cash flows, which are subject to a given discount rate.

Synopsis

#include <imsl.h>

float imsl_f_present_value (float rate, int n_periods, float payment, float future_value, int when)

The type double function is imsl_d_present_value.

Required Arguments

float rate (Input)
Interest rate.

int n_periods (Input)
Total number of periods.

float payment (Input)
Payment made in each period.

float future_value (Input)
The value, at some time in the future, of a current amount and a stream of payments.

int when (Input)
Time in each period when the payment is made, either IMSL_AT_END_OF_PERIOD or IMSL_AT_BEGINNING_OF_PERIOD. For a more detailed discussion on when see the Usage Notes section of this chapter.

Return Value

The present value of an investment. If no result can be computed, NaN is returned.

Description

Function imsl_f_present_value computes the present value of an investment.

It can be found by solving the following:

If rate =0

 

If rate 0

 

Example

In this example, imsl_f_present_value computes the present value of 20 payments of $500,000 per payment ($10 million) with an annual interest rate of 6%. The payment is made at the end of each period.

 

#include <stdio.h>

#include <imsl.h>

 

int main()

{

float rate = 0.06;

float payment = 500000.;

float future_value = 0.;

int n_periods = 20;

int when = IMSL_AT_END_OF_PERIOD;

float present_value;

 

present_value = imsl_f_present_value (rate, n_periods, payment,

future_value, when);

 

printf ("The present value of the $10 million prize is ");

printf ("$%.2f.\n", present_value);

}

Output

 

The present value of the $10 million prize is $-5734961.00.