Menu

1 / 5

Bond Pricing With Python: Present Value, Yield to Maturity, and Duration

HackerNoon·Tobechi·about 15 hours ago
#gWnsqdJk
#hackernoon#technology#price#bond#rate
Reading 0:00
15s threshold

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 of interest, reflecting an understanding that a measure of grain today was worth more than the promise of the same measure after the harvest. The difference had to be accounted for.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.