Skip to main content

Quantitative Investment Strategy

Quantitative investment, as a systematic and disciplined investment method, has developed rapidly in the Chinese market in recent years. Within the comprehensive Investment Methods Overview, quantitative investment represents a modern approach that combines mathematical models, statistical analysis, and computer technology, suitable for investors with programming and data analysis skills. This article will introduce the core strategy types, development processes, and risk control methods of quantitative investment to help investors build systematic trading systems and improve the scientific nature and efficiency of investment decisions.

Basic Concepts of Quantitative Investment

Quantitative investment is a method that uses mathematical models, statistical analysis, and computer technology to assist investment decisions. It analyzes historical data to find regularities and anomalies in the market, thereby constructing repeatable trading strategies. Compared with traditional subjective investment, quantitative investment has the following characteristics:
  • Systematic: Making decisions based on clear rules and processes, reducing human emotional interference
  • Disciplined: Strictly executing transactions according to signals issued by models, avoiding chasing ups and downs
  • Backtestable: Can verify the effectiveness of strategies using historical data
  • Diversified: Reducing portfolio risk through multi-strategy, multi-product allocation

Common Quantitative Strategy Types

Trend Following Strategy

Trend following is one of the most classic and widely used quantitative strategies. It is based on the assumption of “trend continuation”, believing that asset prices will maintain a certain direction for a period of time. Core Logic: When an asset price forms a clear upward or downward trend, follow this trend to trade and capture profits brought by the continuation of the trend. Common Indicators: Moving averages, MACD, Bollinger Bands, etc. Applicable Scenarios: Market conditions with obvious trends and large volatility

Mean Reversion Strategy

Mean reversion strategy is exactly the opposite of trend following strategy. It is based on the assumption that “prices revert to the mean”, believing that after asset prices deviate significantly from their mean, they will eventually return to a reasonable level. Core Logic: When asset prices deviate significantly from their historical mean, short (when prices are too high) or long (when prices are too low) the asset, waiting for prices to revert to the mean. Common Indicators: Relative Strength Index (RSI), deviation rate, Z-score, etc. Applicable Scenarios: Market conditions with oscillations and no obvious trends

Statistical Arbitrage Strategy

Statistical arbitrage strategy is a method of arbitrage using statistical correlations between asset prices. It usually involves portfolio trading of multiple related assets, capturing short-term deviations between asset prices to obtain profits. Core Logic: Find asset pairs with stable correlations, when the price relationship between them shows short-term abnormal deviation, buy undervalued assets and sell overvalued assets, waiting for the price relationship to return to normal. Common Types: Pair trading, calendar spread arbitrage, cross-market arbitrage, etc. Applicable Scenarios: Market environments where there are stable price relationships between related assets

Factor Stock Selection Strategy

Factor stock selection strategy is a stock selection method based on factor analysis, identifying key factors affecting stock returns, and constructing multi-factor models to screen stocks with excess return potential. Core Logic: Through statistical analysis of historical data, identify factors that can continuously generate excess returns (such as value, growth, momentum, quality, etc.), and then score and screen stocks based on these factors. Common Factors:
  • Value factors: Price-to-earnings ratio (P/E), price-to-book ratio (P/B), price-to-sales ratio (P/S), etc.
  • Growth factors: Revenue growth rate, net profit growth rate, ROE, etc.
  • Momentum factors: Past 3-month, 6-month, 12-month returns, etc.
  • Quality factors: Asset-liability ratio, cash flow, dividend rate, etc.
Applicable Scenarios: Stock markets, especially perform well in structured market conditions

Trend Following Strategy

Mean Reversion Strategy

Statistical Arbitrage Strategy

Factor Stock Selection Strategy

Quantitative Strategy Development Process

Strategy Conception and Hypothesis Formation

The first step in quantitative strategy development is to clarify investment objectives and strategy logic, forming verifiable hypotheses. At this stage, investors need to:
  1. Determine investment objectives: return targets, risk preferences, investment cycle, etc.
  2. Find market anomalies: Discover potential profit opportunities through market observation or academic research
  3. Form strategy hypotheses: Transform market anomalies into verifiable investment hypotheses
For example: “Stocks with low P/E ratios will perform better than stocks with high P/E ratios in the future period” is a typical strategy hypothesis.

Data Collection and Preprocessing

