[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

*Subject*: **[OASIS Issue Tracker] Created: (OFFICE-3040) Needs-Discussion:6.12.36: PDuration formula appears incorrect**

*From*:**OASIS Issues Tracker <workgroup_mailer@lists.oasis-open.org>***To*: office@lists.oasis-open.org*Date*: Mon, 26 Jul 2010 19:55:13 -0400 (EDT)

Needs-Discussion: 6.12.36: PDuration formula appears incorrect -------------------------------------------------------------- Key: OFFICE-3040 URL: http://tools.oasis-open.org/issues/browse/OFFICE-3040 Project: OASIS Open Document Format for Office Applications (OpenDocument) TC Issue Type: Bug Components: OpenFormula Affects Versions: ODF 1.2 CD 05 Reporter: Eric Patterson I believe that the denominator in the Pduration formula should be log(1+rate), not log(rate) Actual: PDURATION=(log(desiredValue)-log(currentValue))/log(rate) Expected: PDURATION=(log(desiredValue)-log(currentValue))/log(1+rate) From wolfram the formula for interest calculations is FV = PV(1 + r/f)^(nf) where FV = future value PV = present value r = interest rate f = compounding frequency n = number of periods Given that pduration makes no mention of any compounding frequency it should be assumed to be 1. so the formula becomes FV = PV(1 + r)^n In the case of PDURATION we want to solve for n given FV, PV, and r FV / PV = (1 + r)^n n = log_(1+r)(FV/PV) where log_(1+r) is log base 1+ r through change of base formula n = log_(1+r)(FV/PV) = log(FV/PV) / log(1+r) = (log(FV) - log(PV))/log(1+r) where the base of log is irrelevant so long as it is consistent. Below is a less rigorous justification for the (1+r) in the original equation: The (1+r) is originally present in the compound interest formula as r is simply the rate of interest, not the growth factor. An investment that grows as 6% would have r = 0.06. Over 1 term r*PV evaluates to only the growth of the investment. We must add to the growth the value of the original investment. so FV = PV + r*PV = PV*(1+r). Hence the original growth factor in the formula must be (1+r) and the derivation from that to the PDURATION formula has already been shown. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]