# letianzj/quantresearch

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/letianzj-quantresearch).**

2,808 stars · 546 forks · Jupyter Notebook · mit

## Links

- GitHub: https://github.com/letianzj/QuantResearch
- Homepage: https://letianzj.github.io/
- awesome-repositories: https://awesome-repositories.com/repository/letianzj-quantresearch.md

## Topics

`algorithmic-trading` `algotrading` `asset-allocation` `asset-management` `backtesting-trading-strategies` `backtests` `data-science` `deep-learning` `derivatives-pricing` `financial-analysis` `machine-learning` `pairs-trading` `portfolio-management` `quantitative-finance` `quantitative-trading` `reinforcement-learning` `risk-management` `statistical-arbitrage` `trading-algorithms` `trading-strategies`

## Description

QuantResearch is a quantitative research framework and specialized toolkit for algorithmic simulation, financial time-series analysis, and systematic trading. It provides an event-driven backtesting environment for validating strategies against historical tick and bar data, alongside a dedicated portfolio optimization engine for calculating asset weights and risk metrics.

The project distinguishes itself through a machine learning finance toolkit that implements recurrent neural networks for price prediction and reinforcement learning for derivative pricing. It also features advanced statistical capabilities for market regime detection using Hidden Markov Models and Bayesian inference tools for parameter estimation via Markov Chain Monte Carlo sampling.

The framework covers a broad surface of systematic investment capabilities, including statistical arbitrage implementation with cointegration testing and mean-reversion strategies. It further includes tools for portfolio risk optimization, market risk analysis, and financial time-series modeling using ARIMA and GARCH models.

The repository is primarily implemented as a collection of Jupyter Notebooks.

## Tags

### Business & Productivity Software