Data is the foundation of quantitative strategies, and high-quality data is crucial for strategy development. The main tasks in the data collection and preprocessing stage include:
  1. Determine required data: Determine which market data and fundamental data are needed based on strategy logic
  2. Collect data: Obtain historical data from reliable data sources
  3. Data cleaning: Process missing values, outliers, data errors, etc.
  4. Data standardization: Convert data of different magnitudes into comparable forms
  5. Feature engineering: Construct new feature variables according to strategy requirements

Strategy Model Construction

After clarifying strategy hypotheses and completing data preprocessing, the next step is to transform strategy logic into specific mathematical models and trading rules. The work in this stage includes:
  1. Select modeling methods: Choose appropriate modeling methods based on strategy type (such as statistical models, machine learning models, etc.)
  2. Determine parameter settings: Set key parameters in the model (such as time windows, thresholds, etc.)
  3. Write trading rules: Clearly define specific conditions for buying, holding, and selling
Here is an example code of a simple trend following strategy based on double moving average crossover:
import pandas as pd
import numpy as np

# Read historical price data
df = pd.read_csv('stock_price_data.csv')

# Calculate short-term and long-term moving averages
df['short_ma'] = df['close'].rolling(window=5).mean()
df['long_ma'] = df['close'].rolling(window=20).mean()

# Generate trading signals: buy when short-term MA crosses above long-term MA, sell when crosses below
df['signal'] = 0
df.loc[df['short_ma'] > df['long_ma'], 'signal'] = 1
df.loc[df['short_ma'] < df['long_ma'], 'signal'] = -1

# Calculate daily positions
df['position'] = df['signal'].shift(1)

# Calculate daily returns
df['return'] = df['close'].pct_change()

# Calculate strategy returns
df['strategy_return'] = df['position'] * df['return']

# Calculate cumulative returns
df['cumulative_return'] = (1 + df['strategy_return']).cumprod()

Strategy Backtesting and Optimization

Strategy backtesting is a key step in evaluating strategy effectiveness. Through backtesting, investors can understand the performance of strategies on historical data and optimize strategies. The main tasks in the backtesting and optimization stage include:
  1. Set backtesting parameters: Determine backtesting time range, initial capital, transaction costs, etc.
  2. Run backtesting: Simulate historical trading processes according to trading rules
  3. Evaluate backtesting results: Calculate indicators such as returns, maximum drawdown, Sharpe ratio, etc.
  4. Strategy optimization: Improve strategy performance through parameter adjustment, rule improvement, etc.
  5. Avoid overfitting: Pay attention to controlling the degree of optimization to avoid strategies overfitting historical data
Common Backtesting Indicators:
  • Total return: The total return of the strategy during the backtesting period
  • Annualized return: Convert total return into an annualized level
  • Maximum drawdown: The maximum loss幅度 of the strategy during the backtesting period
  • Sharpe ratio: Measure the excess return obtained per unit of risk
  • Win rate: The proportion of profitable trades to total trades
  • Profit-loss ratio: The ratio of average profit to average loss

Strategy Live Trading and Monitoring

After backtesting and optimization, the strategy can enter the live trading stage. The following points should be noted in the live trading stage:
  1. Small position trial trading: First use a small portion of funds for live trading to verify the performance of the strategy in the live trading environment
  2. Real-time monitoring: Closely monitor strategy operating status and market changes
  3. Regular evaluation: Regularly evaluate strategy performance, analyze differences between actual performance and backtesting results
  4. Dynamic adjustment: Make necessary adjustments and improvements to the strategy according to market environment changes and strategy performance
  1. Control the number of parameters: Avoid using too many parameters and reduce the complexity of the strategy
  2. Out-of-sample testing: Use part of the data for strategy development and another part for testing
  3. Cross-validation: Verify the stability of the strategy by splitting data multiple times
  4. Simplicity principle: When effects are similar, choose strategies with simpler logic and fewer parameters
  1. Consider transaction costs: Accurately set transaction commissions, slippage and other costs in backtesting
  2. Consider liquidity: Avoid choosing assets with poor liquidity, or adjust trading scale
  3. Avoid over-optimization: Don’t over-adjust parameters to pursue backtesting results
  4. Continuous monitoring and adjustment: Make appropriate adjustments to the strategy according to live trading performance
  1. Programming languages: Python, R, etc.
  2. Data acquisition: Wind, Choice, Tushare and other data platforms
  3. Backtesting frameworks: Backtrader, Zipline, JoinQuant, Uqer, etc.
  4. Visualization tools: Matplotlib, Seaborn, Plotly, etc.
  5. Machine learning libraries: scikit-learn, TensorFlow, PyTorch, etc.

