RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

RunMat™ is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

LicensePrivacy
/
See all docs
Builtin Reference
    • blsimpv
    • blsprice
    • macd

blsprice — Compute Black-Scholes European call and put option prices.

blsprice(Price,Strike,Rate,Time,Volatility) computes European call and put option prices using the Black-Scholes model. An optional Yield argument defaults to zero.

Syntax

blsprice(Price,Strike,Rate,Time,Volatility)

How blsprice works

  • Returns the call price as the single-output value and [Call, Put] under two-output semantics.
  • Each input may be scalar or an array. Inputs use MATLAB implicit expansion, so compatible nonscalar dimensions expand elementwise.
  • The optional Yield argument represents a continuously compounded dividend or foreign risk-free yield; an empty Yield uses the default zero yield.
  • Invalid financial domains and NaN inputs produce elementwise NaN outputs rather than aborting the full call.

Examples

European stock option

[Call, Put] = blsprice(100, 95, 0.10, 0.25, 0.50)

Expected output:

Call = 13.6953, Put = 6.3497

Stock index option with yield

[Call, Put] = blsprice(910, 980, 0.02, 0.25, 0.25, 0.025)

Expected output:

Call = 19.6863, Put = 90.4683

Using blsprice with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how blsprice changes the result.

Run a small blsprice example, explain the result, then change one input and compare the output.

Related Finance functions

blsimpv · macd

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how blsprice is executed, line by line, in Rust.

  • View the source for blsprice in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • How blsprice works
  • Examples
  • European stock option
  • Stock index option with yield
  • Using blsprice with coding agents
  • Related Finance functions
  • Open-source implementation
  • About RunMat