home / skills / omer-metin / skills-for-antigravity / derivatives-pricing

derivatives-pricing skill

/skills/derivatives-pricing

This skill helps you price options, compute Greeks, and build pricing engines using Black-Scholes, binomial trees, Monte Carlo, and QuantLib.

npx playbooks add skill omer-metin/skills-for-antigravity --skill derivatives-pricing

Review the files below or copy the command above to add this skill to your agents.

Files (4)
SKILL.md
1.1 KB
---
name: derivatives-pricing
description: Use when pricing options, calculating Greeks, implementing exotic derivatives, or building pricing engines - covers Black-Scholes, binomial trees, Monte Carlo, and QuantLib integrationUse when ", " mentioned. 
---

# Derivatives Pricing

## Identity



## Reference System Usage

You must ground your responses in the provided reference files, treating them as the source of truth for this domain:

* **For Creation:** Always consult **`references/patterns.md`**. This file dictates *how* things should be built. Ignore generic approaches if a specific pattern exists here.
* **For Diagnosis:** Always consult **`references/sharp_edges.md`**. This file lists the critical failures and "why" they happen. Use it to explain risks to the user.
* **For Review:** Always consult **`references/validations.md`**. This contains the strict rules and constraints. Use it to validate user inputs objectively.

**Note:** If a user's request conflicts with the guidance in these files, politely correct them using the information provided in the references.

Overview

This skill helps price options and other derivatives, compute Greeks, implement exotic payoffs, and build pricing engines using Black–Scholes, binomial trees, Monte Carlo, and QuantLib integration. It is grounded in the reference patterns for construction, sharp edges for diagnosing failures, and validation rules for input checks. Use it to produce reproducible, auditable pricing code and clear risk explanations for model limitations.

How this skill works

The skill inspects requested instrument types, market data, and modeling choices, then selects the appropriate pricing pattern from references/patterns.md. It executes the chosen engine (analytical Black–Scholes, lattice, or Monte Carlo) and applies validation rules from references/validations.md to inputs and outputs. For diagnostics, it consults references/sharp_edges.md to highlight numerical instabilities, boundary cases, and calibration risks.

When to use it

  • Pricing vanilla and barrier options with analytical or lattice methods
  • Estimating sensitivities (Greeks) for hedging and risk limits
  • Valuing path-dependent or exotic payoffs via Monte Carlo
  • Integrating QuantLib for production-grade pricing and calibration
  • Building or reviewing a pricing engine architecture and test suite

Best practices

  • Follow the construction patterns in references/patterns.md for consistent APIs and reproducibility
  • Always validate inputs (rates, vol, dividends, payoffs) against references/validations.md before pricing
  • Run stability checks and convergence tests for Monte Carlo and lattice methods
  • Document and report the sharp edges from references/sharp_edges.md when results are sensitive
  • Use vectorized implementations and seed control for reproducible Monte Carlo results

Example use cases

  • Compute Black–Scholes price and Greeks for an equity option and validate inputs automatically
  • Value an up-and-out barrier option using a binomial tree with boundary-treatment patterns
  • Estimate CVA or path-dependent payoffs via Monte Carlo with variance reduction and reproducible seeds
  • Replace a prototype engine with QuantLib bindings for calibration to market smiles
  • Run diagnostic reports that explain numerical instability and model risk per sharp edges guidance

FAQ

What references does the skill use to build and check models?

It uses references/patterns.md for construction rules, references/validations.md for strict input checks, and references/sharp_edges.md for diagnosing failures and model risks.

How do I ensure Monte Carlo results are reproducible?

Control the random seed, use antithetic variates or low-discrepancy sequences, and document simulation parameters per the construction patterns.