This project implements a core Black-Scholes pricing engine for European options in pure Java, along with Greek calculators. It’s the first in a series of projects reconnecting with equity derivatives after 25 years — with a modern tech mindset.
- ✅ Black-Scholes pricing for calls and puts
- ✅ Calculation of Greeks: delta, gamma, theta, vega, rho
- ✅ Implied volatility solver (coming soon)
- ✅ CLI or REST interface (planned)
- ✅ 100% unit tested
- Java 17 or higher
- Git
BlackScholesCalculator.calcPrice(
OptionType.CALL,
spotPrice,
strikePrice,
timeToMaturity,
riskFreeRate,
volatility
);You can start the Spring Boot service via the Gradle wrapper:
./gradlew bootRunBy default, the server listens on port 8080. Check health with:
curl http://localhost:8080/
# OKI worked on the exotic derivatives desk in the late 90s as a UI developer. This is my way of returning — not as a trader or quant, but as an architect who can build the right tools for the domain.
- MIT License
Copyright (c) 2025 Hicham BAKIR
📌 Note: This project is released under the MIT License. Attribution is appreciated. Use responsibly.
Use the included Gradle wrapper (./gradlew) as the main build tool to compile and test:
./gradlew clean checkTests are written in Groovy using the Spock framework and organized into:
- Unit tests (
src/test/groovy) - Integration tests (
src/integrationTest/groovy) - End-to-end tests (
src/e2eTest/groovy)
A GitHub Actions workflow is configured in .github/workflows/ci.yml to run tests on push and pull requests to main. Merges to main should require passing this CI.
Contributions are welcome! Please review CONTRIBUTING.md for guidelines on how to contribute, and CODE_OF_CONDUCT.md for community standards.