How jbhavik70/deep-learning-based-algorithmic-trading-strategy works
Main Components
• Data Ingestion & Storage:
• Historical stock price data source (e.g., from an external API using pandas_datareader or provided data files in a “data/” folder).
• Scripts or modules responsible for fetching and storing this data.
• Data Preprocessing & Feature Engineering:
• Transformation steps where raw data is processed to create technical indicators and statistical features (e.g., moving averages, MACD, Bollinger Bands, etc.).
• That feature extraction is a critical component because it feeds into the model.
• Model Training Module:
• MLP Classifier component which is implemented using scikit-learn.
• That the model comprises one hidden layer with 5 neurons.
• Training pipeline where the processed features go into the training routine.
• Back-testing & Evaluation:
• A component that reflects the back-testing framework, which simulates real-world trading.
• How the trained model is applied to historical data and how performance is compared against a baseline (e.g., a buy-and-hold strategy).
• Flag the performance metrics and visualization aspects found in the “results/” folder.
• Visualization & Reporting:
• Parts of the system dedicated to result visualization using Matplotlib and Seaborn.
• Though integrated in the notebook, this segment is key to interpreting the strategy’s effectiveness.
Relationships and Interactions
• Data flows from the Stock Data Source into the Data Preprocessing & Feature Engineering module.
• Processed features are then passed into the Model Training module.
• After training, the model’s predictions are fed to the Back-testing & Evaluation module.
• Results (metrics and visualizations) are forwarded to the Visualization & Reporting component for analysis.
Architectural Patterns and Design Principles
• Although it is a compact project, there is a clear data pipeline architecture:
– Data Ingestion → Feature Engineering → Model Training → Back-testing → Reporting.
• This design emphasizes a modular approach where each step (data prep, training, testing) is encapsulated.
• Use of a statistical ML pattern and continuous evaluation strategy (back-testing).
Relevant Technologies and Frameworks
• Python is the central language.
• Pandas and Numpy for data handling.
• Scikit-learn for the MLP Classifier.
• Matplotlib and Seaborn for visualization.
• pandas_datareader (or similar) for fetching historical stock data.
• Jupyter Notebook as an exploratory/prototyping environment (as seen in “Deep Learning strategy.ipynb”).