Hack'Prise Second Edition| Hackathon
I am happy to share with you all my last experience participating in the Value - Hack'prise organized by ENSI Junior Enterprise.
The Hackathon was a great opportunity for me to tackle the stock market domain, as I was required to implement a dynamic optimization algorithm for portfolio allocation, according to the Sharpe ratio. And to build a time series forecasting algorithm to predict the stock prices of the optimized portfolio.
It is important to understand that a portfolio is no more than just a collection of stock investments held by an investor. Optimizing a financial portfolio requires selecting the best possible portfolio out of a set of all portfolios being considered according to an objective.
According to modern portfolio theory, one possible way to optimize a portfolio is to aim for an efficient frontier. The efficient frontier is an investment portfolio that lies on the most efficient(ideal) coordinates of the risk-return graph(spectrum). There is a formal definition that is used by many experts in this field, "Efficient frontier is the set of portfolios which satisfy the condition that no other portfolio exists with a higher expected return but with the same standard deviation of return.
Now we know the aim is to achieve one of the efficient frontier portfolios. However, we can even go one step further than the overall portfolio. We can identify the best possible proportion of the stocks to use in any given portfolio. This is possible by using the Sharpe ratio.
The Sharpe ratio was developed by William Sharpe in 1966. The Sharpe ratio describes how much excess return of money one receives for the extra volatile time he/she holds onto the investment. It measures how much extra capital money one can receive by waiting and holding onto a risky stock investment. The Sharpe ratio can be calculated by taking the difference between the returns of the investment and the risk-free return, divided by the standard deviation of the investment.
Used technologies : Pypfopt, Keras, LSTM, Seaborn, Matplotlib, Numpy, Pandas,
My Notebooks :
- Diversification notebook : https://www.kaggle.com/code/salimhammadi07/value-diversification
- Forecasting notebook : https://www.kaggle.com/code/salimhammadi07/value-forecasting