A binomial tree prices an American put as an option whose value is evaluated across successive price movements. In the `option-price` package, select the `BT` method when calling `getPrice()` on an American put. section 14.3.2
Set `iteration` to control the tree depth. The option also requires the current asset price, strike price, life in days, annualized volatility, risk-free rate, and dividend yield. A binomial-tree or simulation method uses `iteration` as its computational depth or simulation count. section 14.3.2
Pricing an American put
Create an American put with `s0=150`, `k=140`, `t=30`, `sigma=.45`, `r=.03`, and `dv=.01`, then call `getPrice('BT', iteration=1000)`. This produces a price of about $3.4284. section 14.3.2
from optionprice import Option
x = Option(european=False, kind='put', s0=150, k=140, t=30,
sigma=.45, r=.03, dv=.01)
p = x.getPrice('BT', iteration=1000)
The listing shows the minimal Python setup for selecting binomial-tree pricing and setting tree depth. section 14.3.2
