### Duration

We now compute the first derivative of price with respect to r, called Dollar Duration:

$$ \frac{\partial Price}{\partial r} = \frac{\partial}{\partial r} \left[ \sum_{i=1}^{n}{\frac{c}{{\left( 1+r/f \right)}^i}}+\frac{F}{{\left( 1+r/f \right)}^n} \right] $$ $$ = \sum_{i=1}^{n}{\frac{\partial}{\partial r}\frac{c}{{\left( 1+r/f \right)}^i}}+ \frac{\partial}{\partial r} \frac{F}{{\left( 1+r/f \right)}^n} $$ $$ = - c \sum_{i=1}^{n}{\frac{i}{{\left( 1+r/f \right)}^{i+1}} \frac{1}{f}}-\frac{ F n}{{\left( 1+r/f \right)}^{n+1}}\frac{1}{f} $$ $$ = - \frac{c}{f} \sum_{i=1}^{n}{i z^{i+1}}- \frac{F n}{f} z^{n+1} $$ $$ = - \frac{c z}{f} \sum_{i=1}^{n}{i z^i}- \frac{F n}{f} z^{n+1} $$ $$ = - \frac{c z}{f} z \frac{1-(n+1)z^n+n z^{n+1}}{{\left(1-z\right)}^2}- \frac{F n}{f} z^{n+1} $$

We used the sum of series formula:

$$\sum_{i=1}^{n}{i z^i}=z \frac{1-(n+1)z^n+n z^{n+1}}{{\left(1-z\right)}^2}$$