Skip to content

Trading Algorithm based on the paper 'A Stock Market Trading System using Deep Neural Network' by Bang Xiang Yong, Mohd Rozaini Abdul Rahim, Ahmad Shahidan Abdullah

License

Notifications You must be signed in to change notification settings

Joshbazz/Neural_Network_Trading_Algo

Repository files navigation

Neural Network Trading Algo

CCDS Project Template Open In Colab

This project implements a neural network strategy for trading based on the research paper titled 'A Stock Market Trading System using Deep Neural Network' by Bang Xiang Yong, Mohd Rozaini Abdul Rahim, and Ahmad Shahidan Abdullah. You can access the paper here.

You can view the detailed write-up about the code here.

Project Structure

The Python implementation resides in the neural_network_trading_algo directory. To run the project:

  1. Navigate to the main.py file in your terminal.
  2. Execute the file to perform:
    • Data gathering
    • Preprocessing
    • Model training
    • Model saving
    • Model evaluation
    • Signal generation
    • Backtesting the strategy on generated signals

Installation

To install the required packages and dependencies, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/Joshbazz/Neural_Network_Trading_Algo.git
    cd Neural_Network_Trading_Algo
    
  2. Install Make with Conda if not Already Installed (optional but recommended)

    conda install -c conda-forge make
    
  3. Create a Virtual Environment with Make (optional but recommended)

    make create_environment
    
  4. Activate the Environment before Downloading Requirements

    conda activate neural_network_trading_algo
    
  5. Install Dependencies

    make requirements
    

NOTE: Due to issues with graphviz, in main.py, the (save_and_visualize_model(model_path)) is commented out. If you successfully get graphviz installed, you can uncomment.

You'll need to locally install Graphviz and/or Make in order to run the make commands and create the model visualization. To download Make for Windows, open up Powershell and run: winget install ezwinports.make

There's an issue where using graphviz on VScode run from the Anaconda Platform is creating issues. Make sure you are running VScode explicitly from your own separate download. VScode can be downloaded here

Links for downloading Make (Windows) are here, and downloads for Graphviz are included here.

Run the Code in Google Colab

If you prefer running the code without downloading the repository or if you're a non-technical user, you can run the project directly in Google Colab. Click the badge below to open the notebook in your browser:

Open In Colab

Simply navigate to the top bar, and under Runtime, click on "Run All" (see below):

Run All in Colab

Note: Initial downloads may be required when running in Colab.

About

Trading Algorithm based on the paper 'A Stock Market Trading System using Deep Neural Network' by Bang Xiang Yong, Mohd Rozaini Abdul Rahim, Ahmad Shahidan Abdullah

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published