Risk Control for Quantitative Strategies

Common Risk Types

While bringing returns, quantitative strategies also face various risks. Understanding these risks is a prerequisite for effective risk control. Common risks of quantitative strategies include:
  1. Market risk: Risk caused by overall market fluctuations
  2. Strategy risk: Risk caused by strategy logic failure or improper parameter settings
  3. Liquidity risk: Risk of being unable to buy or sell assets quickly at reasonable prices
  4. Technical risk: Risk caused by technical issues such as trading system failures and data errors
  5. Operational risk: Risk caused by human operational errors

Risk Control Methods

In response to the above risks, investors can adopt the following risk control methods:
  1. Position management: Control the position proportion of single products and single strategies to avoid excessive concentration
  2. Stop-loss strategy: Set strict stop-loss conditions to control the loss of single transactions
  3. Multi-strategy combination: Run multiple strategies with different logics simultaneously to reduce single strategy risk
  4. Stress testing: Test the performance of strategies in extreme market environments
  5. Risk indicator monitoring: Real-time monitoring of risk indicators such as maximum drawdown, volatility, etc.
  6. Regular strategy evaluation: Regularly evaluate strategy performance and discover problems in a timely manner

Capital Management Techniques

Reasonable capital management is one of the keys to successful quantitative investment. Common capital management techniques include:
  1. Fixed proportion investment method: Invest a fixed proportion of funds each time
  2. Kelly criterion: Calculate optimal position based on win rate and profit-loss ratio
  3. Risk parity: Allocate funds according to the risk contribution of each asset
  4. Maximum drawdown control: Determine position based on acceptable maximum drawdown
Here is example code for calculating optimal position using the Kelly criterion:
def kelly_criterion(win_rate, win_loss_ratio):
    """
    Calculate optimal position ratio using Kelly criterion
    win_rate: Winning rate
    win_loss_ratio: Profit-loss ratio
    """
    optimal_f = win_rate - (1 - win_rate) / win_loss_ratio
    return max(0, optimal_f)  # Ensure position ratio is non-negative

# Example: 60% win rate, 2:1 profit-loss ratio
optimal_position = kelly_criterion(0.6, 2)
print(f"Optimal position ratio: {optimal_position:.2%}")
In quantitative investment, the importance of risk control is no less than the strategy itself. Even the best strategy may fail in specific market environments, so establishing a sound risk control system is the key to long-term stable profitability. Effective risk control can not only help investors avoid major losses, but also allow investors to remain calm in market fluctuations and adhere to the implementation of trading strategies.

Strategy Selection in Different Market Environments

Bull Market Environment

In a bull market environment, the market as a whole shows an upward trend, investor sentiment is high, and trading volume increases. At this time, the following strategies are suitable:
  • Trend following strategy: Follow the bull market trend to obtain returns
  • Growth stock factor strategy: Focus on stocks with high growth potential
  • Momentum strategy: Utilize market chasing-up effects

Bear Market Environment

In a bear market environment, the market as a whole shows a downward trend, investor sentiment is low, and trading volume shrinks. At this time, the following strategies are suitable:
  • Reverse short-selling strategy: Use tools such as stock index futures to short the market
  • Defensive factor strategy: Focus on defensive stocks with low valuations and high dividends
  • Hedging strategy: Reduce market risk through long-short combinations

Sideways Market Environment

In a sideways market environment, the market lacks a clear trend and prices fluctuate up and down. At this time, the following strategies are suitable:
  • Mean reversion strategy: Utilize price fluctuations to obtain returns
  • Statistical arbitrage strategy: Capture short-term deviations between asset prices
  • Intraday trading strategy: Avoid overnight risk and capture short-term volatility returns

Strategy Conversion in Different Market Phases

Market environments are not static, and investors need to adjust strategies in a timely manner according to changes in market environments. The key to strategy conversion lies in identifying changes in market environments, which can be done through the following methods:
  1. Trend indicators: Use moving averages, MACD, etc. to determine market trends
  2. Volatility indicators: Use VIX index, ATR, etc. to determine market volatility
  3. Volume indicators: Use trading volume, turnover rate, etc. to determine market activity
  4. Market sentiment indicators: Use investor confidence index, margin financing and securities lending balance, etc. to determine market sentiment

