Skip to content

About

A backpropagating neural network for predicting stocks data. Handwritten both for standard cpu execution and for gpu execution using cuda

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

46 Commits

Folders and files

Repository files navigation

CudaStonks

This project was developed for the Spring 2024 class of CS147 (GPU programming) at UCR.

It contains an hand written back propagating neural network for predicting stocks data, both a CPU-based implementation using plain python and numpy, and a GPU-based implementation using Numba.

There is also a PyTorch version for comparison.

Performance of the model on the S&P500 Performance of the model

Setup

First of all install the required python packages:

# You can setup a virtual environment if you want
python3 -m pip install venv
python3 -m venv .venv
source .venv/bin/activate

# Install packages
python3 -m pip install -r requirements.txt

Run the code

Change directory to src and from there you can run the targets of the makefile.

  • Run make cpu to run the cpu version of the neural network
  • Run make gpu to run the gpu version of the neural network
  • Run make pytorch to run the model on pytorch

Run on gpu

The code can be run on GPU provided that:

  • You have a NVIDIA GPU
  • You have cuda installed in your system

Links

About

A backpropagating neural network for predicting stocks data. Handwritten both for standard cpu execution and for gpu execution using cuda

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages