Coder Social home page Coder Social logo

timefork's Introduction

TimeFork For Stock Market Data

For information related to our user study, please look into the user-study branch.

[Please note that this repository is not being maintained. Contact the developer for updates.]

TimeFork is a technique for interactive prediction of time-series data. To showcase this technique, we developed a stock market analytics tool (StockFork) using data from the Yahoo Finance API. With TimeFork, you can predict the future of stocks through an interactive dialogue with the interface (through 3 steps).

  1. The interface first provides prediction suggestions for each stock based on its past trends (temporal predictions).
  2. Based on these suggestions and other stock market data, an analyst can interact to make his/her own prediction for one or more stocks.
  3. Following the analyst's interactions for specific stocks, the interface recalculates the predictions for other stocks (conditional predictions). In essence, this step answers "what if" questions that an analyst can have. For example, what if Tesla increases by 5% over the next ten days. The dialogue goes back to Step 1 or 2 after this.

The analyst can go through these steps iteratively till he/she has enough information to make a decision regarding investment in the stocks.

Repository Content

In this repository, we provide two main things for developers and researchers interested in contributing to this project.

  1. The "master" branch contains our implementation of the stock market analytics tool, StockFork, including its server and client components (described below).

  2. The "user-study" branch contains the implementation including the code and data specifically used for a user study conducted to understand if TimeFork is successful at improving the predictions and when/how it does do.

Beyond the implementations, our repository also offers sample stock market data in public/data/ folder and the corresponding trained neural network files (containing fitted weights) in public/data/train/.

Evaluation: User Study

For implementations, data, and training files specific to our user study, take a look into the user-study branch.

Build Process

To deploy this application, you must have node.js and npm installed.

  1. Run npm install to install dependencies.
  2. Run node app.js to start the application at port 3000. Now, you can try it out by opening localhost:3000 in your browser.

Server-Side Components

To support the TimeFork technique for stock market prediction, we used neural network models for temporal and conditional predictions. More specifically,

  1. The temporal predictions (predictions based on past performance of a stock) are generated using a multilayer perceptron (one model per stock) trained on sets of past 6 relative stock price changes (input) to predict the future change. This model had five layers: input layer of 6 neurons, hidden layers of sizes (50, 60, 70), and an output layer of one neuron, with Sigmoid activation function. The models are trained on historical stock market data using the standard backpropagation algorithm. Alternative predictions for each temporal prediction are generated by changing one or more input values by a 10% fixed margin. This model is implemented using Brain.

  2. The conditional predictions (predictions for a stock based on a trend for other stocks) are generated using a self-organizing map trained on all co-occurrences in the dataset (e.g., Apple and Tesla increased by a 5% and 3% relative change respectively on a particular day). The neurons in the model capture these co-occurrence patterns and are clustered. So, we can easily look up the SOM neurons to find the ones matching a particular prediction from the analyst and generate conditional predictions for others (e.g., if the analyst says Apple might increase by 5% in the next 3 days, what will happen to Tesla?). This model is implemented using ML-SOM.

These models are trained on the sample stock market data provided. The server-side components train these models, which are further stored in JSON format on public/data/train/.

Client Interface

The client interface provides overview and detail visualizations for stock market data built using D3. It also accesses the trained neural networks (recreated from the JSON files) and provides prediction suggestions while supporting user interaction.

StockFork

How to use

Please watch our video demo for this prediction tool.

Link to the video

To learn more, visit the wiki.

timefork's People

Contributors

karthikbadam 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.