Python Option Pricing & Hedging Tool

Python Option Pricing & Hedging Tool 3.0

No permission to download
Q1: What are the main features of this tool?
A:
- Strike Price vs. Volatility Analysis: Understand how option prices change with varying strike prices and volatility levels.
- Trading Strategy Overlays: Visualize the payoffs of popular trading strategies like covered calls, bull spreads, and more.
- Optimal Hedging Techniques: Derive neutral positions for delta, gamma, vega, rho, and theta hedging using Black-Scholes parameters.
- Integration with Q/Kdb+: Utilize a live Q server for real-time storage and output of user inputs and option prices, enhancing the tool’s functionality with advanced data handling capabilities.

Q2: Why are out of the money strike prices not being recorded at a loss of their full purchase price at all nodes?
A: The essence of this project was to study the Black-Scholes framework and show how the model reacts to changes in strike price and volatility. Think of the figures more as live P/L at each point in strike and volatility. Intuitively, you are “down” the amount of money at each node rather than it being a final loss at the expiry. The point of the graph additions is to show both perspectives – a live P/L and a final expiry P/L for each trade.

Q3: How does the Integration with Q/Kdb+ enhance the tool?
A: The integration with Q/Kdb+ allows for real-time storage and output of user inputs and option prices. This feature is particularly useful for users who need to handle large datasets or require real-time data analysis, bridging the gap between Python and Q/Kdb+.

Q4: Where did I find $100k/year to pay for KDB+?
A: KX Systems are kind enough to provide a free demo for a whole year. As an alternative, a mySQL database can do the same job, but there is more potential for this project if one searches for ways to optimize the GUI for high frequency data inputs from KDB+ in the future. Though this would likely require migration away from Streamlit and investing into something more serious to keep up with the speed.

Q5: What do I think can be built on to improve the project?**
A: The optimal hedging section can be built upon to handle the trading strategies or even larger option portfolios in a more modularized way. A deeper dive into the KDB+ integration likely has the most potential for really cool additions. Speed of the algorithm can certainly be improved.

Q6: What are the requirements for the project to run?
A:
- streamlit==1.12.0
- pandas==1.5.3
- numpy==1.23.5
- scipy==1.10.0
- matplotlib==3.7.1
- seaborn==0.12.2
- qpython
Back
Top Bottom