Bond Pricing With Python: Present Value, Yield to Maturity, and Duration
Imagine a friend asks to borrow $1,000 today and promises to return exactly $1,000 a year from now, without interest. You trust him, but you might still hesitate. The money could be earning interest somewhere else while you wait. And if prices rise during that year, the $1,000 you get back may not buy what it does today. The amount is the same, but its value is not. That is the basic idea behind bond pricing. A bond is a promise of future payments, and to know what that promise is worth today, you have to account for the time between now and when you receive the money. We will build that idea in three steps: the definitions, the mathematics, and finally the code.
A very old idea
Lending with interest is hardly a modern invention. Clay tablets from Mesopotamia once recorded loans of grain and silver at stated rates...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE