View source: R/european_option.R
| price_european | R Documentation |
Computes the exact price of a European option (call or put) using the Cox-Ross-Rubinstein (CRR) binomial model with price impact from hedging activities.
price_european(
S0,
K,
r,
u,
d,
lambda,
v_u,
v_d,
n,
option_type = "call",
validate = TRUE
)
S0 |
Initial stock price (must be positive) |
K |
Strike price (must be positive) |
r |
Gross risk-free rate per period (e.g., 1.05 for 5% rate) |
u |
Base up factor in CRR model (must be > d) |
d |
Base down factor in CRR model (must be positive) |
lambda |
Price impact coefficient (non-negative) |
v_u |
Hedging volume on up move (non-negative) |
v_d |
Hedging volume on down move (non-negative) |
n |
Number of time steps (positive integer) |
option_type |
Character; either "call" (default) or "put" |
validate |
Logical; if TRUE, performs input validation |
Computes exact prices for European options (call or put) using the binomial model with price impact. Price impact from hedging activities modifies the stock dynamics through adjusted up/down factors and risk-neutral probability.
Unlike path-dependent Asian options, European options only depend on the terminal stock price, allowing for efficient O(n) computation instead of O(2^n). See the package vignettes and reference paper for detailed mathematical formulations.
European option price (numeric)
Tiwari, P., & Majumdar, S. (2025). Asian option valuation under price impact. arXiv preprint. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.48550/arXiv.2512.07154")}
price_geometric_asian, compute_p_adj
# Call option with no price impact
price_european(
S0 = 100, K = 100, r = 1.05, u = 1.2, d = 0.8,
lambda = 0, v_u = 0, v_d = 0, n = 10, option_type = "call"
)
# Put option with price impact
price_european(
S0 = 100, K = 100, r = 1.05, u = 1.2, d = 0.8,
lambda = 0.1, v_u = 1, v_d = 1, n = 10, option_type = "put"
)
# Verify put-call parity
call <- price_european(100, 100, 1.05, 1.2, 0.8, 0.1, 1, 1, 10, "call")
put <- price_european(100, 100, 1.05, 1.2, 0.8, 0.1, 1, 1, 10, "put")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.