Matlab Price Instrument logo

Matlab Price Instrument

OrganizationPopular
matlab
matlab-price-instrument

Price financial instruments in MATLAB using the Financial Instruments Toolbox. Route to the appropriate numerical method reference based on the user's request: Monte Carlo simulation (AssetMonteCarlo, IRMonteCarlo, RoughVolMonteCarlo), FFT / Numerical Integration (Vanilla European options), or Interest-Rate Trees (option-embedded bonds with IRTree). Use when the user asks to price financial instruments or compute Greeks using any of these methods. Use one of the following models depending on the pricing method and instrument: Black-Scholes, Bachelier, Heston, Bates, Merton, Hull-White, Black-Karasinski, Black-Derman-Toy, Cox-Ingersoll-Ross, Linear Gaussian 2 Factor (G2PP), Brace-Gatarek-Musiela (BGM), SABR-BGM, RoughBergomi, RoughHeston.

Overview

Publishermatlab
Repositorymatlab-agentic-toolkit
Skill namematlab-price-instrument
Stars
1.2K
Forks
138
Bundled files
10
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 10 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by matlab on GitHub. Read the source before you install it.

Installation

Install the Matlab Price Instrument AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/computational-finance/matlab-price-instrument
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit.git /tmp/matlab-agentic-toolkit
mkdir -p .claude/skills
cp -r /tmp/matlab-agentic-toolkit/skills-catalog/computational-finance/matlab-price-instrument .claude/skills/matlab-price-instrument
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Matlab Price Instrument in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Matlab Price Instrument on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Matlab Price Instrument is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Price Financial Instruments in MATLAB

Price financial instruments in MATLAB using the Financial Instruments Toolbox. Route to the correct numerical pricing method based on the user's request, then follow the method-specific reference for implementation details.

When to Use

  • User asks to price options, bonds, swaps, or derivatives in MATLAB
  • User asks for Greeks/sensitivities (delta, vega, gamma, theta, rho, lambda)
  • User mentions finpricer, fininstrument, finmodel, or ratecurve
  • User asks about Monte Carlo, tree / lattice, or FFT (Fast Fourier Transform) / FRFT (Fractional FFT) pricing
  • User wants to compare pricing methods for the same instrument

When NOT to Use

  • User is working with a non-MATLAB environment
  • User wants to build a custom instrument with a novel payoff function
  • User explicitly asks for a from-scratch implementation without the Financial Instruments Toolbox

Method Routing

Identify the pricing method from the user's request and read the corresponding reference:

MethodReferenceWhen to Use
Monte Carlo (MC)references/monte-carlo.mdSimulation-based pricing: path-dependent options, exotic options, Interest Rate (IR) derivatives via MC, rough volatility
FFT / FRFT / Numerical Integrationreferences/ni-fft.mdFast pricing: European vanilla options under Heston/Bates/Merton via characteristic functions
Interest Rate Treesreferences/embedded-bond-tree.mdCallable/puttable fixed-rate bonds with Hull-White (HW), Black-Karasinski (BK), Black-Derman-Toy (BDT), Cox-Ingersoll-Ross (CIR) tree models

Routing Rules

