0% found this document useful (0 votes)
6 views2 pages

Python Option Portfolio Management Assignment

The assignment requires students to create and manage an option portfolio using Python, focusing on a selected stock from the NSE 500 database. Key tasks include data collection, option pricing using the Black-Scholes-Merton model, calculating option Greeks, constructing a portfolio with hedging strategies, and assessing Value-at-Risk for both hedged and unhedged portfolios. The assignment is divided into five parts, each with specific deliverables and evaluation criteria.

Uploaded by

f20221570
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Python Option Portfolio Management Assignment

The assignment requires students to create and manage an option portfolio using Python, focusing on a selected stock from the NSE 500 database. Key tasks include data collection, option pricing using the Black-Scholes-Merton model, calculating option Greeks, constructing a portfolio with hedging strategies, and assessing Value-at-Risk for both hedged and unhedged portfolios. The assignment is divided into five parts, each with specific deliverables and evaluation criteria.

Uploaded by

f20221570
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Birla Institute of Technology and Science, Pilani

First Semester: 2025-2026

FRAM Assignment: Creating and Managing an Option Portfolio using Python (100 Marks)
Deadline: 29th November 2025

Objective

To complete your assignment, begin by selecting a unique listed stock from the NSE 500
database and extracting real stock price data using Python APIs such as yfinance, NSEpy, or
Alpha Vantage. Once you have the data, compute the return statistics, focusing on volatility,
skewness, and kurtosis. Next, utilise the Black-Scholes-Merton (BSM) model to price both
call and put options. Construct an options chain for five strike prices, including at-the-
money (ATM) ± 5%, ATM ± 2%, and ATM. Calculate the option Greeks, specifically Delta,
Gamma, Vega, Theta, and Rho. Afterwards, build and visualise a volatility surface to
understand the changes in implied volatility. Additionally, compute the implied volatility
based on option market prices. Design a portfolio of options and implement delta and
gamma hedging strategies to manage risk. Finally, assess the Value-at-Risk (VaR) for both
your hedged and unhedged portfolios to evaluate their potential risks.

Assignment Tasks

Part A: Data Collection & Statistics

1. Select one stock from NIFTY 200 (e.g., HDFC Bank, Reliance, ICICI).
2. Using Python APIs (e.g., yfinance), extract daily stock prices for the last 3 months.
3. Compute:
- Daily log returns
- Annualized volatility (√252 × daily std)
- Skewness
- Kurtosis
Deliverable: a table of summary statistics and plots

Part B: Option Pricing

4. From the last available stock price (ATM price), set 3 strikes: ATM, ATM+5%, ATM-5%
ATM+2%, ATM-2%.
5. Consider 3 maturities: 30, 60, 90 days.
6. Using the BSM model, compute call and put prices for each strike × maturity combination.
Deliverable: an option pricing table with 30 values (5 strikes × 3 maturities × 2 option types).
Part C: Greeks & Volatility

7. For each option, calculate:


- Delta (call & put)
- Gamma
- Vega
- Theta
- Rho
8. Download the option chain data from the last trading day.
- Calculate the Implied Volatility (IV) using the option chain.
- Calculate Greeks again using this IV.
- Compare Greeks calculated using historical volatility vs option chain IV.
9. Build a volatility surface (strike vs maturity vs implied vol).
Deliverable: table of Greeks + IV surface in Excel & graph.

Part D: Portfolio & Hedging

10. Construct a portfolio with any combination of the above 6 options (e.g., buy 1 call, sell 1 put).
11. Compute:
- Portfolio Delta, Gamma, Vega
- Hedge the portfolio using underlying stock (for Delta) and futures/options (for Gamma).
- Show before and after hedge Greeks.
12. Simulate portfolio PnL under small stock price changes (±1%, ±2%) to demonstrate hedging
effect.
Deliverable: portfolio table + hedged portfolio table + PnL comparison (back testing)

Part E: Risk (VaR Calculation)

13. Using the portfolio returns, compute 1-day 95% and 99% Value-at-Risk (VaR) using:
- Parametric (variance-covariance) method
- Historical simulation (last 60 days returns)
14. Compare hedged vs unhedged VaR.
Deliverable: VaR table + discussion.

Evaluation (100 Marks)


• Data collection & statistics: 10 marks
• Option pricing (BSM): 15 marks
• Greeks calculation: 15 marks
• Volatility surface & IV: 15 marks
• Portfolio construction & hedging: 20 marks
• VaR calculation: 15 marks
• Report clarity & coding quality: 10 marks

You might also like