Choosing the Right Stocks for Momentum Trading – Raw Data for Easy Reference
Momentum trading requires precision and a clear understanding of which stocks align best with your strategy. The decision to focus on higher-priced stocks like Shopify (SHOP.TO) or lower-priced options like BlackBerry (BB.TO) can significantly impact your results.
This guide is for educational purposes. Lets explore the key factors to consider when selecting momentum stocks, from volume and liquidity to price levels and sector trends.
- Scan for Moving Average Crossovers:
- Use screeners to filter stocks where shorter moving averages (e.g., 20-day) are crossing above longer moving averages (e.g., 65-day). This identifies stocks showing upward momentum.
- Volume and Price Filters:
- Volume: Daily average volume above 500,000 shares.
- Price: Focus on stocks priced between $10 and $200. These are often liquid, volatile, and not overly speculative.
- Use Momentum Metrics:
- Relative Strength Index (RSI): Look for stocks with RSI between 50 and 70, indicating upward momentum but not yet overbought.
- Relative Strength (RS): Stocks outperforming the market over the past 3-6 months are good candidates.
- Leverage Sector and Market Trends:
- Focus on sectors with strong recent performance.
- Example: Tech (SHOP.TO), green energy, or healthcare may offer better momentum than legacy industries.
- Test Historical Performance:
- Backtest your strategy on a list of stocks to see which ones respond well to your moving average crossover signals.
Choosing the right type of stock for your momentum strategy is critical. Here’s a breakdown of the factors to consider when deciding whether to focus on higher-priced stocks like SHOP.TO or lower-priced stocks like BB.TO, and the best way to pick suitable candidates:
Key Factors to Consider:
- Volume and Liquidity:
- Why it matters: High trading volume ensures that you can buy and sell shares easily without significantly affecting the stock’s price (low slippage).
- Ideal range: Look for stocks with average daily volumes of at least 500,000 to 1,000,000 shares. This applies to both higher-priced and lower-priced stocks.
- Example:
- SHOP.TO (Shopify) has high trading volume and is easy to trade.
- BB.TO (BlackBerry) may also have reasonable liquidity but can experience sharp moves if it’s low-volume.
- Price Volatility:
- Why it matters: Momentum strategies thrive on stocks that move significantly over time. Look for stocks with a high average true range (ATR) or recent volatility.
- How to measure: Use metrics like beta (volatility relative to the market) or observe the stock’s percentage price changes over the past few weeks.
- Example:
- SHOP.TO: Typically has good price movement, suitable for momentum.
- BB.TO: Might experience smaller movements but could spike due to news.
- Market Capitalization:
- Larger Cap Stocks:
- Stocks like Shopify (SHOP.TO) are usually more stable and less prone to extreme price swings due to news or speculative trading.
- They’re good for steady momentum strategies but might require higher capital for meaningful gains.
- Smaller Cap Stocks:
- Stocks under $3, like BB.TO, often belong to small-cap or micro-cap categories. They can move sharply and generate higher returns in a short time, but they’re also more volatile and risky.
- Sector Trends:
- Momentum strategies work well with stocks in sectors showing strong growth or trends. Focus on sectors that are performing well (e.g., tech, EVs, renewable energy) and avoid stagnating ones.
- Shopify (e-commerce/tech) aligns with global digital trends, while BlackBerry’s potential is tied to cybersecurity and IoT.
- News Sensitivity:
- Stocks with frequent news catalysts tend to exhibit higher volatility. However, excessive news-driven movement can create unpredictable trends.
- SHOP.TO: Frequently in the news with earnings reports and e-commerce trends.
- BB.TO: Often speculative, sometimes influenced by retail traders, creating spikes that can be challenging for momentum strategies.
- Price Level:
- Higher-Priced Stocks ($100+):
- Often belong to well-established companies with strong fundamentals.
- Easier to analyze and trade but require more capital for significant returns.
- Lower-Priced Stocks (< $10):
- May offer faster gains due to sharp percentage moves, but they’re often riskier, especially if fundamentals are weak.
Python Code.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import yfinance as yf
# Download historical data
ticker = ‘AAPL’ # Replace with your desired ticker
start_date = ‘2020-01-01’
end_date = ‘2024-01-01′
price = yf.download(ticker, start=start_date, end=end_date)
# Calculate moving averages
price[’20MA’] = price[‘Close’].rolling(window=20).mean()
price[’65MA’] = price[‘Close’].rolling(window=65).mean()
# Generate trading signals
price[‘Indicator’] = np.where(price[’20MA’] > price[’65MA’], 1.0, 0.0)
price[‘Decision’] = price[‘Indicator’].diff()
# Initialize portfolio variables
initial_cash = 500 # Starting with $500
cash = initial_cash
shares_owned = 0.0 # Fractional shares allowed
price[‘Portfolio Value’] = 0.0
# Simulate trades
for i in range(len(price)):
close_price = price[‘Close’].iloc[i]
if price[‘Decision’].iloc[i] == 1: # Buy signal
if cash > 0: # Use all cash to buy shares
shares_owned += cash / close_price
cash = 0 # All cash is used to buy shares
elif price[‘Decision’].iloc[i] == -1: # Sell signal
if shares_owned > 0: # Sell all shares
cash += shares_owned * close_price
shares_owned = 0 # All shares are sold
# Update portfolio value
price[‘Portfolio Value’].iloc[i] = cash + (shares_owned * close_price)
# Plotting portfolio value and stock price
plt.figure(figsize=(14, 7))
plt.plot(price.index, price[‘Portfolio Value’], label=’Portfolio Value’, color=’blue’)
plt.plot(price.index, price[‘Close’], label=’Stock Close Price’, alpha=0.5, color=’orange’)
plt.title(f’Momentum Strategy Simulation with ${initial_cash} Starting Balance (Fractional Shares)’)
plt.xlabel(‘Date’)
plt.ylabel(‘Portfolio Value’)
plt.legend()
plt.grid()
plt.show()
# Print final portfolio value
final_value = price[‘Portfolio Value’].iloc[-1]
print(f”Final Portfolio Value: ${final_value:.2f}”)
print(f”Total Return: {(final_value – initial_cash) / initial_cash:.2%}”)
Strategy for Fractional Shares
With fractional shares, you can invest your entire cash balance (or a fraction of it) into a stock, regardless of its price. Here’s how we adapt the logic:
- Buy Signal:
- Invest all available cash into fractional shares when a buy signal (
Decision == 1
) is generated.
- Sell Signal:
- Sell all shares (including fractional shares) when a sell signal (
Decision == -1
) is generated.
What You’ll See:
- Portfolio Value Chart:
- A line showing how your portfolio value evolves over time, plotted against the stock’s closing price.
- Final Metrics:
- The final portfolio value and percentage return over the backtest period.
(more…)