top of page

Portfolio Optimization

  • Writer: keeyan2502
    keeyan2502
  • Oct 13, 2023
  • 1 min read

Updated: Jun 2, 2024

(This code is only for the demo that calls the API, the code within the API that I wrote is classified, but described here at a high-level)



Technologies Used: Python, Flask API, JavaScript, HTML/CSS, SQL Server, VS Code, highcharts.js, GitHub

This is my biggest project in programming so far (as of August 2023); a tool intended to be used by 2000+ paying financial advisors in India and the pinnacle of my last internship at NGEN Research. Highly requested by the users, the basic functionality of this program was to simply input a list of assets, and then return 6 optimized portfolios which each allocate different weights to each fund in order to maximize returns, volatility, or Sharpe ratio.


My prior experience allowed me to run proper statistical analysis on different portfolios, using covariance matrices and other statistical algorithms to evaluate the proficiency of a particular portfolio. My first idea was to try out every single possible portfolio, but time complexity wise, this was completely infeasible as the number of permutations increase by O(n!) when inputting n funds.


After significant research, I settled on a value-based and ranking-based model on past returns, and while I cannot go into detail on the exact algorithm, I made many tweaks throughout the process to optimize my results. This included the introduction of an 'amplifier', an innovation that allowed users to try out riskier and more extreme positions at the expense of an equal distribution of assets. This was very well received by the user-base, and was a breakthrough in my algorithm.







 
 
bottom of page