Statistics - Missing Link between Technical Analysis and Algorithmic Trading by Manish Jalan
Introduction to Statistics and Algo Trading
Speaker Introduction
- Mr. Manish Jalan is introduced as the speaker, who will discuss statistics and the transition from technical analysis to algorithmic trading.
- He is the Managing Director and Co-founder of Samsara Capital Technologies LLP, with over 9 years of experience in systematic quantitative trading strategy development.
Overview of Presentation
- The focus will be on statistics as a bridge between technical analysis and algo trading, rather than delving deeply into algo trading itself.
- Acknowledgment is given to Atma BC members for providing the opportunity to speak.
The Importance of Preparation in Trading
Chinese Proverb on Battle Preparation
- Manish shares a Chinese proverb emphasizing that battles are often won or lost before they begin, relating this concept to market trading.
Psychological Aspects of Trading
- The psychology behind trade decisions can significantly influence outcomes even before executing trades; preparation is key.
Strategies for Effective Trading
- Two approaches to preparing for trades are discussed: entering without knowledge versus being well-prepared with strategies based on statistical insights.
Understanding Algo Trading
Definition of Algo Trading
- Manish clarifies that algo trading does not necessarily require high-tech systems but involves having a disciplined set of rules.
Misconceptions about Algo Trading
- There’s a common misconception that algo trading is only for those with advanced technology or significant capital; however, it fundamentally relies on rule-based discipline.
Understanding Algorithmic Trading and Risk Management
The Importance of Rules in Trading
- Trading rules are essential for creating a comprehensive system that encompasses not just technical analysis but also risk management and portfolio optimization.
- Many traders face mental blockages regarding the complexity of trading rules, often perceiving them as overly complicated or reserved for experts.
- Advanced algorithmic systems utilize simple yet effective rules; the key is executing these rules with precision rather than complicating them unnecessarily.
Historical Example: Morgan Stanley's Market Making
- In the 1980s, Morgan Stanley faced challenges selling $100 million worth of General Motors shares due to market downturns.
- A trader suggested selling Ford shares alongside General Motors, leveraging the correlation between stocks in the same sector to mitigate losses.
- This strategy led to significant profits through pairs trading, demonstrating that simple rule-based strategies can yield substantial financial success.
Emotional Intelligence vs. Intelligent Quotient in Trading
- Human traders possess both IQ (intelligence for decision-making) and EQ (emotional responses), which can negatively impact trading decisions during losses.
- Traders often become irrational when facing losses, leading them to deviate from their established rules based on emotional reactions rather than logical reasoning.
- Algorithmic trading removes emotional factors by strictly adhering to predefined rules without being influenced by market fluctuations or personal feelings.
Discipline in Trading Practices
- Successful traders who maintain discipline can effectively implement their strategies without needing complex algorithms; they follow simple rules consistently.
- Many successful traders operate without sophisticated technology but rely on disciplined adherence to their trading principles.
The Role of Statistics in Trading Strategies
- Statistics serve as a bridge between technical analysis and developing a comprehensive trading strategy that incorporates various elements beyond mere technical indicators.
- Purely relying on technical indicators like moving averages or Bollinger Bands may not suffice; integrating statistical methods enhances decision-making processes.
Understanding Market Trends and Technical Systems
The Impact of Market Conditions on Trading Strategies
- A trend-following system can yield significant profits during favorable market conditions, as seen in equities from May to December 2014.
- Problems arise when the market is range-bound; for instance, if Nifty fluctuates within a narrow band for three years, traditional technical systems will likely incur losses.
- The key challenge is minimizing losses during unfavorable market conditions while using trend-following systems.
- Reducing losses allows traders to maintain their systems longer and adhere to disciplined trading practices.
- Consistent operation of rule-based systems is essential, akin to running a business daily regardless of market fluctuations.
Utilizing Statistics for Improved Trading Outcomes
- Traders should explore statistical methods to mitigate drawdowns when markets are not trending favorably.
- When markets are favorable, leveraging statistics can enhance returns significantly beyond standard technical analysis outcomes.
- Achieving the dual objective of maximizing gains in favorable conditions while minimizing losses in adverse situations enables sustainable trading practices over time.
Understanding Volatility as a Key Statistical Measure
- Volatility is a crucial statistic derived from data distributions that impacts trading strategies significantly.
- Many traders may not fully grasp the implications of volatility despite its common usage in algo trading contexts.
- For example, implied volatility plays an important role in options trading but requires deeper understanding for effective application.
Conceptualizing Market Consensus and Volatility
- Market consensus might suggest an average expected movement (e.g., 20% up), but actual outcomes can vary widely due to inherent uncertainty.
- Introducing volatility (e.g., 15%) illustrates potential deviations from this consensus—actual performance could be much higher or lower than anticipated.
Understanding Market Volatility and Its Implications
The Basics of Normal Distribution and Market Movement
- The concept of normal distribution indicates a 66% probability that the market will remain between 5% and 35%. Historical events, like the 2008 financial crisis, show that markets can move significantly outside this range.
- A further analysis suggests a 95% chance for market movement to stay within -10% to +50%, illustrating the potential extremes in market behavior.
Volatility as a Measure of Risk
- Volatility is defined as a measure of risk, helping traders assess how risky an asset class is. For instance, Nifty's volatility at 15% indicates moderate risk compared to natural gas at 30%, which is considered riskier.
- USD/INR has an annualized volatility of about 8%, making it less risky than Nifty. This comparison highlights the relationship between risk and potential returns in trading.
Practical Application of Volatility in Trading Decisions
- When applying volatility concepts in trading, one must consider different assets' characteristics. For example, comparing DLF and ITC stocks requires understanding their respective volatilities when setting stop-loss orders.
- Traders should not use equal stop-loss percentages across different assets due to varying daily price movements; DLF may hit a stop loss quickly while ITC might not.
Setting Stop-Loss Orders Based on Asset Volatility
- Using variable stop-losses based on asset volatility is crucial. A fixed percentage could lead to frequent losses if applied indiscriminately across different stocks.
- For instance, a 2% drop in DLF may occur frequently due to its higher daily range volatility compared to ITC.
Historical Context of Asset Class Volatility
- Historically, commodities are the most volatile asset class (e.g., silver, natural gas), requiring larger stop losses. Equities typically have an annualized volatility around 15%-20%.
- Currencies exhibit lower volatility (around 8%-10%), while bonds are generally the least volatile asset class available for trading.
Understanding Volatility and Time Series in Trading
Historical Averages and Volatility
- Historically, long-term averages for returns are around 3 to 4%. Different equities exhibit varying volatility levels; for instance, DLF is highly volatile while ITC is less so.
Calculating Volatility
- To calculate volatility, one can use standard deviation. It's recommended to research standard deviation online if unfamiliar. Another useful metric is the Average True Range (ATR), which traders should start utilizing.
Importance of Time Series Analysis
- Understanding the type of time series being traded is crucial. Many traders overlook this aspect, which can lead to poor decision-making.
Frequency of Trading Candles
- Traders must recognize the frequency of their trading candles—daily, weekly, or minute-based intervals—as it significantly impacts analysis.
- For technical trading (not high-frequency), it's essential to understand candle lengths (e.g., 30-minute or 60-minute candles) for effective analytics.
Decision-Making Based on Candle Length
- When using a specific candle length (e.g., 60 minutes), decisions should ideally be made at the end of each candle rather than randomly during its formation.
Analyzing Data at Candle Closure
- Utilizing volatility metrics like standard deviation requires analyzing data at the end of each candle period for accurate insights.
- Decisions regarding position adjustments should occur after completing a full candle cycle (e.g., after another 60 minutes).
Impact of Candle Length on Volatility Calculations
- The choice of candle length directly affects volatility calculations; longer candles yield higher volatility numbers compared to shorter ones.
Annualized vs. Short-Term Volatility
- Annualized volatility indicates potential market movement over a year but differs significantly when considering shorter time frames like five or ten minutes.
- Smaller time frames will show lower percentage movements; thus, understanding these differences helps set appropriate stop-loss levels.
Stop-Loss Considerations Based on Time Series
- Longer candle lengths necessitate larger stop-loss margins due to increased expected price fluctuations compared to shorter intervals where smaller movements suffice.
Conclusion on High-Frequency Trading Preferences
- The preference for high-frequency trading stems from quicker decision-making capabilities afforded by reduced time intervals between trades.
Understanding Volatility and Correlation in Trading
The Nature of Buying and Selling Decisions
- Buying decisions are made quickly, while selling decisions occur even faster due to tighter stop losses and lower volatility.
- Execution costs present challenges in the current market scenario.
Introduction to Correlation
- Correlation is a key statistical concept that indicates how two assets move in relation to each other.
- Positive correlation occurs when both assets move in the same direction (up or down), while negative correlation happens when one asset moves up and the other moves down.
Practical Understanding of Correlation
- A practical example involves two portfolios:
- Portfolio A: Access Bank, HDFC Bank, ICICI Bank.
- Portfolio B: OMC, Infosys, ICICI Bank.
Choosing Between Portfolios
- When asked which portfolio has higher correlation, Portfolio A is identified as having higher correlation due to all banks being in the same sector.
- If Bank Nifty remains stagnant for an extended period, all stocks in Portfolio A may lose value simultaneously.
Risks of High Correlation
- Selecting Portfolio A can lead to significant losses if the market does not trend positively; all stocks could move sideways together.
- In contrast, Portfolio B offers diversification across sectors. If one sector stagnates (like banking), others (like oil or tech) may still perform well.
Importance of Diversification
- Maintaining a diversified portfolio with non-correlated assets helps mitigate risks associated with market stagnation or downturns.
- Traders should carefully select their portfolios to avoid concentrated risks that can lead to substantial losses despite correct technical analysis.
Conclusion on Technical Analysis and Portfolio Management
- Successful trading requires not only accurate technical indicators but also a well-thought-out portfolio strategy that avoids overexposure to correlated assets.
Understanding Market Trends and Diversification
The Importance of Diversification in Trading
- When markets trend downward, approximately 80% of stocks will also follow this trend. This highlights the risk of concentrating investments in a few stocks.
- Different asset classes (e.g., natural gas, gold, USD/INR, Nifty) often have no correlation with each other. Understanding these correlations is crucial for effective trading strategies.
- For long-term trading systems, maintaining diversification across various asset classes is essential to mitigate risks compared to concentrated investment strategies like those employed by Warren Buffett.
Correlation and Its Role in Trading Systems
- Correlation analysis is vital for developing efficient trading systems. It helps traders understand how different assets move relative to one another.
Mean Reversion Strategy Explained
- Mean reversion involves taking positions on two correlated stocks that diverge temporarily; for example, going short on ICICI Bank while going long on HDFC Bank when their prices deviate significantly.
- The analogy of a couple fighting illustrates mean reversion: just as they may reconcile after a disagreement, stock prices can revert to their historical relationship after temporary divergence.
Random Walk Theory and Its Application
- A drunk person walking randomly represents the unpredictable nature of stock movements. Similarly, two unrelated stocks can exhibit random walks but still maintain a mean-reverting relationship through their price ratio.
Cointegration as a Methodology
- Cointegration tests help identify whether the price ratio between two stocks (like ICICI Bank and HDFC Bank) exhibits mean-reverting behavior. This statistical method was developed by Dickey and Fuller.
- By analyzing the time series data of both stocks' prices and applying cointegration tests, traders can determine if their price relationship is stable over time.
This structured approach provides insights into market dynamics and emphasizes the importance of diversification and statistical methods in trading strategies.
Understanding Mean Reversion and Momentum in Trading
Mean Reversion Concepts
- The future is often mean reverting, implying that prices tend to return to their historical averages. This applies to risk-based arbitrage situations involving stocks like HDFC, ICICI Bank, Infosys, and TCS.
- Cointegration can be used as a test for mean reversion. Another method mentioned is the variance ratio test, which assesses whether time series data exhibit mean-reverting behavior.
- A variance ratio test result of less than one indicates a highly mean-reverting series, while a result greater than one suggests divergence. This information can guide trading strategies such as trend following.
- If a series shows strong mean reversion characteristics (variance ratio < 1), it may not be suitable for trend-following strategies due to higher risks of loss.
- Other tests for identifying mean reversion include the Unen-Lenberg test and Principal Component Analysis (PCA), which classifies stocks based on financial metrics like P/E ratios and dividend yields.
Statistical Tools in Trading
- PCA helps classify stocks into groups based on financial indicators. It allows traders to identify clusters of high or low valuation metrics among different stocks.
- Cluster analysis can further enhance stock classification by grouping similar investment opportunities based on PCA results.
Trading Strategy Considerations
- Trading strategies generally fall into two categories: momentum and mean reversion. Understanding these concepts is crucial for developing effective trading systems.
- In momentum trading, traders follow market trends; for example, entering long positions during channel breakouts aligns with this strategy.
- Conversely, buying at support levels when the market is declining exemplifies mean reversion since it goes against current market flow.
- Recognizing whether trades are momentum-based or mean-reverting is essential for strategy formulation; each approach has its own merits depending on market conditions.
- The discussion emphasizes that both momentum and mean reversion are valid trading styles akin to different batting techniques in cricket—each effective in its own right but requiring distinct approaches.
Understanding Trading Strategies: Momentum vs. Mean Reversion
The Approach of Tendulkar in Trading
- The speaker compares trading strategies to cricket, highlighting that a player like Tendulkar focuses on accumulating small runs consistently, akin to taking one run per ball.
- This method represents mean reversion trading, where the trader aims for steady gains rather than large profits from single trades.
Momentum Trading Explained
- In contrast, momentum traders (referred to as "seag") aim for significant gains from fewer successful trades, likening their strategy to hitting home runs.
- Many traders exit positions too early after achieving small profits (2%-5%), missing out on larger potential gains during trending market phases.
Market Dynamics and Profitability
- Markets are only trending 30% of the time; thus, if traders do not capitalize on these moments with substantial returns, they may struggle during range-bound periods.
- The speaker emphasizes the importance of aiming for larger moves (15%-25%) during trends to offset losses incurred during non-trending times.
Position Management and Risk Control
- Traders should add to winning positions instead of cutting them prematurely when prices move favorably; this can amplify overall returns significantly.
- A suggested risk management strategy includes setting tight stop-losses relative to target profits—e.g., a 2% stop-loss for a 15% profit target.
Success Rates in Different Trading Strategies
- Mean reversion strategies tend to have higher success rates (70%-80%) due to market behavior but yield smaller profits compared to momentum strategies.
- Momentum strategies typically have lower success rates (30%-40%), yet successful trades can generate much larger returns that outweigh losses from unsuccessful ones.
Real-world Application and Historical Context
- The speaker shares an example from currency trading in 2013 where a trend-following system generated significant profits despite subsequent range-bound conditions over the following year.
Understanding Opportunity in Statistics
Key Factors in Evaluating Opportunities
- The speaker emphasizes the importance of recognizing when an opportunity is right or wrong, highlighting that small losses are manageable compared to significant financial setbacks.
- A focus on statistical analysis is presented as crucial for making informed decisions regarding opportunities, suggesting a methodical approach to risk assessment.
- The discussion concludes with an invitation for questions, indicating a willingness to clarify any doubts and engage further on the topic.