Inspiration
Child labor, unsanitary working conditions, low wages, and countless other forms of worker exploitation occur every single day. The goal of reducing this labor exploitation inspired us to come up with novel ways to incentivize companies to ensure ethical labor practices. In this vein, we built ethinvest, a platform allowing users to invest in ethical companies.
What it does
Ethinvest uses machine learning to recommend stocks and provide data on companies with high ethics quotients. Users can find the most lucrative (and ethical!) companies to invest in, explore real-time stock prices, and view graphs visualizing stocks over time, all from within the web app.
How we built it
To recommend the most lucrative stocks, we used machine learning algorithms on the most recent real-time stock data. We tested models ranging from complex recurrent neural networks and SVRs to basic linear regression. Ultimately, we optimized exponential moving averages to use multiple-length windows concurrently, drawing insights on whether the stock will perform better or worse in the next time step based on their crossover ratio. We were actually able to reduce the mean squared percent error to just 2.36%! We listed the three companies whose predicted stock prices were greatest relative to their prices in the previous time step as Recommended Stocks.
In terms of data, we analyzed the Ethisphere EQ dataset to find companies known to be defining and advancing the standards of ethical business practices as related to the social good. We used the Yahoo Finance API to find the companies' corresponding tickers, and we integrated the Alpha Vantage API to get the respective companies' real-time stock data.
We built out the actual web app using jQuery, JavaScript, HTML, and CSS. We constructed our machine learning and analytic models in Python using scikit-learn, pandas, and NumPy.
Challenges we ran into
We ran into two main challenges: debugging obstacles in the Yahoo API, and building a suitable model for stock recommendation. The Yahoo API was surprisingly difficult to integrate, and we were finally forced to hard-code the list of tickers generated by the Yahoo API into the Alpha Vantage API. Stock recommendation was a complex problem, and although we found an elegant, extremely effective solution, the process involved many iterations, where much more complex models did not perform as well as expected.
Accomplishments that we’re proud of
We built a really cool web app with a concrete social impact!
What we learned
All of us have a diverse array of technical backgrounds. Throughout this project, we came together and experimented with technologies we weren’t previously familiar with. We each worked on machine learning, front-end, and back-end in a collective effort to build a meaningful and impactful project.
What's next for ethinvest
In the future, we hope to further enhance our model and thereby incentivize more people to invest in ethical companies. Finding creative ways to tackle large-scale social problems is critical for our growth as a society, and we view this project as one step in a much larger journey to a greater solution.
Built With
- alphavantage
- css
- html
- javascript
- jquery
- json
- jupyternotebook
- matplotlib
- numpy
- pandas
- python
- scikit-learn
- yahoo-api
Log in or sign up for Devpost to join the conversation.