- [Quantitative Trading Platforms](https://awesome-repositories.com/f/business-productivity-software/quantitative-trading-platforms.md) — Provides an integrated environment for developing, backtesting, and validating systematic quantitative trading strategies.
- [Trading Strategy Backtesters](https://awesome-repositories.com/f/business-productivity-software/trading-strategy-backtesters.md) — Provides a comprehensive environment for evaluating quantitative trading strategies against historical market data.
- [Algorithmic Trading Simulators](https://awesome-repositories.com/f/business-productivity-software/algorithmic-trading-simulators.md) — Offers an event-driven simulation platform for evaluating the performance of automated investment strategies against historical data.
- [Trading Order Monitors](https://awesome-repositories.com/f/business-productivity-software/order-lifecycle-management/trading-order-monitors.md) — Tracks the lifecycle of trading orders from placement to filling, including slippage and commission simulation.
- [Trade Visualization Tools](https://awesome-repositories.com/f/business-productivity-software/quantitative-trading-platforms/trade-visualization-tools.md) — Generates interactive charts and volume profiles to visualize intraday trade flow and price levels. ([source](https://letianzj.github.io/market-profile-and-volume-profile.html))
- [Performance Evaluation](https://awesome-repositories.com/f/business-productivity-software/trading-strategy-backtesters/performance-evaluation.md) — Generates statistical reports and professional-grade performance analytics from historical trade data. ([source](https://letianzj.github.io/quanttrading-backtest.html))

### Artificial Intelligence & ML

- [Financial Machine Learning Toolkits](https://awesome-repositories.com/f/artificial-intelligence-ml/financial-machine-learning-toolkits.md) — Implements specialized machine learning toolkits for predicting asset prices using LSTM, RL, and GMMs.
- [Financial Price Forecasting](https://awesome-repositories.com/f/artificial-intelligence-ml/financial-price-forecasting.md) — Combines machine learning, deep RL, and time-series models to forecast asset prices and market trends. ([source](https://cdn.jsdelivr.net/gh/letianzj/quantresearch@master/README.md))
- [Portfolio Optimization Algorithms](https://awesome-repositories.com/f/artificial-intelligence-ml/portfolio-optimization-algorithms.md) — Provides algorithms for optimizing asset allocation to maximize returns and manage risk. ([source](https://cdn.jsdelivr.net/gh/letianzj/quantresearch@master/README.md))
- [Efficient Frontier Construction](https://awesome-repositories.com/f/artificial-intelligence-ml/portfolio-optimization-algorithms/efficient-frontier-construction.md) — Generates a set of optimal portfolios that maximize return for different risk levels using numerical solvers. ([source](https://letianzj.github.io/portfolio-management-one.html))
- [Half-Life Estimation](https://awesome-repositories.com/f/artificial-intelligence-ml/time-series-regression/half-life-estimation.md) — Estimates the time required for a price series to return halfway to its equilibrium level using linear regression. ([source](https://letianzj.github.io/mean-reversion.html))
- [Bayesian Regressions](https://awesome-repositories.com/f/artificial-intelligence-ml/linear-regression-models/bayesian-regressions.md) — Implements Bayesian linear regression using conjugate models to incorporate prior knowledge into price predictions. ([source](https://letianzj.github.io/page/3/))
- [Markov Chain Monte Carlo Sampling](https://awesome-repositories.com/f/artificial-intelligence-ml/markov-chain-monte-carlo-sampling.md) — Implements the Metropolis-Hastings algorithm for MCMC sampling to approximate posterior distributions for Bayesian regression.
- [Market Regime Detection](https://awesome-repositories.com/f/artificial-intelligence-ml/markov-state-transition-models/market-regime-detection.md) — Identifies latent market states by fitting Gaussian Mixture and Markov Regime Switching models to return data.
- [Sharpe Ratio Maximization](https://awesome-repositories.com/f/artificial-intelligence-ml/portfolio-optimization-algorithms/sharpe-ratio-maximization.md) — Determines tangency portfolio weights that provide the highest excess return per unit of risk. ([source](https://letianzj.github.io/portfolio-management-one.html))
- [Recurrent Neural Networks](https://awesome-repositories.com/f/artificial-intelligence-ml/recurrent-neural-networks.md) — Utilizes LSTM and GRU cells to model sequential financial time series for asset price forecasting.
- [Derivative Pricing](https://awesome-repositories.com/f/artificial-intelligence-ml/reinforcement-learning/derivative-pricing.md) — Uses reinforcement learning agents to determine fair value and optimal exercise timing for financial derivative contracts. ([source](https://letianzj.github.io/))

### Part of an Awesome List

- [Portfolio Optimization](https://awesome-repositories.com/f/awesome-lists/data/portfolio-optimization.md) — Provides a dedicated engine for calculating asset weights and risk metrics using Mean-Variance Optimization and the Efficient Frontier.
- [Statistical Arbitrage](https://awesome-repositories.com/f/awesome-lists/data/arbitrage-trading/statistical-arbitrage.md) — Implements statistical arbitrage by identifying cointegrated asset pairs and executing mean-reversion strategies.
- [Walk-Forward Validation](https://awesome-repositories.com/f/awesome-lists/devtools/testing-and-validation/walk-forward-validation.md) — Prevents look-ahead bias by using rolling windows to re-estimate regression coefficients during backtesting. ([source](https://letianzj.github.io/cointegration-pairs-trading.html))
- [Educational Resources](https://awesome-repositories.com/f/awesome-lists/learning/educational-resources.md) — Quantitative analysis, strategy development, and backtesting resources.

### Data & Databases

- [Financial Time-Series Libraries](https://awesome-repositories.com/f/data-databases/financial-time-series-libraries.md) — Provides a comprehensive library of tools for analyzing stationarity, cointegration, and volatility in financial time series.
- [Time Series Analysis](https://awesome-repositories.com/f/data-databases/time-series-analysis.md) — Analyzes time series stationarity and trending behavior using Augmented Dickey-Fuller tests and Hurst Exponents. ([source](https://letianzj.github.io/mean-reversion.html))
- [Stationarity Analysis](https://awesome-repositories.com/f/data-databases/time-series-analysis/stationarity-analysis.md) — Provides stationarity testing for financial data series using the Augmented Dickey-Fuller unit root test. ([source](https://letianzj.github.io/arima-garch-model.html))
- [Time Series Modeling](https://awesome-repositories.com/f/data-databases/time-series-data-modeling/time-series-modeling.md) — Applies ARIMA, GARCH, and machine learning models to analyze financial volatility and predict price movements.
- [Mean Reversion Calibration](https://awesome-repositories.com/f/data-databases/time-series-data-modeling/time-series-modeling/mean-reversion-calibration.md) — Estimates Ornstein-Uhlenbeck or Vasicek models using Least Square and Maximum Likelihood methods. ([source](https://letianzj.github.io/page/2/))
- [Market Regime Detection](https://awesome-repositories.com/f/data-databases/anomaly-detection/hidden-markov-model-detection/market-regime-detection.md) — Uses Hidden Markov Models and Gaussian Mixture Models to identify shifts in market states and adapt trading logic.
- [MCMC Sampling](https://awesome-repositories.com/f/data-databases/data-management/sample-data-loaders/statistical-sampling/mcmc-sampling.md) — Employs the Metropolis-Hastings algorithm for MCMC sampling to estimate parameters for linear regression models. ([source](https://letianzj.github.io/mcmc-linear-regression.html))
- [Time Series Decomposition](https://awesome-repositories.com/f/data-databases/time-series-toolkits/time-series-decomposition.md) — Analyzes asset stationarity and mean reversion using Augmented Dickey-Fuller tests and Hurst Exponents.

### Scientific & Mathematical Computing

- [Asset Allocation Optimization](https://awesome-repositories.com/f/scientific-mathematical-computing/asset-allocation-optimization.md) — Computes optimal asset allocations using quadratic programming to maximize returns and minimize risk. ([source](https://letianzj.github.io/portfolio-management-one.html))
- [Cointegration Tests](https://awesome-repositories.com/f/scientific-mathematical-computing/cointegration-tests.md) — Implements statistical tests to identify mean-reverting portfolios of assets for statistical arbitrage. ([source](https://letianzj.github.io/page/2/))
- [Dynamic Cointegration Estimation](https://awesome-repositories.com/f/scientific-mathematical-computing/cointegration-tests/dynamic-cointegration-estimation.md) — Applies a Kalman Filter to perform Bayesian online training of linear regression models for pairs trading. ([source](https://letianzj.github.io/page/2/))
- [Market Regime Detection](https://awesome-repositories.com/f/scientific-mathematical-computing/market-regime-detection.md) — Identifies latent shifts in market states using Expectation-Maximization, Gaussian Mixture Models, and Markov Regime Switching Models. ([source](https://letianzj.github.io/))
- [Pairs Trading Strategies](https://awesome-repositories.com/f/scientific-mathematical-computing/pairs-trading-strategies.md) — Implements quantitative strategies based on cointegration and z-score scaling for mean-reversion trading. ([source](https://letianzj.github.io/mean-reversion.html))
- [Quadratic Programming Allocation](https://awesome-repositories.com/f/scientific-mathematical-computing/quadratic-programming-allocation.md) — Employs quadratic programming solvers to calculate optimal asset weights for risk parity and minimum variance portfolios.
- [Quantitative Financial Modeling](https://awesome-repositories.com/f/scientific-mathematical-computing/quantitative-financial-modeling.md) — Implements statistical and predictive models to conduct quantitative research and validate trading strategies. ([source](https://letianzj.github.io/machine-learning-in-finance-some-models-and-examples.html))
- [Dynamic Hedge Ratio Estimation](https://awesome-repositories.com/f/scientific-mathematical-computing/risk-assessment-metrics/portfolio-hedging-strategies/dynamic-hedge-ratio-estimation.md) — Updates the cointegration relationship between financial assets over time using a Kalman Filter. ([source](https://letianzj.github.io/kalman-filter-pairs-trading.html))
- [Hedge Ratio Calculation](https://awesome-repositories.com/f/scientific-mathematical-computing/risk-assessment-metrics/portfolio-hedging-strategies/hedge-ratio-calculation.md) — Computes linear relationships between assets via regression or eigenvectors to determine proportions for stationary spreads. ([source](https://letianzj.github.io/cointegration-pairs-trading.html))
- [Portfolio Risk Metrics](https://awesome-repositories.com/f/scientific-mathematical-computing/risk-assessment-metrics/portfolio-risk-metrics.md) — Calculates key financial risk metrics including Value at Risk and GARCH to optimize portfolio allocations.
- [Order Execution Engines](https://awesome-repositories.com/f/scientific-mathematical-computing/order-execution-engines.md) — Simulates brokerage order execution, including configurable commission fees and slippage costs. ([source](https://letianzj.github.io/quanttrading-backtest.html))
- [Risk Parity Implementation](https://awesome-repositories.com/f/scientific-mathematical-computing/risk-assessment-metrics/portfolio-risk-metrics/risk-parity-implementation.md) — Implements risk parity, maximum diversification, and minimum variance frameworks for asset allocation. ([source](https://letianzj.github.io/))
- [Strategy Parameter Optimization](https://awesome-repositories.com/f/scientific-mathematical-computing/strategy-parameter-optimization.md) — Iterates through parameter combinations to find settings that maximize specific performance targets for trading strategies. ([source](https://letianzj.github.io/quanttrading-backtest.html))

### Software Engineering & Architecture

- [Backtesting Simulations](https://awesome-repositories.com/f/software-engineering-architecture/event-driven-architectures/backtesting-simulations.md) — Implements an event-driven simulation environment to validate trading strategies using historical market data streams.
- [Dynamic Linear Modeling](https://awesome-repositories.com/f/software-engineering-architecture/kalman-filter-localization/kalman-filter-implementations/time-series-filtering/dynamic-linear-modeling.md) — Tracks the evolution of latent states, such as intercept and slope, over time using a Kalman Filter. ([source](https://letianzj.github.io/kalman-filter-linear-regression.html))
- [Kalman Filter Implementations](https://awesome-repositories.com/f/software-engineering-architecture/kalman-filter-localization/kalman-filter-implementations.md) — Uses Kalman filters to perform recursive Bayesian estimation of linear regression coefficients and cointegration relationships.
