Difference between revisions of "Documentation/How Tos/Calc: DURATION function"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Robot: Automated text replacement %s)
m
Line 24: Line 24:
 
<tt>'''DURATION(10%; 100; 121)'''</tt>
 
<tt>'''DURATION(10%; 100; 121)'''</tt>
 
: returns <tt>'''2'''</tt>. $100 invested at a 10% compounded annual rate is worth $110 next year and $121 in two years time.
 
: returns <tt>'''2'''</tt>. $100 invested at a 10% compounded annual rate is worth $110 next year and $121 in two years time.
 +
 +
=== Issues: ===
 +
* Calc's <tt>'''DURATION'''</tt> function is implemented as <tt>'''G_DURATION'''</tt> in Gnumeric, and is <u>not</u> implemented in Excel.
 +
* The <tt>'''DURATION'''</tt> function as implemented in Gnumeric and Excel (Macaulay duration) is implemented as <tt>'''DURATION_ADD'''</tt> in Calc.
 +
* The inexactness for fractional periods arises because interest is calculated linearly during a period. For example, $100 at 10% is worth $105 in half a year, yet <tt>'''DURATION(10%; 100; 105)'''</tt> does <u>not</u> return exactly 0.5. This may be of more theoretical than practical importance.
 +
  
 
{{Documentation/SeeAlso|
 
{{Documentation/SeeAlso|
Line 33: Line 39:
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
 
=== Issues: ===
 
 
* Calc's <tt>'''DURATION'''</tt> function is implemented as <tt>'''G_DURATION'''</tt> in Gnumeric, and is <u>not</u> implemented in Excel.
 
* The <tt>'''DURATION'''</tt> function as implemented in Gnumeric and Excel (Macaulay duration) is implemented as <tt>'''DURATION_ADD'''</tt> in Calc.
 
* The inexactness for fractional periods arises because interest is calculated linearly during a period. For example, $100 at 10% is worth $105 in half a year, yet <tt>'''DURATION(10%; 100; 105)'''</tt> does <u>not</u> return exactly 0.5. This may be of more theoretical than practical importance.
 

Revision as of 10:12, 2 March 2009


DURATION

Returns the number of periods needed for an investment to reach a certain value.

Syntax:

DURATION(rate; present_value; future_value)

rate: the interest rate per period that will apply to the investment.
present_value: the value of the investment now.
future_value: the desired value of the investment in the future.
DURATION returns an estimate of the number of periods required to turn present_value into future_value at a constant interest rate of rate, compounded each period.
It solves the equation:
present_value * (1 + rate)duration = future_value,
giving a result:
DURATION(rate; present_value; future_value) = LOG(future_value/present_value; 1 + rate).
The result is exact for whole periods, and approximate for partial periods.

Example:

DURATION(10%; 100; 121)

returns 2. $100 invested at a 10% compounded annual rate is worth $110 next year and $121 in two years time.

Issues:

  • Calc's DURATION function is implemented as G_DURATION in Gnumeric, and is not implemented in Excel.
  • The DURATION function as implemented in Gnumeric and Excel (Macaulay duration) is implemented as DURATION_ADD in Calc.
  • The inexactness for fractional periods arises because interest is calculated linearly during a period. For example, $100 at 10% is worth $105 in half a year, yet DURATION(10%; 100; 105) does not return exactly 0.5. This may be of more theoretical than practical importance.


Template:Documentation/SeeAlso

Personal tools