Skip to content

ndavidson19/QuantaFlux

Repository files navigation

QuantaFlux: Real-time Stock Data Processing and Analysis

QuantaFlux is a robust, scalable system for real-time stock data processing and analysis. It leverages Apache Kafka for data streaming, implements various trading strategies, and provides a flexible architecture for future expansions.

Architecture Overview

QuantaFlux consists of several key components:

  1. Raw Data Producer: Fetches stock data from external sources (e.g., Yahoo Finance).
  2. Processed Data Producer: Transforms raw data into a standardized format.
  3. Strategy Producer: Applies trading strategies to the processed data.
  4. Consumers: Multiple consumers for raw data, processed data, and strategy signals.

Components

  • StockDataProducer: Fetches raw stock data and publishes to Kafka.
  • ProcessedDataProducer: Consumes raw data, processes it, and publishes to a new Kafka topic.
  • StrategyProducer: Applies trading strategies to processed data and generates signals.
  • StockDataConsumer: Generic consumer that can be configured for different Kafka topics.
  • MovingAverageCrossoverStrategy: An example trading strategy implementation.

Getting Started

Prerequisites

  • Java 11 or higher
  • Apache Kafka
  • Gradle

Building the Project

./gradlew build

Running the Application

./gradlew run

Configuration

The application uses several Kafka topics:

  • raw-stock-data: Raw stock data from external sources.
  • processed-stock-data: Standardized stock data.
  • [StrategyName]-signals: Trading signals generated by each strategy.

Kafka bootstrap servers and other configurations can be adjusted in the respective classes.

Adding New Strategies

To add a new trading strategy:

  1. Implement the TradingStrategy interface.
  2. Add the new strategy to the list in App.java.

Future Improvements

  • Implement more sophisticated trading strategies.
  • Add a user interface for real-time monitoring.
  • Integrate with actual trading platforms for automated trading.
  • Implement backtesting capabilities.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published