def zeroprice(rate, duration=9, yearly=2, face=100):
    """Compute price of zero-coupon bond given its duration."""
    periodrate = rate / float(yearly * 100)
    periods = duration * yearly
    return float(face) / (1 + periodrate) ** periods
