matlab/matlab-agentic-toolkit / skills-catalog/computational-finance/matlab-price-instrument
matlab-price-instrument
VerifiedPrice 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.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.3 KB |
| manifest.yaml | config | 462 B |
| references/embedded-bond-tree.md | markdown | 10.2 KB |
| references/monte-carlo.md | markdown | 5.2 KB |
| references/monte-carlo/asset-monte-carlo.md | markdown | 13.0 KB |
| references/monte-carlo/ir-monte-carlo.md | markdown | 17.9 KB |
| references/ni-fft.md | markdown | 20.5 KB |
| references/ni-fft/bates-legacy-api.md | markdown | 2.1 KB |
| references/ni-fft/heston-legacy-api.md | markdown | 1.9 KB |
| references/ni-fft/legacy-api-shared.md | markdown | 4.3 KB |
| references/ni-fft/merton-legacy-api.md | markdown | 2.3 KB |
references/ni-fft/merton-legacy-api.md
View on GitHub# Merton Legacy API Reference
See `legacy-api-shared.md` for NV arguments, ExpandOutput, Strike=[], output mapping rules, and legacy-to-OO mapping.
## Function Signatures
```matlab
% Pricing — FFT returns [Price, StrikeOut]; NI returns Price only
[Price, StrikeOut] = optByMertonFFT(Rate, AssetPrice, Settle, Maturity, ...
OptSpec, Strike, Sigma, MeanJ, JumpVol, JumpFreq)
Price = optByMertonNI(Rate, AssetPrice, Settle, Maturity, ...
OptSpec, Strike, Sigma, MeanJ, JumpVol, JumpFreq)
% Sensitivities — FFT returns [..., StrikeOut]; NI returns Price and Sensitivities only
[PriceSens, StrikeOut] = optSensByMertonFFT(Rate, AssetPrice, Settle, Maturity, ...
OptSpec, Strike, Sigma, MeanJ, JumpVol, JumpFreq, Name, Value)
PriceSens = optSensByMertonNI(Rate, AssetPrice, Settle, Maturity, ...
OptSpec, Strike, Sigma, MeanJ, JumpVol, JumpFreq, Name, Value)
```
**Positional model params (4):** `Sigma, MeanJ, JumpVol, JumpFreq`
**Available OutSpec values:** `"price"`, `"delta"`, `"gamma"`, `"vega"`, `"rho"`, `"theta"` (6 total — **no `"vegalt"`**)
## Merton-Specific Differences
- **No `"vegalt"`** — Merton has no stochastic variance, so vol-of-vol sensitivity is undefined
- **No `LittleTrap`** — not applicable (no stochastic variance path)
- **No `VolRiskPremium`** — not applicable; passing either causes an error
- **Positional arg is `Sigma`** but the OO property is **`'Volatility'`** — do not confuse them
## Example: All Greeks with ExpandOutput
```matlab
Strike = [90; 95; 100; 105; 110];
Maturity = [datetime(2026,12,31); datetime(2027,6,30); datetime(2027,12,31)];
Sigma = 0.2; MeanJ = -0.1; JumpVol = 0.2; JumpFreq = 1.0;
% 6 sensitivities only — no "vegalt"
OutSpec = ["price", "delta", "gamma", "vega", "rho", "theta"];
% Returns six 5-by-3 matrices + StrikeOut
[Price, Delta, Gamma, Vega, Rho, Theta, StrikeOut] = ...
optSensByMertonFFT(Rate, AssetPrice, Settle, Maturity, ...
OptSpec, Strike, Sigma, MeanJ, JumpVol, JumpFreq, ...
'OutSpec', OutSpec, 'CharacteristicFcnStep', 0.1, 'ExpandOutput', true);
```
## OO Model Mapping
`Sigma, MeanJ, JumpVol, JumpFreq` → `finmodel("Merton", 'Volatility', Sigma, 'MeanJ', MeanJ, 'JumpVol', JumpVol, 'JumpFreq', JumpFreq)`
**Important:** Legacy positional arg is `Sigma`; OO property is `'Volatility'`.
----
Copyright 2026 The MathWorks, Inc.
----
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |