On Friday September 27, 500 000 montrealers marched united in the streets showing their commitment to fight against climate change. Sustainability is on everyone's lips. Almost as hot as Machine-Learning. Coincidently, combining the two we want to facilitate investing in Renewable energy, particularly in solar energy.

What it does

You don’t need a green thumb to learn what makes stocks grow, just a neural network. Our algorithm looked at 4 components that could affect the solar energy field: substitutes cost, material cost, "green spirit" indicator (obtained by running a sentiment analysis model on recent news articles) and how well the solar industry is doing as a whole. Diversifying our inputs allowed for more comprehensive predictions, a complete global overview of the renewable energy market, letting the customer take an informed decision.

How I built it

Using pytorch libraries we built a gated recurrent unit which took as input key indexes and stocks. We trained it over one year of financial data (stock prices), in addition to the various other features mentioned above. We implemented the model in a web application, using AngularJS and Bootstrap for front end and REST APIs to communicate with a Flask backend.

Challenges I ran into

We had some issues reversing the normalization once we received the predictions. In addition to that, a CORS issue made our REST API unusable and it took many hours to fix.

Accomplishments that I'm proud of

Successfully preprocessing not so straightforward data, and combining it all into one input vector for our GRU. Thinking outside the box to find non-financial data that we could correlate to stock prices.

What I learned

We learned how to deal with sequential data, new model architectures we weren't familiar with (such as the GRU), and how to use/create APIs.

What's next for Sun Stock

Expanding our model to predict stock prices for other sources of renewable energy (hydro, wind, etc.) and including more domain specific expertise in our algorithm to make it less data-dependent.

Share this project: