Index of every page on this site: llms.txt
All skills
yonesuke avatar

/optionpricing

@1e23d34
Run it yourself

Option pricing tools including Black-Scholes model, Greeks Calculation using Auto-Differentiation, and Exotic Options.

  • 4 files
  • 5.4 KB
  • Updated 10 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/yonesuke/skills/optionpricing

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

examples.md

≈225 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Option Pricing Examples

Analytical solutions and Greeks calculation using JAX.

1. Black-Scholes-Merton & Greeks

Calculates European option prices and Greeks using JAX auto-diff.

Source: scripts/bsm.py

# /// script
# requires-python = ">=3.12"
# dependencies = ["jax", "jaxlib", "scipy"]
# ///

import jax
import jax.numpy as jnp
from jax import grad, jit
from jax.scipy.stats import norm

# 1. Black-Scholes-Merton Formula
@jit
def black_scholes_call(S, K, T, r, sigma):
    """
    Price of a European Call Option.
    S: Spot Price
    K: Strike Price
    T: Time to Maturity (years)
    r: Risk-free rate
    sigma: Volatility
    """
    d1 = (jnp.log(S / K) + (r + 0.5 * sigma ** 2) * T) / (sigma * jnp.sqrt(T))
    d2 = d1 - sigma * jnp.sqrt(T)
    return S * norm.cdf(d1) - K * jnp.exp(-r * T) * norm.cdf(d2)

# ... (See script for Put and Greeks)

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 1e23d34. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Dormantupdated 10 months ago

README badge

README badge for yonesuke/skills/optionpricing