Coder Social home page Coder Social logo

leolorenzoluis / stockperformanceclassification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from singingdata/stockperformanceclassification

0.0 3.0 0.0 6.03 MB

Keras 1D CNN on Azure ML Workbench to classify 4 week stock performance based on text in public earnings statements

Jupyter Notebook 95.29% Python 4.71%

stockperformanceclassification's Introduction

Stock Performance Classification with a 1D CNN, Keras and Azure ML Workbench

Overview

We recently worked with a financial services partner to develop a model to predict the future stock market performance of public companies in categories where they invest. The goal was to use select text narrative sections from publicly available earnings release documents to predict and alert their analytics to investment opportunities and risks. We developed a deep learning model using a one-dimensional convolutional neural network (a 1D CNN) based on text extracted from public financial statements from these companies to make these predictions. We used Azure Machine Learning Workbench to explore the data and develop the model. We modeled using the Keras deep learning Python framework with a Theano backend. The results demonstrate how a deep learning model trained on text in earnings releases and other sources could provide a valuable signal to the investment decision maker.

This initial result suggests that that deep learning models trained on text in earnings releases and other sources could prove a viable mechanism to improve the quality of the information available to the person making the investment decision, particularly in avoiding investment losses. While the model needs to be improved with more samples, refinements of domain-specific vocabulary and text augmentation, this model suggests that providing this signal as another decision input for investmennt analyst would improve the efficiency of the firm’s analysis work.

The history of model training and testing is below, trained for 24 epochs. alt text

Model Architecture

This graphic depicts the model architecture. alt text

This graphic gives you a summary of this model at each level.
alt text

Azure ML Workbench

We built the solution on the Azure ML Workbench python environment. We found the following installs and upgrades were required.

Installs and Upgrades Required (Order is Important)

  • conda install mkl-service
  • conda install m2w64-toolchain
  • conda install -c anaconda libpython=2.0
  • pip install numpy==1.13.0
  • pip install keras #Remember to change back0end to theano in the backend folder w/in keras, init file
  • pip install theano
  • pip install gensim
  • pip install nltk
  • pip install cloudpickle
  • pip install --upgrade pandas
  • pip install --upgrade gensim
  • pip install importio
  • pip install matplotlib
  • pip install netwrokx
  • pip install h5py
  • pip install pyparsing==1.5.7
  • pip install graphviz
  • Install graphviz binaries linked in this issue https://stackoverflow.com/questions/36886711/keras-runtimeerror-failed-to-import-pydot-after-installing-graphviz-and-pyd
  • pip install pydotplus
  • In vis_utils.py comment out def _check_pydot(): lines 19 through 28

stockperformanceclassification's People

Contributors

singingdata avatar

Watchers

James Cloos avatar Leo Lorenzo Luis avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.