CollegeStreet.tech Hackathon

2nd November — Join the challenge

We're excited to host our student-run hackathon focused on financial data, AI-driven trading strategies, and web tooling. Teams will build projects in 12 hours, get mentorship from industry and academic experts, and compete for prizes.

↓ Scroll down to view the problem statement ↓

Hackathon Live
Bring your ideas to life

Problem Statement

Moving Averages & Moving Average Crossover

1. Introduction to Moving Averages

A moving average (MA) is a trend-following indicator used in technical analysis to smooth out price data by creating a constantly updated average price. It helps traders identify the direction of the market trend—whether upward, downward, or sideways—by filtering out short-term price fluctuations or “noise.”

The basic principle:

Moving Average = (Sum of Closing Prices over Period) / (Number of Periods)

2. Types of Moving Averages

Participants have the freedom to use any one of the above 3 MAs.

3. Purpose and Use in Stock Charts

Moving averages are usually plotted over price charts and used to:

  1. Identify market trends (rising MA for uptrend, falling MA for downtrend)
  2. Determine support and resistance levels
  3. Generate buy or sell signals when combined with price action or other averages
  4. Smooth out volatility for clearer visualization of underlying price direction

On any asset price chart one can draw moving average of any timeframe/period. The most commonly used moving averages are of 9 days, 10 days, 12 days, 20 days, 26 days, 50 days, 100 days and 200 days. Shorter the time frame more agile is the MA curve and longer the time frame smoother is the MA curve.

4. Moving Average Crossover Concept

A moving average crossover occurs when two moving averages of different timeframes intersect, signaling potential trend reversals or confirmations. A faster (shorter period) moving average reacts quickly to price changes, while a slower (longer period) moving average changes direction more gradually and represents the broader trend.

When the faster MA crosses the slower MA, traders interpret it as a signal:

Examples: The 50-day MA crossing above the 200-day MA forms a Golden Cross. The 50-day MA crossing below the 200-day MA forms a Death Cross.

5. Types of Moving Average Crossover Strategies

6. Practical Application in Technical Analysis

Short-term traders (e.g., intraday or swing traders) might use 5-day, 10-day, or 20-day MAs for quick signals. Long-term investors often look at 50-day, 100-day, or 200-day MAs for broader trend identification.

A common setup:

If a 10-day EMA crosses above a 50-day EMA → Buy signal. If it crosses below → Sell or exit signal.

7. Outline of the Competition

The participant(s) is expected to write his/her own code to identify an MA crossover and depending on bullish or bearish crossover the code should generate an entry signal and the participant should devise his/her exit strategy (i.e. % profit or % loss or number of days after entry). The developed code will use last 3 month’s historical stock data on NSE 500 stocks to backtest the code/strategy. Participants are free to use any NSE stock API. Some APIs may be paid. Since we are talking about MAs of days time frame and not minute or hour time frame, the participants have to use end of the day (i.e. closing price at 3:30 pm) closing price. UPSTOX trading platform provides free API in such case. Opening UPSTOX account is free. However, this should be taken as a piece of information and this is in no way a promotion of UPSTOX brokerage.

Some YouTube resources:

The backtest result of a strategy should be tabulated in the following format (participants should include):