SkillAgentSearch skills...

QUANT

A comprehensive collection of quantitative finance research spanning classical trading strategies, deep learning models for price prediction, ensemble ML methods, and modern LLM-powered financial analysis.

Install / Use

/learn @olonok69/QUANT
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img src="assets/banner.svg" alt="Quant Lab Banner" width="100%"/> <br/>

Quant Lab

Algorithmic Trading & Machine Learning Research

Python TensorFlow scikit-learn Jupyter License

A comprehensive collection of quantitative finance research spanning classical trading strategies, deep learning models for price prediction, ensemble ML methods, and modern LLM-powered financial analysis.


</div>

Table of Contents


Overview

This repository serves as a quantitative finance research lab — a curated collection of Jupyter notebooks and Python scripts covering the full spectrum of algorithmic trading and financial machine learning. From classical technical analysis strategies backtested with industry-standard frameworks, to cutting-edge deep learning price predictors and LLM-augmented financial agents.

Key Highlights

  • 15+ trading strategies implemented and backtested across multiple frameworks
  • Reinforcement Learning agent (Q-learning) for autonomous buy/sell/hold decisions
  • Deep Learning pipelines — LSTM, RNN, and DNN models for price prediction
  • Ensemble ML methods — Random Forest, Gradient Boosting, AdaBoost with SHAP explainability
  • RAG-powered financial analysis using LangChain/LangGraph with OpenAI & Google Gemini
  • Risk analytics including Value at Risk (VaR) and Conditional VaR (CVaR)

Repository Structure

📦 QUANT
├── 🤖 Predicting_Stock_Prices_using_Reinforcement_Learning.ipynb
│
├── 🧠 ML/RAG/                          # Modern AI-powered analysis
│   ├── yfinance.ipynb                   # Fundamental analysis with yfinance
│   └── bollinger z-score/
│       ├── Bollinger_bands.ipynb        # Bollinger Bands strategy
│       ├── RAG_Langgrap_z-score.ipynb   # LangGraph RAG agent for Z-score analysis
│       └── requirements.txt
│
├── 📊 quantopian/                       # Classical algorithmic trading
│   ├── Backtesting *.ipynb              # Zipline & Pandas backtesting suite
│   ├── backtrader_*_strategy.py         # Backtrader strategy implementations
│   ├── Backtrader_*.ipynb               # ConnorsRSI, Donchian, Dual MA
│   ├── Dual Moving Average *.ipynb      # SMA crossover strategies
│   ├── Zipline *.ipynb                  # Zipline examples with Pyfolio
│   ├── VaR and CVaR.ipynb              # Risk measurement
│   ├── Linear Regression.ipynb          # Statistical modeling
│   └── Pipeline algorithm.ipynb         # Factor pipeline
│
└── 🌲 QUANTRA/                          # ML & DL coursework
    ├── Decision Trees/                  # Ensemble methods & tree models
    │   ├── Classification Tree *.ipynb  # Classification with SHAP
    │   ├── Regression Tree.ipynb        # Price regression
    │   ├── Random Forest.ipynb          # Ensemble learning
    │   ├── Gradient Boosting.ipynb      # Sequential ensembles
    │   ├── AdaBoosting.ipynb            # Adaptive boosting
    │   ├── Bagging.ipynb                # Bootstrap aggregating
    │   ├── Cross Validation.ipynb       # Model validation
    │   └── Hyperparameter Tuning.ipynb  # Grid/random search
    │
    ├── Neural Networks for trading/     # Deep learning models
    │   ├── LSTM Based Strategy.ipynb    # LSTM trading strategy
    │   ├── LSTM- Price Prediction.ipynb # LSTM price forecasting
    │   ├── Deep Neural Network *.ipynb  # DNN prediction model
    │   ├── RNN- Example.ipynb           # Recurrent networks
    │   ├── Neural Network.ipynb         # sklearn MLPClassifier
    │   ├── Cross Validation in Keras.ipynb
    │   └── Keras_CV.py                  # DNN builder utility
    │
    └── Sentimental Analisys/            # Market sentiment
        ├── TRIN strategy.ipynb          # Arms Index strategy
        └── plot_anomaly_comparison.ipynb # Anomaly detection

📈 Trading Strategies

| Strategy | Framework | Description | |----------|-----------|-------------| | Dual Moving Average Crossover | Zipline, Backtrader | Classic SMA crossover signals applied to AAPL and other equities | | ConnorsRSI | Backtrader | Composite momentum indicator combining RSI, streak length, and percent rank | | Donchian Channels | Backtrader | Breakout strategy using configurable lookback channel highs/lows | | Bollinger Bands / Z-Score | Custom + RAG | Mean-reversion strategy with statistical Z-score thresholds | | TRIN (Arms Index) | Custom | Market breadth indicator using NYSE advancing/declining volume | | Pipeline Factor Model | Quantopian-style | Multi-factor alpha pipeline with Alphalens analysis |


🌲 Machine Learning for Trading

Decision Trees & Ensemble Methods

Full pipeline from basic classification trees to advanced ensemble methods with model interpretability.

  • Classification Trees — Binary decision models with class weight tuning and SHAP explainability
  • Regression Trees — Non-linear price regression for continuous target prediction
  • Bagging — Bootstrap aggregation for variance reduction
  • Random Subspace — Feature-space sampling for diversity
  • Random Forest — Combined bagging + random subspace ensemble
  • AdaBoost — Adaptive sequential boosting with sample reweighting
  • Gradient Boosting — Iterative residual minimization ensemble
  • Cross Validation — K-fold validation for robust model evaluation
  • Hyperparameter Tuning — Grid and random search optimization

🧠 Deep Learning Models

Neural Networks for Price Prediction & Trading

| Model | Purpose | Key Details | |-------|---------|-------------| | LSTM | Price prediction & trading strategy | Sequence modeling on AMZN historical data | | RNN | Close price prediction | Recurrent architecture for time-series | | DNN | Trading strategy signals | Deep feedforward network (Keras Sequential) | | MLPClassifier | Signal classification | scikit-learn neural network for trade signals | | RL Q-Learning Agent | Autonomous trading | Epsilon-greedy policy with DNN Q-function approximation |

Reinforcement Learning

The root-level notebook implements a Q-learning agent that learns optimal trading actions (Buy / Sell / Hold) through interaction with historical market data. The agent uses a deep neural network to approximate the Q-value function with epsilon-greedy exploration.

State → [DNN Q-Network] → Q(s, buy), Q(s, sell), Q(s, hold) → Action
                ↑
        Experience Replay + Target Updates

💬 LLM-Powered Analysis (RAG)

Retrieval-Augmented Generation pipelines for intelligent financial research.

  • LangGraph Agent — Multi-tool agentic workflow with tool-calling capabilities for fundamental and technical analysis
  • Bollinger Z-Score RAG — LLM-augmented statistical analysis combining Bollinger Bands with AI-driven interpretation
  • yfinance Fundamental RAG — Balance sheet, income statement, and cash flow analysis powered by LLMs
  • Supported LLM backends — OpenAI GPT, Google Gemini, Vertex AI

Tech Stack (RAG Pipeline)

LangChain → LangGraph → [OpenAI / Google Gemini] → Tool Calls → yfinance / fmpsdk
                                                         ↓
                                                  Financial Reports + Analysis

⚠️ Risk Management

  • Value at Risk (VaR) — Monte Carlo simulation for portfolio loss estimation at confidence levels
  • Conditional VaR (CVaR) — Expected Shortfall: average loss exceeding the VaR threshold
  • Statistical Foundations — Discrete & continuous random variable analysis for financial modeling

🛠 Tech Stack

<div align="center">

| Category | Technologies | |----------|-------------| | Languages | Python 3.8+ | | Backtesting | Backtrader, Zipline, Pyfolio, Alphalens | | Deep Learning | TensorFlow, Keras (LSTM, RNN, Dense) | | Machine Learning | scikit-learn, SHAP, XGBoost | | LLM / RAG | LangChain, LangGraph, OpenAI API, Google Gemini, Vertex AI | | Data & Finance | Pandas, NumPy, SciPy, yfinance, Quandl, fmpsdk | | Visualization | Matplotlib, Plotly | | Environment | Jupyter, Google Colab, Streamlit |

</div>

🚀 Getting Started

Prerequisites

python >= 3.8
pip install jupyter numpy pandas matplotlib

Backtesting Stack

pip install backtrader zipline-reloaded pyfolio-reloaded alphalens-reloaded
pip install yfinance quandl

Machine Learning & Deep Learning

pip install scikit-learn tensorflow keras shap

RAG / LLM Pipeline

pip install langchain langchain-openai langchain-google-genai langgraph
pip install tavily-python python-dotenv streamlit

Run Notebooks

jupyter notebook
# or
jupyter lab

Note: Some notebooks require API keys (OpenAI, Google, Tavily, Financial Modeling Prep). Create a .env file with the required credentials for the RAG pipelines.


License

This project is provided for **

Related Skills

View on GitHub
GitHub Stars8
CategoryFinance
Updated7d ago
Forks1

Languages

Jupyter Notebook

Security Score

70/100

Audited on Mar 31, 2026

No findings