Skip to content

bobhampton/ML_Stock_Bot_with_Alpaca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WORK IN PROGRESS

Alpaca ML Crypto Stock Analysis

This repository is a group project for CPE-595 that leverages the Alpaca API to fetch cryptocurrency/stock data and uses three different machine learning algorithms to analyze and predict market trends. The project includes data fetching, preprocessing, and training.

Features

  • Fetch crypto/stock data using the Alpaca API
  • Preprocess data for machine learning
  • Train model to predict stock prices
  • Visualize actual vs predicted stock prices

Requirements

  • Python 3.8+ (please note that this project uses tensorflow and at the time of writing this, only supports Python 3.9-3.12)
  • Alpaca API key and secret
  • Required Python packages (listed in requirements.txt)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/alpaca-ml-crypto-stock-analysis.git
    cd alpaca-ml-crypto-stock-analysis
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install the required packages:

    pip install -r requirements.txt
  4. Create a .env file in the root directory and add your Alpaca API credentials:

    ALPACA_API_KEY=your_api_key
    ALPACA_SECRET_KEY=your_secret_key

Usage

  1. Run the main script:

    python main.py
  2. The script will fetch cryptocurrency data for BTC/USD, train an LSTM model, and plot the actual vs predicted stock prices.

Project Structure

  • main.py: Main script to fetch data, train the model, and visualize results.
  • requirements.txt: List of required Python packages.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

CPE-595 Machine Learning final group project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages