IOptionPricer<T>
Interfaces · AiDotNet.Finance.Interfaces
A European-option pricing engine: fair value, first-order Greeks, and implied volatility.
Known implementations: BlackScholes<T>
For Beginners
An “option pricer” answers “what is this option worth, and how does that value move when the market moves?” The default is the Black-Scholes formula; swap in your own if you need a different model.
How It Works
This is a customization point, not a trainable model. Models that need to price options or
hedge option exposure (e.g. an options-focused RL trading agent, a covered-call portfolio model)
depend on this interface and default to the closed-form BlackScholes
implementation, but callers can substitute their own pricer (binomial tree, Heston, a learned
surface, …) without changing the consuming model.
Methods
| Method | Summary |
|---|---|
T Delta(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility, bool isCall) |
Delta — sensitivity of price to the underlying spot. |
T Gamma(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility) |
Gamma — sensitivity of delta to the underlying spot (same for calls and puts). |
T ImpliedVolatility(T marketPrice, T spot, T strike, T timeToExpiry, T riskFreeRate, bool isCall, int maxIterations, double tolerance) |
The implied volatility that reproduces marketPrice under this pricer. |
T Price(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility, bool isCall) |
Fair value of a European call (isCall = true) or put. |
T Rho(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility, bool isCall) |
Rho — sensitivity of price to the risk-free rate. |
T Theta(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility, bool isCall) |
Theta — sensitivity of price to the passage of time. |
T Vega(T spot, T strike, T timeToExpiry, T riskFreeRate, T volatility) |
Vega — sensitivity of price to volatility (same for calls and puts). |