Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Not sure if this is the right place to ask but I was wondering if anyone has an idea about how to draw a Price-Yield curve. Is there ready-to-use formulas for this purpose ? An example of curve and formula used is below. Let me know if you require further explanation. Sorry for the formatting of the question by the way (big picture, lots of white space) Graph

$$P=\frac{F}{[1+(\lambda/m)]^n}+\sum_{k=1}^n\frac{C/m}{[1+(\lambda/m)]^k}$$ $$=\frac{F}{[1+(\lambda/m)]^n}+\frac{C}{\lambda}\left\{1-\frac{1}{[1+(\lambda/m)]^n}\right\}.$$

share|cite|improve this question
BTW, check out and if you are interested. – user2468 Feb 17 '12 at 0:08
What's wrong with the formula you gave? Can you not just enter the formula in MatLab and plot it? – Willie Wong Feb 17 '12 at 9:29
up vote 0 down vote accepted

Face value is 100:

F = 100

Coupon is 5%:

C = 5

Quarterly coupon payments:

m = 4

Five year maturity:

T = 5

Total number of payments:

n = m * T

Range of yields 1% to 20%:

y = 0.01:0.01:0.2


P = F./(1+y/m).^n + C./y.*(1-1./(1+y/m).^n)

Plot price against yield:



enter image description here

share|cite|improve this answer
Thanks so much for the answer however I tried it with F = 1000 , m = 2 , n = 60 and 0 <= lambda <= 20 for the 5% coupon (this is the date for the graph I have posted) but it seems that I cant get the same shape as in the graph. Maybe I am doing something wrong ? – Cemre Feb 16 '12 at 23:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.