This repository contains Python code for analyzing the performance of a portfolio of 8 Indian stocks spanning from October 14, 2019, to April 11, 2022.
The code calculates daily simple returns, standard deviations, Sharpe ratios, and cumulative returns for each stock in the portfolio. It also visualizes the daily closing prices of each stock and the correlation matrix between the stocks.
To run the code, follow these steps:
- Clone the repository
- Install the required libraries: numpy, pandas, matplotlib, seaborn, nsepy
- Run the script on jupyter notebook
Correlation:
The correlation between the stocks in the portfolio is generally low, indicating that they are not highly correlated and may not move in lockstep. This suggests that the portfolio may be less susceptible to overall market fluctuations.
Average Daily Returns:
The average daily returns of the stocks range from 0.045% to 0.264%. This suggests that the stocks have varying levels of potential returns. Stocks with higher average daily returns may offer more growth potential, while stocks with lower average daily returns may be more stable.
Annualized Standard Deviations:
The annualized standard deviations of the stocks range from 25.2% to 69.5%, indicating that they have varying levels of volatility. Stocks with higher annualized standard deviations are more prone to fluctuations in value. This means that investors should carefully consider their risk tolerance before investing in these stocks.
Sharpe Ratios:
The Sharpe ratios of the stocks range from 0.179 to 0.494, indicating that some stocks have higher returns relative to their risk. This means that these stocks may be more attractive investments for investors seeking higher returns without sacrificing excessive risk.
Cumulative Returns:
The cumulative returns of the stocks have varied over time, with some stocks significantly outperforming others. This suggests that the performance of the stocks can be affected by various factors, such as external market conditions and company-specific events. Investors should carefully monitor the performance of the portfolio to ensure that it aligns with their investment goals.
The analysis provides valuable insights into the performance and risk characteristics of the portfolio stocks. It is important to consider these factors when making investment decisions. Investors should consider their risk tolerance, investment horizon, and financial goals when selecting stocks for their portfolio.