Academic Project — M2 272 Quantitative Finance, Université Paris Dauphine-PSL
Théo Verdelhan & Arthur Le Net
This repository contains a high-performance trinomial tree pricer for European and American options, implemented in C# and supporting discrete dividends. The code is a faithful translation of a validated Python implementation, with a focus on numerical accuracy, extensibility, and computational efficiency.
- European & American option pricing (call/put)
- Discrete dividend support (date & amount)
- Fast convergence to Black-Scholes analytical price
- Calculation of Greeks (Delta, Gamma, Theta, Vega, Rho)
- Modular, object-oriented architecture
- Extensive validation and test suite
This project was developed as part of the M2 272 Quantitative Finance course at Université Paris Dauphine-PSL. The assignment required:
- Faithful translation of a Python trinomial pricer to C#
- Numerical validation against Black-Scholes
- Implementation of dividend handling and Greeks
- Performance optimization and code structuring
- .NET 9.0 or higher
# Clone the repository
git clone https://github.com/theov07/Trinomial_Option_Pricer_CSharp.git
cd Trinomial_Option_Pricer_CSharp
# Build
dotnet build
# Run
dotnet runAll main parameters can be set in Tester/TesterPricer.cs (see the Main() method):
var market = new Market(s0: 100.0, rate: 0.05, sigma: 0.30, dividend: 3.0,
exDivDate: DateTime.Parse("2026-04-21"));To change the scenario, simply edit the values for:
s0: Initial underlying pricerate: Risk-free ratesigma: Volatilitydividend: Dividend amountexDivDate: Ex-dividend date
# Convergence test
dotnet run | grep -A 10 "CONVERGENCE"
# Greeks test
dotnet run | grep -A 10 "GREEKS"CSharp-Pricer-Verdelhan-LeNet/
├── Core/ # Main pricer classes
│ ├── Market.cs # Market parameters
│ ├── Option.cs # Option definition
│ ├── Node.cs # Tree node
│ ├── Tree.cs # Trinomial tree logic
│ ├── BlackScholes.cs # Analytical Black-Scholes model
│ └── Greeks.cs # Sensitivities (Greeks)
├── Tester/ # Test and demo scripts
│ └── TesterPricer.cs # Main test runner
├── TrinomialPricer.csproj # .NET project file
└── README.md # Documentation
- Convergence: Error < 1 cent vs Black-Scholes for 400 steps
- Speed: < 2 seconds for 400 steps (~80,000 nodes)
- Dividend Handling: Correct price adjustment for discrete dividends
- Greeks: Delta, Gamma, Theta, Vega, Rho validated numerically
- Black, F., & Scholes, M. (1973). The Pricing of Options and Corporate Liabilities. Journal of Political Economy, 81(3), 637-654.
- Hull, J. C. (2018). Options, Futures, and Other Derivatives (10th Edition).
- Cox, J. C., Ross, S. A., & Rubinstein, M. (1979). Option Pricing: A Simplified Approach. Journal of Financial Economics, 7(3), 229-263.
This project is for academic purposes. The code is provided as-is for educational use.
For questions or feedback:
- Théo Verdelhan — theo.verdelhan@dauphine.eu
Developed at Université Paris Dauphine-PSL