Matlab price instrument

From matlab/matlab-agentic-toolkit · View interactive version

Matlab price instrument is an AI agent skill from the GitHub repository matlab/matlab-agentic-toolkit. 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 Inter

How to use this skill

Skill file

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

When NOT to Use

Method Routing

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

| Method | Reference | When to Use |

|--------|-----------|-------------|

| Monte Carlo (MC) | references/monte-carlo.md | Simulation-based pricing: path-dependent options, exotic options, Interest Rate (IR) derivatives via MC, rough volatility |

| FFT / FRFT / Numerical Integration | references/ni-fft.md | Fast pricing: European vanilla options under Heston/Bates/Merton via characteristic functions |

| Interest Rate Trees | references/embedded-bond-tree.md | Callable/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:
  1. User mentions a specific numerical method and associated concepts:
  1. User mentions instrument type without a method:
  1. User mentions model name without a method:
  1. Ambiguous:

Shared Conventions

All three methods share these conventions:

Common Mistakes (Cross-Method)

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

| Mistake | Correct |

|---------|---------|

| 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 datenum | Always 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.


Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.