Inspiration
We weren’t too sure what we wanted to do this year, so we considered doing nothing at all. However, once we saw Fannie Mae’s task of creating an algorithm to generate optimal pools that have the most value, we became interested in exploring this territory. Grabbing on to this year’s theme of “Find Your Frontier”, we recognized the potential of utilizing an algorithm to optimize the selection of loans. We saw this as a new frontier for us to push the boundaries of what is possible in the world of finance.
What it does
The algorithm separates the loans into categories consisting of their class, maturity date, and loan term. Then, we traverse each category and generate a dictionary of states with their corresponding loans in the category. Here comes the hurdle (hard part!)
So, we implemented a slightly better greedy algorithm by strategically adding and removing loans while also considering their state percentage.
In the end, we generated high value pools of loans that meet the criteria of the best class possible.
How we built it
We used Python and related Python libraries like pandas. First, we preprocessed the data by scanning through and labeling which class each loan would qualify for. This step dropped more than half of the loans out of consideration. Then, we implemented our algorithm to create the pools.
Challenges we ran into
We faced 2 biggest challenges.
- The first of which was our misunderstanding of the dataset where we read the property type instead of the state, causing a 6 hour setback. I know, we really messed up.
- Secondly, we ran into the same problem that others had: figuring out the algorithm. While this challenge was proposed as a Knapsack algorithm, we couldn’t think of a way to modify a Knapsack algorithm to fit this problem because of the uniqueness of the state percentages. So, we ended up choosing a modified greedy approach.
Accomplishments that we're proud of
Even though we were setback and very tempted to quit. We persevered and implemented our own modified greedy algorithm! Moreover, our time at Bitcamp has allowed us to meet two amazing mentors at Fannie Mae, Pavan Josyula and Peter Thaggard.
What we learned
First off, we learned what the Knapsack algorithm was and practiced a bit of dynamic programming, also learning about the power of Python. Lastly, and most importantly we learned how to apply an algorithmic approach to tackle practical challenges with real-world datasets.
What's next for Egg
While we’ve currently implemented a modified greedy algorithm, we’d like to continue exploring and researching how we can continue to improve our solution. In addition, we’d like to look into how and what other algorithms could be modified and used to create potentially more effective and efficient solutions. In particular, we’d like to look further into the knapsack algorithm and its many variations.
Log in or sign up for Devpost to join the conversation.