Difference between revisions of "Programming/Kdb/Labs/Option pricing"

From Thalesians Wiki
< Programming‎ | Kdb‎ | Labs
Line 12: Line 12:
* <math>q</math> is the annualized (continuous) dividend yield.
* <math>q</math> is the annualized (continuous) dividend yield.


The solution of this equation depends on the '''payoff''' of the option &mdash; the terminal condition. In particular, if at the time of expiration, <math>T</math>, the payoff is given by <math>V(S, T) = C(S, T) =: \max\{S - K, 0\}</math>, in other words, the option is a '''European call option''', then the value of the option at time <math>t</math> is given by the '''Black-Scholes formula''':
The solution of this equation depends on the '''payoff''' of the option &mdash; the terminal condition. In particular, if at the time of expiration, <math>T</math>, the payoff is given by <math>V(S, T) = C(S, T) =: \max\{S - K, 0\}</math>, in other words, the option is a '''European call option''', then the value of the option at time <math>t</math> is given by the '''Black-Scholes formula for the European call''':
<center><math>
<center><math>
C(S_t, t) = e^{-r\tau} [F_t N(d_1) - K N(d_2)]
C(S_t, t) = e^{-r\tau} [F_t N(d_1) - K N(d_2)]
Line 23: Line 23:
<center><math>
<center><math>
d_2 = d_1 - \sigma\sqrt{\tau}.
d_2 = d_1 - \sigma\sqrt{\tau}.
</math></center>
Similarly, if the payoff is given by <math>V(S, T) = P(S, T) =: \max\{K - S, 0\}</math>, in other words, the option is a '''European put option''', then the value of the option at time <math>t</math> is given by the '''Black-Scholes formula for the European put''':
<center><math>
P(S_t, t) = e^{-r\tau} [K N(-d_2) - F N(-d_1)].
</math></center>
</math></center>

Revision as of 22:39, 17 June 2021

Recall the celebrated Black-Scholes equation

Here

  • is a time in years; we generally use as now;
  • is the value of the option;
  • is the price of the underlying asset at time ;
  • is the volatility — the standard deviation of the asset's returns;
  • is the annualized risk-free interest rate, continuously compounded;
  • is the annualized (continuous) dividend yield.

The solution of this equation depends on the payoff of the option — the terminal condition. In particular, if at the time of expiration, , the payoff is given by , in other words, the option is a European call option, then the value of the option at time is given by the Black-Scholes formula for the European call:

where is the time to maturity, is the forward price, and

and

Similarly, if the payoff is given by , in other words, the option is a European put option, then the value of the option at time is given by the Black-Scholes formula for the European put: