# fvvar

Future value of varying cash flow

## Syntax

``FutureVal = fvvar(CashFlow,Rate)``
``FutureVal = fvvar(___,CFDates)``

## Description

example

````FutureVal = fvvar(CashFlow,Rate)` returns the future value of a varying cash flow.```

example

````FutureVal = fvvar(___,CFDates)` specifies options using an optional argument in addition to the input arguments in the previous syntax.```

## Examples

collapse all

This cash flow represents the yearly income from an initial investment of \$10,000. The annual interest rate is 2%.

• Year 1 — \$2000

• Year 2 — \$1500

• Year 3 — \$3000

• Year 4 — \$3800

• Year 5 — \$5000

For the future value of this regular (periodic) cash flow:

`FutureVal = fvvar([-10000 2000 1500 3000 3800 5000], 0.02)`
```FutureVal = 4.7131e+03 ```

An investment of \$10,000 returns this irregular cash flow. The original investment and its date are included. The periodic interest rate is 3%.

• -\$1000 — January 12, 2000

• \$2500 — February 14, 2001

• \$2000 — March 3, 2001

• \$3000 — June 14, 2001

• \$4000 — December 1, 2001

To calculate the future value of this irregular (nonperiodic) cash flow:

```CashFlow = [-10000, 2500, 2000, 3000, 4000]; CFDates = [datetime(2000,1,12) datetime(2001,2,14) datetime(2001,3,3) datetime(2001,6,14) datetime(2001,12,1)]; FutureVal = fvvar(CashFlow, 0.03, CFDates)```
```FutureVal = 1.0731e+03 ```

## Input Arguments

collapse all

Varying cash flows, specified as a vector.

Note

You must include the initial investment as the initial cash flow value (a negative number).

.

Data Types: `double`

Periodic interest rate, specified as a scalar numeric decimal.

Data Types: `double`

(Optional) Dates on which the cash flows occur, specified as a vector using a datetime array, string array, or date character vectors.

Note

Use `CFDates` for irregular (nonperiodic) cash flows.

To support existing code, `fvvar` also accepts serial date numbers as inputs, but they are not recommended.

Data Types: `char` | `string` | `datetime`

## Output Arguments

collapse all

Future value of a varying cash flow, returned as a scalar numeric.

## References

[1] Jan Mayle. Standard Securities Calculation Methods. Securities Industry Assn, Volumes I-II, 3rd edition, 1994

## Version History

Introduced before R2006a

expand all