Show / Hide Table of Contents

Class TimeValue

Implements time value financial functions such as: PV, NPV, IRR

Inheritance
System.Object
TimeValue
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: NFX.Financial
Assembly: NFX.dll
Syntax
public static class TimeValue

Methods

FV(Double, Double, Int32)

Returns future value of presently-valued amount in X number of periods at a certain interest rate

Declaration
public static double FV(double pv, double intRate, int periods)
Parameters
Type Name Description
System.Double pv

Present value

System.Double intRate

Interest rate

System.Int32 periods

Period length

Returns
Type Description
System.Double

Future value

Examples

$100 loaned for 1 period at 5% interest per period have future value of $105; same amount loaned for 10 periods at the same rate would have future value of $162.89

IRR(IEnumerable<Double>, Double)

Calculates the internal rate of return over series of cash flows

Declaration
public static double IRR(IEnumerable<double> cashFlows, double estimatedResult)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Double> cashFlows
System.Double estimatedResult
Returns
Type Description
System.Double

NPV(IEnumerable<Double>, Double)

Returns a net present value calculated over series of cashflows

Declaration
public static double NPV(IEnumerable<double> cashFlows, double discountRate)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Double> cashFlows

A series of net cashflows per period(supplied as a summ of inflows and outflows), usually the first cashflow is an outflow of initial project investment

System.Double discountRate

Interest rate used for net cashflow discount

Returns
Type Description
System.Double

Net present value

PV(Double, Double, Int32)

Returns present value of amount returned in X number of periods at a certain interest rate

Declaration
public static double PV(double fv, double intRate, int periods)
Parameters
Type Name Description
System.Double fv

Future value (returned amount in X periods)

System.Double intRate

Interest rate per period

System.Int32 periods

Period length

Returns
Type Description
System.Double

Present Value

Examples

Assume that A gives $100 cash to B. B returns the same amount to A in 1 year. Banks give 5% annual rate, therefore present value of this $100 dollar returned is going to be $95.24 - A lost $4.76, because B did not pay any interest and A could have deposited $100 in regular bank instead of giving it to B. Had A charged B 5% interest rate , A would have made money.

Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX