Quantitative Finance Library & Option Trading Tool
Quantitative Finance Library & Option Book Management Tool
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.
๐ Features and Highlights
- 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.
๐ Demo Code
1. Demo script :
- 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/npcQdp4R_DU?si=ZkZCIkVludQWTVGu
2. Booking script :
- 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
๐ Risk Exposure Analysis
This library provides a detailed breakdown of portfolio risk. Below are sample visualizations of risk metrics:
Payoff
Delta Risk Exposure
Vega Convexity
Pnl Price Exposure
๐ Volatility Surface: Smile and Skew
Volatility Surface Example
Volatility surfaces integrate skew and term structure, required for OTM option trading.๐ Description of Classes
1. Asset Class
- Represents the underlying asset for options.
- Enables simulations and position management for hedging strategies.
2. Option Class
- Built on the Asset class to represent financial derivatives.
- Key methods:
DeltaRisk, GammaRisk, VegaRisk, ThetaRisk, VannaRisk, VolgaRisk
- Pricing: optionpricemc, optionpriceclose_formulae
- Visualization: displaypayoffoption, RiskAnalysis, PnlRisk
3. Option 1st Generation
- Comprises European vanilla options (e.g., spreads, straddles, strangles).
- Inherits features from the
Optionclass for advanced analysis.
4. Book Class
- Combines multiple options (European or 1st Generation) into a portfolio.
- Focused on a single underlying asset for simplicity.
5. Booking Request
- Updates a booking Excel file to manage option book positions.
- Computes Mark-to-Market (MtM) values and assesses risk exposure.
DashBoard - Risk exposure management & Booking (IN PROGRESS...)
:zap: Subprojects
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.
๐ฏ Motivations
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.
๐ ๏ธ How to Use
- Clone the repository:
git clone https://github.com/Quantitative_Finance.git
- Install dependencies:
bash
pip install -r requirements.txt
- Explore the demo code and customize it for your use case.
๐ฅ Contributions
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request.
๐ง Contact
For questions or feedback, contact: hugo.lambert.perso@gmail.com