top of page

Picking and Sizing S&P 500 Positions from Natural Language

  • Writer: Henry Salkever
    Henry Salkever
  • Nov 10, 2024
  • 1 min read

At the 2024 edition of the HackNC hackathon, I teamed up with Cole Whaley, Ocean Chen, and Bilguun Mungunbaatar to create an investment tool explicitly built for the novice investor. From personal experience, I knew many of my friends had general descriptions of what they wanted in a portfolio, but did not know which stocks to pick or how much money to invest in each stock.


To make it easier for beginner investors to translate these ideas into stock portfolios, we built an interface into which the user can input a plain text description of what they are looking for in a portfolio. Behind the scenes, the system identified the user's appetite for volatility, their preferred return horizon, and any desired sector tilt, and returned the stocks that best fit the desired levels in each of these categories.


Given the selected positions, we implemented a nonlinear constrained optimization function that sized the positions to maximize the diversification ratio

Where

We imposed a long-only constraint (no negative weights) as well as a tunable minimum position size parameter.


More details are included in the video below:



At the end of the hackathon, we presented to judges from Capital One, who awarded us first prize in the financial track of the competition.

 
 
bottom of page