javamoney-lib icon indicating copy to clipboard operation
javamoney-lib copied to clipboard

YieldToMaturity calculation fault

Open labkeeper opened this issue 5 years ago • 0 comments

Your YieldToMarurity calculation uses formula for approximate YTM (please read carefully mentioned source). In the middle of http://www.financeformulas.net/Yield_to_Maturity.html there's formula for present value of a bond. To get precise YTM you have to reverse formula to get r from it. It's hardly reversible, and you have to approximate it with binary search or using Newton–Raphson method.

labkeeper avatar Oct 09 '19 14:10 labkeeper