For calculating the percent for a period (ie. month) one can use the following formulae (here as C++ functions):
If one knows only the percent of x periods and x, then one can use the second function.
Like K-Pia wrote, one can also first calculate the monthly pct, and then extrapolate to 12 months.
Code:
double PeriodPct(const double AdblStartCap, const double AdblEndCap, const double AdblPeriods)
{ // = (nthRoot(Kn/K0) - 1) * 100
return (pow(AdblEndCap / AdblStartCap, 1.0 / AdblPeriods) - 1.0) * 100.0;
}
double PeriodPct(double AdbPLpct, const double AdbPeriods)
{
const bool fNeg = AdbPLpct < 0.0;
if (fNeg) AdbPLpct *= -1.0;
double db = PeriodPct(100.0, 100.0 + AdbPLpct, AdbPeriods);
if (fNeg) db *= -1.0;
return db;
}
Like K-Pia wrote, one can also first calculate the monthly pct, and then extrapolate to 12 months.
Last edited: