Skip to content

Options

The fundamental logic is No arbitrage

Binomial Option Valuation

Basic Formula

Given risk-neutral, the formula for Binomial at each step is:

Su=S0uSd=S0dpu=erΔtudpd=1puCT=max(STX,0)C0=erΔt(pCu+(1p)Cd)
python
class BinomialTreeOption:
    def __init__(self, df_spy, X, T, r, N, option_type="call"):
        """
        Initialize the Binomial Tree for option pricing with stage-specific volatility.
        """
        self.df_spy = df_spy
        self.S = spy_price
        self.X = X
        self.T = T
        self.r = r
        self.N = N
        self.option_type = option_type
        self.dt = T / N  # Time step size

    def compute_rolling_volatility(self, current_date, window=30):
        """
        Compute rolling volatility up to a given trading date.
        """
        spy_subset = self.df_spy.loc[:current_date]  
        log_returns = np.log(spy_subset["Close"] / spy_subset["Close"].shift(1))
        rolling_vol = log_returns.rolling(window=window).std() * np.sqrt(252)

        return rolling_vol.iloc[-1]  
    def build_stock_tree(self):
        """
        Build the binomial tree for stock prices with dynamic volatility.
        """
        stock_tree = np.zeros((self.N + 1, self.N + 1))
        stock_tree[0, 0] = self.S  

        trading_dates = self.df_spy.index[-self.N:]  

        for i in range(1, self.N + 1):
            current_date = trading_dates[i - 1]  
            sigma_t = self.compute_rolling_volatility(current_date)  
            u = np.exp(sigma_t * np.sqrt(self.dt))  
            d = np.exp(-sigma_t * np.sqrt(self.dt))  

            for j in range(i + 1):
                stock_tree[j, i] = stock_tree[0, 0] * (u ** (i - j)) * (d ** j)

        return stock_tree

    def build_option_tree(self):
        """
        Build the option price tree using backward induction.
        """
        stock_tree = self.build_stock_tree()
        option_tree = np.zeros((self.N + 1, self.N + 1))

        if self.option_type == "call":
            option_tree[:, self.N] = np.maximum(stock_tree[:, self.N] - self.X, 0)
        elif self.option_type == "put":
            option_tree[:, self.N] = np.maximum(self.X - stock_tree[:, self.N], 0)

        trading_dates = self.df_spy.index[-self.N:] 

        for i in range(self.N - 1, -1, -1):
            current_date = trading_dates[i]  
            sigma_t = self.compute_rolling_volatility(current_date) 
            u = np.exp(sigma_t * np.sqrt(self.dt))
            d = np.exp(-sigma_t * np.sqrt(self.dt))
            p = (np.exp(self.r * self.dt) - d) / (u - d)  

            for j in range(i + 1):
                option_tree[j, i] = np.exp(-self.r * self.dt) * (
                    p * option_tree[j, i + 1] + (1 - p) * option_tree[j + 1, i + 1]
                )

        return option_tree

    def price(self):
        """
        Compute the option price at time 0.
        """
        option_tree = self.build_option_tree()
        return option_tree[0, 0]

def compute_binomial_price(row, df_spy, r, N):
    X = row["strike"]
    expiration = row["expiration"]
    # set to global T
    T_local = T
    option = BinomialTreeOption(df_spy, X, T_local, r, N)
    return option.price()

Components

Basic assumptions of binomial tree:

  • Begin at S0
  • Up U down D, default D=1U.

Model one

Proposed by Bruce Tuckman to describe fixed income pricing, as

dr=σdw

where r is the interest rate, w is a random walk stochastic process. When time is 1, ru=r+σ, rd=rσ. Therefore Su=Seσ=SU, Sd=Seσ=SD. Therefore D=1U by default.

Risk Neutrual Probability

Inferred from no arbitrage, the expected stock price is:

E(St)=πuS0U+(1πu)S9D

which should be equal to risk free return: S0(1+rf)t, then we will have:

πu=(1+rf)TDUDπd=1πu=U(1+rf)TUD

One Period Binomial Model

Now assuming European option:

Cu,t=max(0,SuX)Pu,t=max(0,XSu)Cd,t=max(0,SdX)Pd,t=max(0,XSd)

Then C0=PV(E(C))=(πuCu,t+πdCd,t)(1+rf)t. Po=(πuPu,t+πdPd,t)(1+rf)t.

Put-Call Parity

Fiduciary callProtective put
c+X1+rftS+p
If S ≤ X0+X=XS+(XS)=X
If S ≥ X(SX)+X=SS+0=S

Then we have:

c+X(1+rf)t=S0+p

Risk-free Portfolio Method

  1. Constructing risk-free portfolio by long δ stock and short a call, the value of the portfolio at time 0 is:

    V0=cδS0
  2. Then at t:

    Vu,t=δSuCuVd,t=δSdCd
  3. Since the portfolio is risk free, Vu,t=Vd,t, then we solve:

    δS0=CuCdUD
  4. Then we can solve C0 by Vu,t=Vd,t=(1+rf)tV0, where V0=cδS0:

    C0=δS0+δSuCu

    Then we can get the same formula as the risk neutrual probability method.

NOTE

Arbitrage opportunity exists when value is not equal, δ is arbitrage ratio.

Two Period Binomial Model

Same as one period model, πu and πd could be calculated with same method (actually same number!). Then simply calculate the present value of the stock expectation.

Example

Consider a non-dividend-paying stock currently priced at €50. A European-style call option written on this stock has two years until maturity and an exercise price of €50. The risk-free interest rate is assumed to be 5% per annum. Additionally, the up factor (U) is given as 1.356 and the down factor (D) is 0.744. Based on this information, we are tasked with calculating both the current value of the call option and the current value of the corresponding put option.

To solve the problem, we begin with

Step 1: calculating the stock prices in the binomial tree. The up-up price is S++=91.94, the up-down and down-up price is S+=S+=50.44, and the down-down price is S=27.68.

Step 2, we compute the option values at maturity. For the call option, we have C++=41.95, and both C+=C+=0.44. The down-down call value is C=0. For the put option, we get P++=P+=P+=0, and P=22.32.

Step 3 involves calculating the risk-neutral probability. The up probability is πU=(1+0.05)0.7441.3560.744=0.5, and the down probability is πD=1πU=0.5.

Next, we calculate intermediate option values. For the call, C+=(0.5×41.94+0.5×0.44)1.05=20.18, and C=(0.5×0.44+0.5×0)1.05=0.22. For the put, P+=(0.5×0+0.5×0)1.05=0, and P=(0.5×0+0.5×22.32)1.05=10.63.

Step 4, we calculate the initial values. The call option is worth C0=(0.5×20.18+0.5×0.22)1.05=9.71, and the put option is worth P0=(0.5×0+0.5×10.63)1.05=5.06.

As an additional tip, using the put-call parity formula, we can verify:

P0=C0+PV(X)S0=9.71+50(1.05)250=5.06.

Advance Exercise of American Option

  • American call options on non-dividend stock will not be exercised early because the value of call option will be greater than exercise: Worth more alive than dead.
  • American call option on dividend-paying stock or deep in-the-money option could be exercised earlier.

Two Period Binomial Model of American Option

American option may be exercised early when:

  • Exercise value is greater than arbitrage-free value
  • Use the higher between exercise value and calculated price at each node.

NOTE

Calculate the option value if exercised

Interest Rate Option

The valuation process is same as standard binomial model, but times nominal principal.

Black-Scholes Model

Assumption

Black-Scholes model is the continuous format of Binomial (when t).

  • The underlying asset follows Geometric Brownian Motion, moves smoothly from price to price (continuous).

  • The continuously compounding risk-free rate is constant and down. Assuming borrowing and lending at risk-free rate.

  • The volatility of underlying asset is constant

  • The market is frictionless:

    • No transaction costs, no taxes, no regulatory constraints
    • No arbitrage
    • The underlying asset is highly liguid, and continuous trading
    • Short selling of the underlying asset is permitted

Basic Formula

The formula for Black-Scholes is:

C0=S0N(d1)XerfcTN(d2)P0=C0+XerfcTS0=S0N(d1)+XerfcTN(d2)d1=ln(S0X)+(rfc+12σ2)TσTd2=d1σT
python
def black_scholes(S, X, T, r, sigma):
    d1 = (np.log(S / X) + (r + 0.5 * sigma ** 2))/(sigma * np.sqrt(T))
    d2= d1 - sigma * np.sqrt(T)
    return S * norm.cdf(d1) - X * np.exp(-r * T) * norm.cdf(d2)

Initial Model

Similar as put-call parity, call option can be regarded as leveraged stock investment (Long stock(N(d1)) and Short risk-free zero coupon bond(N(d2))). Put option can be regarded as Long risk-free asset(N(d2)) and Short selling stock (N(d1)).

Conclusion of N(d1) and N(d2)

  • N(d1) is the δ of call option
  • N(d1) is the δ of a put option
  • N(d2) is the risk-neutral probability that a call option will be exercised at expiration (ITM).
  • N(d2) is the risk-neutral probablility that a put option will be exercised at expiration (ITM).
  • N(d2)=1N(d2).

BSM Model with Carrying Benefits or Costs

Co=S0eγTN(d1)XerfcTN(d2)Po=S0eγTN(d1)+XerfcTN(d2)d1=ln(S0X)+(rfcγ+σ22)σTd2=d1σT

Options On Future

Position

The position of future depends on the position on option:

  • Long call Long futrue position
  • Long put Short future position

The strike price is contracted in the option. For long call, exercise if F<Fm(n). For long put, exercise if F>Fm(n).

Black Model

C0=F0(T)erfcTN(d1)XerfcTN(d2)P0=F0(T)erfcTN(d1)+XerfcTN(d2)d1=ln(F0(T)X)+σ22TσTd2=d1σT

IMPORTANT

Usually in practice, option and future will be set expire at same tim e (American Option).

Interest Rate Option

The contract is similar to Option on Futures and FRA. The position judgement and exercise case is exactly same as Option on Futures

C0=NPerfcn30360(FRm×nN(d1)XN(d2))(nm)30360P0=NPerfcn30360(XN(d2)FRm×nN(d1))(nm)30360

Swapation

Swapation is an option to enter a swap:

  1. A payer swapation is an option to enter into a swap as the fixed-rate payer (Long).
  2. A receive swapation is an option to enter into a swap as the fixed rate receiver (Short).
C0=NP(Accural Period)PVA of(RfixN(d1)RXN(d2))P0=NP(Accural Period)PVA of(RfixN(d1)+RXN(d2))

Greeks

From Black-Scholes model,

C0=S0N(d1)XerfcTN(d2)

We can understanding it asL

C0=f(S0,X,rfc,T,σ)

Then, δ is defined as:

δ=C0S0

γ is defined as:

γ=2C0S02=δS0

θ is defined as:

θ=C0t

υ is defined as:

υ=C0σ

ρ is defined as:

ρ=C0rfc

Delta

For non-dividend paying stock: δcall=N(d1), δput=N(d1).

NOTE

In this case, δcall=δput+1

For dividend-paying stock: Δcall=eδTN(d1),Δput=eδTN(d1), where δ here is denoting the dividend rate.

NOTE

δ is between (0,1) for call and (1,0) for put. It changes more drastically when closer to exercise date.

Gamma

NOTE

γ and δ are just convexity and duration in fixed income.

γ reaches its max when at the money. γ increase when exercise data get closer (at the money). For deep in the money and out of the money option, γ decrease when exercise data get closer.

NOTE

γ neutral strategy can be built by combining positions of options, then further build δ neutral strategy by add position of underlying stock (since stock has no γ).

Theta

Theta is usually negative for both call and put options as their value decrease in value by time. With:

  • Exception: Deep in the money put options