{"id":20159412,"url":"https://github.com/alecombi/hedgehog.jl","last_synced_at":"2026-06-05T06:31:16.081Z","repository":{"id":257304856,"uuid":"850304060","full_name":"aleCombi/Hedgehog.jl","owner":"aleCombi","description":"Julia library for pricing linear interest rate derivatives.","archived":false,"fork":false,"pushed_at":"2025-01-25T13:16:38.000Z","size":386,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T13:29:51.313Z","etag":null,"topics":["finance","interest-rate-derivatives","julia","quantitative-finance"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleCombi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-31T12:11:00.000Z","updated_at":"2025-01-25T12:55:21.000Z","dependencies_parsed_at":"2024-09-15T21:36:25.713Z","dependency_job_id":"9da1dd20-9c35-422d-941d-6023bfdb8ae3","html_url":"https://github.com/aleCombi/Hedgehog.jl","commit_stats":null,"previous_names":["alecombi/juliaexperiment","alecombi/derivativespricer","alecombi/hedgehog.jl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleCombi%2FHedgehog.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleCombi%2FHedgehog.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleCombi%2FHedgehog.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleCombi%2FHedgehog.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleCombi","download_url":"https://codeload.github.com/aleCombi/Hedgehog.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241597249,"owners_count":19988213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["finance","interest-rate-derivatives","julia","quantitative-finance"],"created_at":"2024-11-14T00:07:55.948Z","updated_at":"2026-06-05T06:31:16.076Z","avatar_url":"https://github.com/aleCombi.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hedgehog\n\n**Hedgehog** is a modular, SciML-inspired derivatives pricing library in Julia.\n\n[![Build Status](https://github.com/aleCombi/Hedgehog.jl/actions/workflows/CI.yml/badge.svg?branch=master)](https://github.com/aleCombi/Hedgehog.jl/actions/workflows/CI.yml?query=branch%3Amaster)\n[![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://alecombi.github.io/Hedgehog.jl/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)\n\n## 📐 Design Overview\n\nAll pricing and calibration workflows follow a SciML-inspired `solve(problem, method)` interface.\n\nTo compute a price, you define a `PricingProblem` using:\n\n- A **payoff** (e.g. European call, American put)\n- A set of **market inputs** (e.g. Black-Scholes inputs, Heston inputs)\n- Then solve it with a **pricing method** (e.g. Monte Carlo, analytical formula, Fourier inversion)\n\n```julia\npayoff = VanillaOption(...)\nmarket = BlackScholesInputs(...)\nproblem = PricingProblem(payoff, market)\n\nsol = solve(problem, BlackScholesAnalytic())\nprice = sol.price\n```\n\n## ✅ Supported Payoffs\n\n- European Call / Put\n- American Call / Put\n\n## 🧠 Supported Models (Price Dynamics)\n\n- Black-Scholes (`LognormalDynamics`)\n- Heston (`HestonDynamics`)\n\n## ⚙️ Pricing Methods\n\n- Analytical formulas (Black-Scholes)\n- Binomial Trees (Cox–Ross–Rubinstein)\n- Monte Carlo:\n  - Euler–Maruyama\n  - Exact simulation (Black-Scholes, Broadie–Kaya for Heston)\n- Fourier methods (Carr–Madan)\n\n## 📊 Calibration\n\nHedgehog supports calibration via a unified interface:\n\n- Solve for implied volatility using `CalibrationProblem`\n- Invert volatility surfaces\n- Build fully calibrated `RectVolSurface` objects from price matrices\n\n## 🧮 Sensitivities\n\n- Greeks supported via a `GreekProblem` interface:\n  - Finite differences\n  - Automatic differentiation\n  - `BatchGreekProblem` to compute a full gradient of sensitivities\n\n## 🚀 Highlights\n\n- Modular by construction: models, payoffs, and methods are swappable\n- Unified `solve(problem, method)` interface across pricing and calibration\n- Inspired by the SciML architecture and ecosystem\n- Built on top of SciML components (StochasticDiffEq.jl, NonlinearSolve.jl, Integrals.jl)\n- Open-source and focused on prototyping cutting-edge methods\n\n## 📦 Dependencies\n\nHedgehog is built on several high-quality Julia packages:\n\n- [SciML Ecosystem](https://sciml.ai/): \n  - [StochasticDiffEq.jl](https://github.com/SciML/StochasticDiffEq.jl) - For stochastic simulation\n  - [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl) - For calibration and implied volatility\n  - [Integrals.jl](https://github.com/SciML/Integrals.jl) - For Fourier-based pricing methods\n  - [Optimization.jl](https://github.com/SciML/Optimization.jl) - For advanced calibration\n  - [DataInterpolations.jl](https://github.com/SciML/DataInterpolations.jl) - For volatility surfaces and rate curves\n\n- [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) - Automatic differentiation for Greeks calculation\n- [Accessors.jl](https://github.com/JuliaObjects/Accessors.jl) - Functional lens-based access for Greeks and calibration\n- [Distributions.jl](https://github.com/JuliaStats/Distributions.jl) - For statistical distributions and sampling\n\n## 📖 Documentation\n\nComplete documentation is available at [https://alecombi.github.io/Hedgehog.jl/](https://alecombi.github.io/Hedgehog.jl/)\n\n## 🔍 Examples\n\nExample scripts demonstrating Hedgehog's functionality can be found in the `examples/` directory:\n\n- `examples/` - Standalone Julia scripts for various pricing scenarios\n- `examples/notebooks/` - Pluto notebooks for interactive exploration (in progress)\n\nThese examples cover various use cases from basic option pricing to calibration scenarios and are designed to help you get started with the library.\n\n## 🔍 Related Packages\n\nHedgehog.jl builds on the ideas and complements a number of Julia packages for derivatives pricing. Here's how it compares:\n\n### 🧰 [FinancialDerivatives.jl](https://github.com/JuliaQuant/FinancialDerivatives.jl)\n\nImplements classic models like Black-Scholes and binomial trees for vanilla options, with support for asian options too, which are not available in Hedgehog yet. Hedgehog aims at extending these ideas with automatic differentiation, calibration tools, and a modular problem-method interface.\n\n### 🧰 [CharFuncPricing.jl](https://github.com/s-broda/CharFuncPricing.jl)\n\nFocused on Fourier-based pricing under models like Heston. It implements COS method, which is not in Hedgehog at the moment. Hedgehog includes characteristic function methods too with Carr-Madan, including them within a broader framework for simulation, calibration, and AD/FD sensitivities.\n\n### 🧰 [AQFED.jl](https://github.com/jherekhealy/AQFED.jl)\n\nA deep and ambitious package accompanying a book on equity derivatives. Covers topics like basket options and rough paths. It has a deep coverage of cutting-edge methods. Hedgehog aims for a more modular and general-purpose architecture, designed for reuse and extensibility.\n\n### 🧰 [Bruno.jl](https://github.com/USU-Analytics-Solution-Center/Bruno.jl)\n\nA promising package combining simulation, pricing, and delta hedging. However, it hasn’t been updated in over two years. Hedgehog is under active development and structured for long-term flexibility.\n\n### 🧰 [QuantLib.jl](https://github.com/pazzo83/QuantLib.jl)\n\nA pure Julia port of the C++ QuantLib library. It offers broad model coverage but hasn’t been active in the last 5 years. Hedgehog focuses on modern Julia design, composability, and integration with scientific computing tools.\n\n---\n\n## 🦤 What Makes Hedgehog.jl Different?\n\n* **Modular design** with SciML-style `solve(problem, method)` interface\n* **Automatic and finite difference Greeks**, with lens-based parameter access (`Accessors.jl`)\n* **Built on Julia’s scientific stack**, including `DifferentialEquations.jl`\n* **Actively developed** with extensibility and composability as core design goals\n\nHedgehog aims to provide a clean, Julia-native foundation for derivatives pricing, sensitivities, and calibration — suited for research, prototyping, and production use.\n\n## 👥 Collaboration\n\nContributions are welcome! If you have ideas for new features, models, or improvements, feel free to open an issue or submit a pull request.\n\nYou can also reach out to Alessandro Combi via the Julia Zulip chat for questions or discussion.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecombi%2Fhedgehog.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falecombi%2Fhedgehog.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falecombi%2Fhedgehog.jl/lists"}