Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Avhz RustQuant Merton73 Model

From Leeroopedia


Knowledge Sources
Domains Option_Pricing, Equity_Options, Quantitative_Finance
Last Updated 2026-02-07 19:00 GMT

Overview

Concrete tool for Merton (1973) continuous dividend yield stock option pricing provided by the RustQuant library.

Description

The Merton73 struct defines the parameter set for the Merton (1973) stock option pricing model with continuous dividend yield. This is a specialization of the Generalized Black-Scholes-Merton framework where the cost of carry b is set to r - q, where q is the continuous dividend yield.

This model extends the original Black-Scholes (1973) formula to account for the fact that the stock pays a continuous stream of dividends at rate q. The holder of the stock receives dividends, which reduces the cost of carry from r (the financing cost) to r - q.

The struct stores four parameters:

  • s -- The current stock price.
  • r -- The risk-free interest rate.
  • q -- The continuous dividend yield.
  • v -- The volatility of the stock price.

The actual option pricing, Greeks, and implied volatility computations are provided by the shared Generalized Black-Scholes-Merton engine, which dispatches based on the s(), r(), and b() accessor methods.

Usage

Use the Merton 1973 model for pricing European options on dividend-paying stocks or equity indices with a known continuous dividend yield. It is the standard extension of Black-Scholes for equity derivatives where dividends are modeled as a continuous percentage of the stock price.

Code Reference

Source Location

Signature

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Merton73 {
    s: f64,  // Stock price
    r: f64,  // Risk-free rate
    q: f64,  // Continuous dividend yield
    v: f64,  // Volatility
}

impl Merton73 {
    pub fn new(s: f64, r: f64, q: f64, v: f64) -> Self;
    fn s(&self) -> f64;  // Returns s (stock price)
    fn r(&self) -> f64;  // Returns r (risk-free rate)
    fn b(&self) -> f64;  // Returns r - q (cost of carry minus dividend yield)
}

Import

use RustQuant::models::Merton73;

I/O Contract

Inputs

Name Type Required Description
s f64 Yes Current stock price.
r f64 Yes Risk-free interest rate.
q f64 Yes Continuous dividend yield.
v f64 Yes Volatility of the stock price.

Outputs

Name Type Description
s() f64 Returns the stock price s.
r() f64 Returns the risk-free rate r.
b() f64 Returns r - q (cost of carry adjusted for continuous dividends).

Usage Examples

use RustQuant::models::Merton73;
use RustQuant::instruments::{BlackScholesMerton, TypeFlag};

// Create Merton 1973 model for a dividend-paying stock option
let model = Merton73::new(
    100.0,  // stock price
    0.05,   // risk-free rate
    0.02,   // continuous dividend yield (2%)
    0.20,   // volatility (20%)
);

// The Merton73 model parameters feed into the Generalized BSM pricer:
// s = 100.0, r = 0.05, b = 0.05 - 0.02 = 0.03
// These are used by the shared GBS option pricing engine.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment