DIY Momentum QnA and Discussion

That is really a wonderful product.
For backtesting, I recommend combination of tools depending on the strategy and the level of customization required. Some of the tools I use include Python with Pandas and NumPy for custom strategies, Backtrader, QuantConnect, TradingView, and Excel for simpler backtests.

Streak by Zerodha is a good option for backtesting, especially if you are looking for an easy-to-use, no-code platform. It allows you to create strategies with simple conditions, backtest them on historical data, and automate trading. It’s a great choice if you want to streamline the process without delving too deeply into programming.

I will try to explain different types of factor investing in momentum strategy and will explain in detail of each Factor in coming time. Factor investing in momentum strategy typically involves selecting stocks based on various momentum-related factors. Here are some common types:

  1. Price momentum: Selecting stocks that have had high returns over a specific period, assuming they will continue to perform well.

  2. Earnings momentum: Choosing stocks with positive earnings surprises or upward earnings revisions, expecting continued strong performance.

  3. Revenue momentum: Focusing on companies with accelerating revenue growth.

  4. Return on equity (ROE) momentum: Investing in companies with improving return on equity.

  5. Volume momentum: Considering stocks with increasing trading volumes, indicating growing investor interest.

  6. Momentum Z-score: Using statistical measures like Z-score to identify stocks with extreme price movements compared to the average, assuming a continuation or mean reversion.

These factors can be combined or used individually to create a momentum-based investment strategy.

1 Like

Price momentum:
This involves selecting stocks that have shown strong price performance over a specific period. The basic idea is that stocks that have performed well in the recent past will continue to do so in the near future. This strategy is based on the tendency of stock prices to exhibit persistence, where the momentum effect suggests that trends in price movements can continue for some time.

For example, a price momentum strategy might involve looking at the top 10% of stocks based on their returns over the last 6 to 12 months and then investing in those stocks. Investors using this approach believe that the positive price trends are likely to persist due to factors like market sentiment, investor behavior, or continued strong fundamentals.

2 Likes

In momentum factor series I am covering today earnings momentum:
It involves selecting stocks that have demonstrated positive earnings surprises or upward earnings revisions. The idea is that companies with better-than-expected earnings or increasing earnings forecasts are likely to continue performing well in the future, as they may indicate strong business performance and investor confidence.

For example, suppose a company’s quarterly earnings were expected to be ₹10 per share, but the actual earnings came in at ₹12 per share. This positive earnings surprise might attract more investors, driving the stock price higher. Similarly, if analysts revise their earnings forecasts upward for a company, it suggests optimism about the company’s future prospects, potentially leading to increased demand for its stock.

A practical implementation of this strategy could be:

  1. Identify companies that have recently reported earnings higher than analyst expectations.
  2. Look for companies where analysts have revised their earnings estimates upward.
  3. Invest in these companies, anticipating that the positive momentum in earnings will translate into higher stock prices.

For instance, if Company A was expected to earn ₹15 per share in the upcoming quarter but is now projected to earn ₹18 per share due to strong business performance, an investor following an earnings momentum strategy might buy shares of Company A, expecting that the stock price will rise as more investors become aware of the improved earnings outlook.

1 Like

Check out this free dashboard, where the current selection for different factors is updated daily.

For Momentum, I would recommend the settings: NSE500, 180 days lookback, 90 days rebalance, 30 stocks, equal weight.

If you have any questions on use, please write to me.

Regards
Samir Shah

Pls note: For educational purpose only.

1 Like

yeah python i have experience in. Where do we get the historical data from? can we get this from exchanges?

1 Like

Please check below this should help, you can get historical data from various sources, including exchanges and third-party providers. Here are some options:

  1. Exchanges: Some exchanges provide historical data directly through their websites or APIs. For example, the National Stock Exchange (NSE) of India offers historical data downloads on their website. Similarly, the Bombay Stock Exchange (BSE) provides data on their website.
  2. Financial Data Providers: Services like Yahoo Finance, Alpha Vantage, Quandl, and Google Finance offer APIs to access historical stock data. Some of these services have free tiers with limited access, while others may require a subscription for extensive data.
  3. Brokerages: If you have an account with a brokerage, they might provide historical data as part of their service. Some brokerages offer APIs for their clients to access various financial data, including historical stock prices.
  4. Specialized Platforms: Platforms like Bloomberg and Reuters offer comprehensive financial data, but these services are typically expensive and used by financial professionals.

For Python, popular libraries like yfinance, pandas_datareader, and alpha_vantage can be used to fetch historical data. Here’s a quick example of how you can use yfinance to get historical stock data:

python

Copy code

import yfinance as yf

# Get historical market data for a stock
ticker = 'AAPL'
data = yf.download(ticker, start='2020-01-01', end='2023-12-31')

print(data.head())

This script fetches historical data for Apple Inc. (AAPL) from January 1, 2020, to December 31, 2023. You can adjust the ticker symbol and date range as needed.

1 Like

and for placing orders systematically i guess we need to use API of brokerages like zerodha

Yes, kite connect API by Zerodha

1 Like

In this article I am emphasizing a very important issue of momentum investing. There are several pitfalls to avoid to ensure a successful strategy. Here are some key don’ts:

  1. Don’t Ignore Risk Management: Momentum investing can lead to significant losses if not properly managed. Always have stop-loss orders or other risk management techniques in place to protect your investments from sharp reversals​ ​.
  2. Don’t Chase Performance: Avoid buying stocks solely based on their recent performance without understanding the underlying reasons for their price movement. Chasing performance can lead to buying at the peak and suffering losses during corrections​ .
  3. Don’t Overtrade: Excessive trading can lead to high transaction costs, which can erode your returns. Stick to your predefined rebalancing schedule, whether it is weekly, monthly, or quarterly​​.
  4. Don’t Ignore Fundamentals: While momentum investing primarily focuses on price trends, completely ignoring fundamentals can be risky. Ensure that the stocks in your momentum portfolio have sound financial health and are not just speculative plays.
  5. Don’t Neglect Diversification: Concentrating your investments in a few high-momentum stocks can increase risk. Diversify across sectors and stocks to spread risk and enhance the stability of your portfolio​.
  6. Don’t Hold Losing Positions Too Long: Be disciplined about cutting losses. Holding onto losing positions in the hope they will recover can lead to larger losses. Stick to your stop-loss rules and exit positions that no longer exhibit strong momentum​​.
  7. Don’t Ignore Market Conditions: Momentum strategies may underperform in volatile or bearish markets. Be aware of broader market trends and adjust your strategy accordingly. During turbulent times, consider increasing cash positions or using hedging strategies​​.
  8. Don’t Rely Solely on Technical Indicators: While technical indicators are crucial for momentum investing, relying solely on them without considering market sentiment or macroeconomic factors can be detrimental. Use a combination of tools and analyses to make informed decisions​​.

By being mindful of these pitfalls, you can improve the effectiveness of your momentum investing strategy and better manage the associated risks.

But if we follow fundamentals also and applying stop losses also, then it wont be pure quantitative momentum…There will be too many things to track and stick to…Momentum special quantitative is all about price movement

1 Like

The fundamentals of a momentum strategy are:

  1. Price Trends: Focus on stocks that have shown strong recent price movements, as they tend to continue performing well.
  2. Relative Strength: Select stocks that outperform their peers.
  3. Holding Period: Hold positions for short to medium terms, typically a few months.
  4. Rebalancing: Regularly update the portfolio to include the strongest momentum stocks.
  5. Risk Management: Use stop-loss orders, diversify, and control position sizes to manage risks.
1 Like

The points mentioned and links given are well thought out, please refer them to get deeper into strategy knowledge. The use of stop-loss orders in a momentum strategy is debated among investors. Here are two perspectives:

Pro-Stop Loss:

  1. Risk Management: Stop-loss orders can help manage risk by limiting potential losses when a stock’s price reverses unexpectedly.
  2. Capital Preservation: They ensure that significant losses are avoided, preserving capital for future investments.
  3. Discipline: Implementing stop-loss orders enforces a disciplined approach to selling underperforming stocks, preventing emotional decision-making [❞].

Anti-Stop Loss:

  1. Volatility Sensitivity: Momentum stocks can be volatile, and stop-loss orders might trigger during normal price fluctuations, leading to unnecessary sales.
  2. Trend Continuation: Selling too soon due to a stop-loss might cause investors to miss out on a stock’s subsequent recovery and continued upward trend.
  3. Strategy Purity: Some argue that momentum investing should focus purely on price trends without interference from stop-loss mechanisms, relying on the strategy’s inherent rebalancing to manage risk [❞] [❞].

Conclusion

Both approaches have valid points. Using stop-loss orders can enhance risk management but may lead to missed opportunities in volatile markets. Investors need to choose based on their risk tolerance and investment style.

1 Like

If stop-loss can be applied to protect capital, then can even stage-analysis be applied while selection of stocks as that would fine tune the selection process also…and if we apply the fundamentals also, promoter holdings also, then will this not dilute the quantitative strategy itself?

The intent of the forum is to learn new things, it is also on us to unlearn preconceived misconceptions. Incorporating elements like stop-loss orders, stage analysis, and fundamentals (e.g., promoter holdings) into a momentum strategy can indeed provide additional layers of risk management and fine-tuning. However, it can also dilute the purity of a quantitative momentum strategy. Here’s a breakdown:

Stop-Loss Orders

  • Pro: Protects capital by limiting losses during sudden price drops.
  • Con: May lead to premature exits due to normal volatility, causing missed opportunities.

Stage Analysis

  • Pro: Helps in identifying stocks in the early stages of an uptrend, enhancing the likelihood of catching strong momentum.
  • Con: Adds a subjective element to the strategy, deviating from pure quantitative measures.

Fundamental Analysis (e.g., Promoter Holdings)

  • Pro: Ensures that selected stocks have a solid backing and are less likely to be speculative, adding a layer of safety.
  • Con: Shifts focus from purely price-based indicators to qualitative aspects, diluting the quantitative nature of the strategy.

Pure Quantitative Momentum Strategy

  • Simplicity: Focuses purely on price movements and trends without additional subjective filters.
  • Consistency: Follows a strict, rule-based approach, reducing the risk of emotional decision-making.

Balancing Both Approaches

While integrating these additional factors can potentially improve the robustness of a momentum strategy, it also moves it away from a purely quantitative approach. Each investor needs to find a balance that aligns with their risk tolerance, investment goals, and comfort level with subjectivity.

Conclusion

Adding stop-loss orders, stage analysis, and fundamental checks can enhance a momentum strategy by providing better risk management and selection refinement. However, it does dilute the pure quantitative nature of the strategy, making it more complex and potentially introducing biases. Each investor must decide based on their preferences and investment philosophy.

2 Likes

When I get the top ranking list , first I will check if all stocks are in stage 2 or not. If some stocks are not in stage 2, then I will not select them, I will select the next one, even if it has high ranking.

Similarly , from fundamental angle, I will check if it has consistent sales and earnings in last 5-6 quarters atleast. Also I will check ROE and debt also, alongwith promoter holdings. If any of these parameters are not getting fulfilled, I will ignore it and select the next one.

2 Likes

Afterall, there is no such guarantee that if we keep the momemtum stratgey pure and based on only price, then only we will be rewarded with higher returns. So why not use our already acquired knowledge to finetune this strategy?
Why some people insist on keeping it pure and maintain its sanctity? Is there anything to gain ?

2 Likes

Not only in this but in all strategies purer the better, you may wish to combine with many. But the return will be affected.
The idea behind keeping a momentum strategy “pure” and based solely on price is rooted in the philosophy that price is the ultimate arbiter in the market. Here are some reasons why proponents of pure momentum strategies insist on this approach:

  1. Simplicity and Objectivity: A pure price-based strategy is straightforward and eliminates subjective biases. By relying solely on price data, investors avoid the complexities and potential pitfalls of interpreting other indicators, which can often be ambiguous or misleading.
  2. Historical Success: Pure momentum strategies have been extensively studied and have shown consistent outperformance in various markets over long periods. The foundational research by academics such as Jegadeesh and Titman (1993) supports the idea that past price performance can predict future returns.
  3. Market Efficiency: Price movements reflect the collective wisdom of all market participants, incorporating all available information. Proponents believe that price action alone can capture the essence of market sentiment and fundamentals without the need for additional indicators.
  4. Avoiding Overfitting: Introducing additional variables can lead to overfitting, where a model performs well on historical data but poorly on new data. A pure price-based strategy reduces the risk of creating a model that is too finely tuned to past market conditions.
2 Likes

Which day of the week gives maximum return in weekly rebalance? any Guess.
Here is the take:
The optimal day of the week for rebalancing in a weekly momentum strategy can vary depending on the specific strategy and market conditions. However, some insights can be drawn from research and practical applications in the field.
For instance, Alok Jain from Weekend Investing suggests that the best day to rebalance can be based on historical data and the specific nature of the strategy being used. The key is to ensure that the portfolio is aligned with the strongest performing stocks each week​ (Weekend Investing)​​ (Weekend Investing)​.
Studies have shown that rebalancing on Mondays tends to be popular among some strategies due to the potential market movements over the weekend. However, some investors prefer mid-week rebalancing to avoid the volatility often seen at the beginning and end of the trading week. Ultimately, the choice of day might depend on the specific backtesting results and the characteristics of the portfolio.

It’s essential to test different days of the week using historical data to determine which day maximizes returns for your specific strategy. The overall goal is to maintain alignment with the strongest momentum stocks while minimizing the impact of market noise and volatility.
To fine-tune your strategy, consider backtesting with platforms like Streak by Zerodha, which allows you to experiment with different rebalancing schedules and identify the most effective day for your portfolio​ (Weekend Investing)​​ (Weekend Investing)​.

Hi, Good initiative to start this thread. I recently started Momentum Investing. My goal is to earn 10% return in a few days or a month. I exit once the stock gives me a 10% return even if the stock has the potential to rise more. Entry is entirely based on the Technical chart and nothing else. I use Chart Ink screeners to identify a list of potential stocks.

3 Likes