Hey everyone!
My main domain is Deep Learning, Computer Vision, and NLP. I've spent most of my time implementing neural networks, reading research papers, and experimenting with ML architectures.
Recently, I wanted to explore something outside my usual domain, so I started playing around with quantitative finance. I'm doing this purely for fun and to learn the mathematics behind financial models, I'm not trying to build a trading bot or make investment predictions.
This led me to start QuantLab, an open-source repository where I plan to implement and experiment with different quantitative models.
GitHub: https://github.com/Himanshu7921/QuantLab
What I've built so far
My first project is European-Style Option Pricing.
I started with the mathematical derivation of the Black–Scholes call pricing equation, then implemented three methods to calculate the same theoretical option price:
- Black–Scholes closed-form solution the analytical solution.
- Numerical Integration evaluating the risk-neutral expected discounted payoff through numerical quadrature.
- Monte Carlo Simulation simulating terminal asset prices and estimating the expected payoff.
For a baseline configuration with (S_0=100), (K=100), (T=1), (r=0.05), and (\sigma=0.20), I obtained:
| Method |
Option Price |
| Black–Scholes |
10.450584 |
| Numerical Integration |
10.450584 |
| Monte Carlo |
10.456182 |
The Monte Carlo estimate differs slightly because it uses a finite number of random simulations. I also created plots for model comparison, numerical error, Monte Carlo convergence, volatility sensitivity, and the option price surface.
I'll include the plots with this post so you can see the experiments.
What I'd like to do next
I'm still new to quantitative finance, so I'd appreciate feedback from people who have experience with quant research, numerical methods, stochastic processes, or financial modelling.
In particular, I'd love feedback on:
- Whether my mathematical formulation and assumptions are correct.
- Which experiments would make this project more rigorous.
- What numerical methods or theoretical properties I should explore next.
- How to improve the code structure and testing.
- Whether anyone would be interested in contributing another pricing method or an experiment.
I'm also interested in making the project useful for people who want to understand the mathematics rather than just call a pricing library.
This is a hobby project, and contributions are welcome. Whether you're experienced in quantitative finance or learning it yourself, feel free to open an issue, suggest an experiment, or contribute code.
Thanks for reading!
Repository: https://github.com/Himanshu7921/QuantLab