The Parallel Financial Analytics System is a C++ application developed as part of the Multicore Programming course. The project demonstrates the practical application of multicore programming by comparing Sequential Merge Sort and Parallel Merge Sort implemented using C++ std::thread.
Unlike traditional algorithm demonstrations using randomly generated numbers, this project utilizes real Tesla historical stock market data to perform financial analysis and evaluate the performance of parallel computing.
The application measures execution time, validates correctness, generates benchmark reports, and visualizes performance through graphs.
Course: Multicore Programming
Language: C++17
Compiler: g++ (MinGW)
Operating System: Windows 11
Concurrency Library: std::thread
Dataset: Tesla Historical Stock Dataset
- Implement Sequential Merge Sort
- Implement Parallel Merge Sort using C++ std::thread
- Process real Tesla historical stock market data
- Perform financial analytics
- Benchmark sequential and parallel execution
- Validate correctness of the parallel implementation
- Demonstrate multicore programming concepts using real-world data
- Real Tesla historical stock dataset
- CSV file parsing and preprocessing
- Sequential Merge Sort
- Parallel Merge Sort using std::thread
- Financial analytics module
- Performance benchmarking
- Automatic correctness validation
- Benchmark CSV export
- Performance graph generation
- Modular software architecture
- C++17
- Standard Template Library (STL)
- std::thread
- Chrono Library
- Python 3
- Pandas
- Matplotlib
ParallelFinancialAnalytics/
│── data/
│ └── Tesla.csv
│── include/
│ ├── Benchmark.h
│ ├── CSVReader.h
│ ├── FinancialAnalyzer.h
│ ├── StockMergeSort.h
│ ├── StockParallelMergeSort.h
│ └── StockRecord.h
│── src/
│ ├── Benchmark.cpp
│ ├── CSVReader.cpp
│ ├── FinancialAnalyzer.cpp
│ ├── StockMergeSort.cpp
│ ├── StockParallelMergeSort.cpp
│ └── main.cpp
│── results/
│ ├── benchmark_results.csv
│ └── performance_graph.png
│── graph.py
│── README.md
Tesla.csv
│
▼
CSV Reader & Preprocessing
│
▼
Vector<StockRecord>
│
┌────┴───────────────┐
▼ ▼
Sequential Parallel
Merge Sort Merge Sort
(1 Thread) (std::thread)
│ │
└──────┬────────┘
▼
Financial Analytics
▼
Benchmark Module
▼
CSV Results + Graph
- Load Tesla historical stock data.
- Parse and preprocess the CSV file.
- Store records as
StockRecordobjects. - Execute Sequential Merge Sort.
- Execute Parallel Merge Sort using multiple threads.
- Perform financial analytics.
- Benchmark execution time.
- Validate correctness.
- Export benchmark results.
- Generate performance graph.
The application computes:
- Highest Closing Price
- Lowest Closing Price
- Average Closing Price
- Highest Trading Volume
- Lowest Trading Volume
- Average Trading Volume
The benchmark measures:
- Sequential execution time
- Parallel execution time
- Speedup
- Correctness validation
- Performance comparison across different dataset sizes
Results are automatically saved to:
results/benchmark_results.csv
The experimental evaluation demonstrates:
- Sequential Merge Sort performs better for small datasets due to lower thread management overhead.
- Parallel Merge Sort becomes increasingly efficient as dataset size grows.
- Performance improvement is achieved by utilizing multiple CPU threads.
- Both implementations produce identical sorted outputs.
- Benchmark results are validated after every execution.
Before building the project, ensure the following are installed:
- g++ (C++17 compatible compiler)
- Python 3.x
- Pandas
- Matplotlib
Clone the repository:
git clone https://github.com/pateldhruvil5467-ctrl/ParallelFinancialAnalytics.git
cd ParallelFinancialAnalyticsCompile the project:
g++ src/main.cpp src/CSVReader.cpp src/StockMergeSort.cpp src/StockParallelMergeSort.cpp src/FinancialAnalyzer.cpp src/Benchmark.cpp -Iinclude -o financialExecute:
./financialThe application will automatically:
- Load Tesla.csv
- Parse the dataset
- Execute Sequential Merge Sort
- Execute Parallel Merge Sort
- Perform Financial Analytics
- Run Benchmark
- Validate Results
- Save benchmark_results.csv
After running the benchmark:
python graph.pyThe graph will be generated inside:
results/performance_graph.png
To reproduce the benchmark presented in the report:
- Build the project.
- Run the executable.
- Verify that
benchmark_results.csvis generated. - Execute:
python graph.py- Compare the generated graph with the report and presentation.
Correctness is verified by comparing the outputs of the Sequential Merge Sort and Parallel Merge Sort after every benchmark execution.
The benchmark reports:
PASS
only when both implementations produce identical sorted results.
- OpenMP implementation
- MPI implementation
- CUDA / GPU acceleration
- Live financial APIs
- Interactive dashboard
- Additional financial indicators
- Dynamic thread allocation based on hardware
Dhruvil Patel
- Sequential Merge Sort
- CSV Processing
- Financial Analytics
- Benchmark Integration
- Testing and Validation
Shehleen Kaur
- Parallel Merge Sort
- Documentation
- Presentation
- Performance Evaluation
AI-assisted tools (ChatGPT) were used to support debugging, code explanation, documentation refinement, and report writing.
All implementation decisions, testing, benchmarking, validation, and final verification were performed by the project members.
This project was developed for academic purposes as part of the Multicore Programming course.