Read exactly one reference (and any relevant sub-references) that best matches based on these rules:

  1. User mentions a specific pricer:

    • AssetMonteCarlo, RoughVolMonteCarlo, IRMonteCarlo -> references/monte-carlo.md
    • FFT, NumericalIntegration -> references/ni-fft.md
    • IRTree -> references/embedded-bond-tree.md
  2. User mentions a specific numerical method and associated concepts:

    • Monte Carlo, simulation, NumTrials, SimulationDates -> references/monte-carlo.md
    • FFT, FRFT, characteristic function, CharacteristicFcnStep, LogStrikeStep -> references/ni-fft.md
    • Interest-rate tree, TreeDates, exercise probability -> references/embedded-bond-tree.md
  3. User mentions instrument type without a method:

    • Path-dependent options or other exotic options (Asian, Barrier, Lookback, Cliquet, Touch, Spread, Binary) -> references/monte-carlo.md
    • European vanilla options under stochastic vol/jump models -> references/ni-fft.md
    • Callable/puttable fixed-rate bonds -> references/embedded-bond-tree.md
    • IR derivatives (caps, floors, swaptions, swaps) -> references/monte-carlo.md
  4. User mentions model name without a method:

    • Heston, Bates, Merton + European vanilla -> references/ni-fft.md
    • Heston, Bates, Merton + exotic/path-dependent -> references/monte-carlo.md
    • Hull-White, Black-Karasinski, BDT, CIR + callable/puttable bond -> references/embedded-bond-tree.md
    • Hull-White, BK, Linear Gaussian 2 Factor (G2PP), Brace-Gatarek-Musiela (BGM), SABR-BGM + caps/floors/swaptions -> references/monte-carlo.md
    • Rough volatility (RoughBergomi, RoughHeston) -> references/monte-carlo.md
  5. Ambiguous:

    • When asked to price European vanilla options without specifying pricing method (e.g., "price European call options with Heston in MATLAB"), default to references/ni-fft.md (faster, more accurate for European vanilla)
    • If user needs path simulation in addition to price and sensitivities, use references/monte-carlo.md
    • If user requests exercise probabilities at each time step for option embedded bonds, use references/embedded-bond-tree.md

Shared Conventions

All three methods share these conventions:

  • Always prefer to use finpricer/fininstrument/finmodel/ratecurve objects (modern OO API) over legacy functions
  • Never use legacy functions unless the user explicitly names them, or the reference suggests them for specific use cases
  • Use name-value pairs with string keys: "DiscountCurve", not positional arguments
  • Parameter names are case-insensitive but write them in MixedCase for clarity
  • Always use datetime for dates (not datenum)
  • Do not use price as a variable name — it shadows the price function; prefer p, or capitalized Price
  • Request two outputs from price() when Greeks or tree data are needed: [p, pr] = price(...)

Common Mistakes (Cross-Method)

Best practice: Check MATLAB documentation (doc <functionName>, or help <functionName>, etc.) via the MATLAB MCP server before writing code.

MistakeCorrect
finpricer("MonteCarlo", ...)finpricer("AssetMonteCarlo", ...) or finpricer("IRMonteCarlo", ...)
finpricer("HWMonteCarlo", ...)finpricer("IRMonteCarlo", ...) with a HullWhite model
Mixing pricer families (e.g., FFT pricer for Asian option)FFT/NI only works for European vanilla; use AssetMonteCarlo for exotics
Using datenumAlways use datetime
Forgetting second output for Greeks[p, pr] = price(pricer, inst, "delta") — Greeks are in pr.Results
discount(rc, dates)discountfactors(rc, dates) — ratecurve uses discountfactors(), not discount()

Copyright 2026 The MathWorks, Inc.


Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Matlab Price Instrument AI skill do?

Price financial instruments in MATLAB using the Financial Instruments Toolbox. Route to the appropriate numerical method reference based on the user's request: Monte Carlo simulation (AssetMonteCarlo, IRMonteCarlo, RoughVolMonteCarlo), FFT / Numerical Integration (Vanilla European options), or Interest-Rate Trees (option-embedded bonds with IRTree). Use when the user asks to price financial instruments or compute Greeks using any of these methods. Use one of the following models depending on the pricing method and instrument: Black-Scholes, Bachelier, Heston, Bates, Merton, Hull-White, Blac...

Why use Matlab Price Instrument on TypingMind?

Because you install it once and use it with any model. Matlab Price Instrument is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Matlab Price Instrument in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/matlab/matlab-agentic-toolkit/tree/main/skills-catalog/computational-finance/matlab-price-instrument. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Matlab Price Instrument?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Matlab Price Instrument?

As many as you like. As long as a model supports skills, you can use Matlab Price Instrument with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Matlab Price Instrument AI skill free?

It is published on GitHub by matlab. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