Welcome to the Quantitative Finance Library, a Python-based toolkit for modeling, analyzing, and managing books of european options. This repository is the result of in-depth studies in quantitative finance, combining practical tools with advanced academic concepts.
- Comprehensive Risk Analysis: Includes PnL, Greeks, Vega convexity, skew, and term structure risk metrics.
- Option Portfolio Management: Analyzing and managing books of European options.
- Dynamic Simulations: Simulating the evolution of underlying assets and risk profiles.
- Volatility Surfaces: Modeling volatility as a surface for active volatility trading.
- Learning Tool: A valuable application for an initial assessment of risk exposure in a new, advanced trading strategy.
- Visualizing Trading Strategies β This tool is perfect for users who want to visualize new trading strategies. Users can easily access the theoretical price of a book, payoff, Greek exposure (in 2D or 3D), skew, and term structure. https://youtu.be/hUNAKcM-MmM
- Options Trading and Risk Management β For more advanced users, this tool allows traders to save their positions and conveniently access risk metrics, making it highly useful for managing option trades. https://youtu.be/Wg5Euv6VoKg
This library provides a detailed breakdown of portfolio risk. Below are sample visualizations of risk metrics:
Volatility surfaces integrate skew and term structure, required for OTM option trading.
- Represents the underlying asset for options.
- Enables simulations and position management for hedging strategies.
- Built on the Asset class to represent financial derivatives.
- Key methods:
- Risk Metrics:
DeltaRisk
,GammaRisk
,VegaRisk
,ThetaRisk
,VannaRisk
,VolgaRisk
- Pricing:
option_price_mc
,option_price_close_formulae
- Visualization:
display_payoff_option
,RiskAnalysis
,PnlRisk
- Risk Metrics:
- Comprises European vanilla options (e.g., spreads, straddles, strangles).
- Inherits features from the
Option
class for advanced analysis.
- Combines multiple options (European or 1st Generation) into a portfolio.
- Focused on a single underlying asset for simplicity.
- Updates a booking Excel file to manage option book positions.
- Computes Mark-to-Market (MtM) values and assesses risk exposure.
Example Visualization:
I have also led parallel studies on:
- Optimizations.
- DA Power Correlations between countries.
- Cross-Border Optimizations in power markets.
- Swing Options for energy markets.
- Pricing CSSOs.
This library integrates these research insights into actionable tools for advanced financial and energy market analysis.
This project began in Fall 2023 and has evolved with three main goals:
- Academic Exploration: Integrate advanced quantitative finance approaches.
- Personal Library: Develop a Python toolkit for advanced option strategies.
- Portfolio Management: Study and manage the evolution of option books over time.
The Quantitative Finance Library is now a robust tool for risk analysis and option portfolio management, leveraging simulations and dynamic risk profiling.
- Clone the repository:
git clone https://github.com/Quantitative_Finance.git
- Install dependencies:
pip install -r requirements.txt
- Explore the demo code and customize it for your use case.
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request.
For questions or feedback, contact: hugo.lambert.perso@gmail.com