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.
QuantaFlux consists of several key components:
- Raw Data Producer: Fetches stock data from external sources (e.g., Yahoo Finance).
- Processed Data Producer: Transforms raw data into a standardized format.
- Strategy Producer: Applies trading strategies to the processed data.
- Consumers: Multiple consumers for raw data, processed data, and strategy signals.
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.
- Java 11 or higher
- Apache Kafka
- Gradle
./gradlew build
./gradlew run
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.
To add a new trading strategy:
- Implement the
TradingStrategy
interface. - Add the new strategy to the list in
App.java
.
- Implement more sophisticated trading strategies.
- Add a user interface for real-time monitoring.
- Integrate with actual trading platforms for automated trading.
- Implement backtesting capabilities.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.