Call/Put prices across strikes (futures, Black-76)¶
Minimal example: compute call and put prices for a range of strikes and print a table.
Inputs: futures F, maturity T (years), rate r (cc), volatility sigma (per √year).
import numpy as np
import pandas as pd
from volkit import price_euro_future
# Parameters (edit these) -----------------------------
F = 100.0 # futures price
T = 0.50 # years
r = 0.02 # continuous compounding
sigma = 0.20 # Black vol (per √year)
# Strike grid -----------------------------------------
K = np.arange(70.0, 131.0, 5.0) # 70,75,...,130
# Prices (broadcasting over K) ------------------------
call = price_euro_future(F, K, T, r, sigma, cp="call")
put = price_euro_future(F, K, T, r, sigma, cp="put")
# Table ------------------------------------------------
df = pd.DataFrame({"strike": K, "call": call, "put": put})
df.round(6)
| strike | call | put | |
|---|---|---|---|
| 0 | 70.0 | 29.723370 | 0.021875 |
| 1 | 75.0 | 24.844950 | 0.093704 |
| 2 | 80.0 | 20.107035 | 0.306039 |
| 3 | 85.0 | 15.652410 | 0.801663 |
| 4 | 90.0 | 11.655313 | 1.754815 |
| 5 | 95.0 | 8.270065 | 3.319816 |
| 6 | 100.0 | 5.581107 | 5.581107 |
| 7 | 105.0 | 3.581974 | 8.532224 |
| 8 | 110.0 | 2.189244 | 12.089743 |
| 9 | 115.0 | 1.277152 | 16.127900 |
| 10 | 120.0 | 0.713244 | 20.514241 |
| 11 | 125.0 | 0.382548 | 25.133794 |
| 12 | 130.0 | 0.197713 | 29.899208 |