Inspiration

The project was born from the "Paradox of Choice" in the Indian stock market. While many investors chase high returns, they often ignore the "price" of those returns: volatility. We wanted to create a visual tool that strips away the noise and allows investors to see which blue-chip stocks are actually providing the best "bang for their buck" (Risk-Adjusted Return).

What it does

The tool processes historical price data for major NSE-listed tickers to calculate two critical metrics: Annualized Volatility and Annualized Return. It then plots these on a scatter matrix, allowing users to instantly identify "Alpha" performers (high return, low risk) versus underperformers (high risk, low return) relative to their peers.

How we built it

Data Acquisition: Used the yfinance API to pull adjusted closing prices for various NIFTY tickers.

Computation:

Leveraged Pandas and NumPy to calculate daily log returns, which were then annualized (multiplying by 252 trading days).

Visualization:

Used Matplotlib to generate the scatter plot, including coordinate-based text labeling to ensure each ticker (e.g., SUNPHARMA.NS) is clearly identifiable.

Challenges we ran into

The biggest hurdle was Data Normalization. Different stocks have different trading volumes and price points; calculating a standardized volatility that allows for a "fair" comparison between a high-growth tech stock and a stable banking stock required careful mathematical scaling. Additionally, handling label overlap in the scatter plot to maintain readability was a significant UI challenge.

We successfully mapped the Efficient Frontier for this specific basket of stocks. Seeing SUNPHARMA.NS emerge as a clear outlier in the "Sweet Spot" (Top-Left) provided a data-driven insight that isn't immediately obvious just by looking at standard price charts.

What we learned

We gained a deep appreciation for Modern Portfolio Theory (MPT). The project reinforced that "Risk" isn't just a buzzword—it is a measurable statistical variable. We also learned that in the current market, the highest returning stocks aren't always the most volatile, challenging the common misconception that you must take massive risks to see massive gains."

Built With

Share this project:

Updates