Application of Artificial Intelligence in Quantitative Investment

With the development of artificial intelligence technology, machine learning, deep learning and other technologies are increasingly widely used in quantitative investment. Artificial intelligence technology can help investors:
  1. Mine complex patterns: Discover market patterns that are difficult to identify with traditional methods
  2. Process unstructured data: Analyze text data such as news and social media
  3. Adaptive learning: Automatically adjust model parameters according to market changes
  4. Multi-factor model optimization: Improve the predictive ability of factor models

Integration of Big Data and Quantitative Investment

The development of big data technology has provided more data sources and analysis methods for quantitative investment. The application of big data in quantitative investment mainly includes:
  1. Multi-source data integration: Integrate transaction data, fundamental data, macroeconomic data, etc.
  2. High-frequency data processing: Process and analyze high-frequency transaction data
  3. Alternative data application: Such as satellite images, e-commerce data, social media data, etc.
  4. Real-time data analysis: Real-time processing and analysis of market data to grasp trading opportunities

Integration of Quantitative Investment and Traditional Investment

Quantitative investment and traditional investment are not opposing relationships, and their integration is the future development trend. Quantitative investment can provide traditional investment with:
  1. Data-driven decision support: Verify investment logic through data analysis
  2. Systematic risk management: Improve the scientific nature and effectiveness of risk control
  3. Efficient execution system: Reduce transaction costs and improve execution efficiency
  4. Expand investment scope: Cover markets and strategies that are difficult to involve with traditional methods
Market environments are constantly changing, and any quantitative strategy has its applicable scope and life cycle. Quantitative investors need to maintain an attitude of continuous learning, constantly update their knowledge system, track market changes, and optimize trading strategies. On the road of quantitative investment, there is no one-time strategy, only a constantly evolving investment system.

Experimental Task: Build a Simple Quantitative Strategy

To help you better understand and apply quantitative investment strategies, we have designed an experimental task to guide you in building a simple quantitative strategy.
1

Select Strategy Type

Choose a strategy type that interests you from trend following, mean reversion, statistical arbitrage, factor stock selection, etc.
2

Determine Strategy Logic

Clearly define the core logic and trading rules of the strategy, such as: “Buy when the 5-day moving average crosses above the 20-day moving average, sell when it crosses below”
3

Obtain Historical Data

Obtain historical price data of relevant assets, such as stocks, indices, futures, etc.
4

Write Backtesting Code

Use Python or other programming languages to write backtesting code and implement the strategy logic
5

Run Backtesting and Analyze Results

Run backtesting, calculate indicators such as returns, maximum drawdown, Sharpe ratio, etc., and analyze strategy performance
6

Optimize the Strategy

According to the backtesting results, try to adjust strategy parameters or improve strategy logic to improve strategy performance
7

Simulate Live Trading

Run the optimized strategy in a simulation environment to observe its performance under conditions close to real trading
To help you learn more about quantitative investment, we recommend the following learning resources:

Books

  • “Quantitative Trading Strategies: How to Build Your Own Algorithmic Trading Business” - Ernest P. Chan
  • “Active Portfolio Management: A Quantitative Approach for Producing Superior Returns and Controlling Risk” - Richard C. Grinold
  • “Advances in Financial Machine Learning” - Marcos Lopez de Prado
  • “Python for Finance: Analyze Big Financial Data” - Yves Hilpisch

Online Courses

  • Coursera: Investment Management with Python and Machine Learning
  • Udacity: Data Science for Investment Professionals
  • Quantopian Open Course (archived but still valuable)
  • Ricequant Academy: Python Quantitative Trading Practical Course

Communities and Platforms

  • JoinQuant: Provides quantitative trading platform and community
  • Ricequant: Provides quantitative research and backtesting platform
  • Uqer: Provides quantitative research platform
  • GitHub: Follow open-source projects related to quantitative investment
Quantitative investment is a field that requires continuous learning and practice. Don’t expect to develop perfect strategies at the beginning; instead, gradually improve your quantitative investment capabilities through continuous learning, practice, and summary. Remember that investment is a marathon, not a sprint. Establishing a scientific investment system and maintaining a good investment mindset are essential for long-term success in your investment career.