Knowledge Centre

Master algorithmic trading concepts, technical indicators, and strategies. From basic definitions to advanced analytics - everything you need to build successful trading models.

What is Algorithmic Trading?

In manual trading, you personally decide when to enter or exit a trade, often influenced by feelings like greed, fear, revenge trading, or overconfidence. This can lead to inconsistent decisions.

By contrast, automated trading uses a set of predefined rules or data‐driven models to execute trades without emotional bias. Under the umbrella of automated trading, you'll find:

Because computers don't feel fear or greed, automated approaches tend to be more systematic and less prone to impulsive decisions. Still, they require good design, testing, and risk management.

How to Use: Click on any topic below to expand and explore detailed explanations. Use Back to Topics at the bottom of any expanded section to return here.

Instrument (Select Instrument)

Simple Explanation

An Instrument is the asset you're looking at—like stocks, forex, or crypto:

  • Stocks are exchange-traded products. This means that anywhere in the world, a trader on the same exchange sees the same bid and ask prices at a given moment.
  • Forex is traded on an interbank network, so different brokers might show slightly different bid/ask quotes. There's no single exchange, but rather a network of banks and dealers.
  • Cryptocurrencies generally trade on multiple crypto exchanges. They can also have slightly different prices depending on which exchange is used.

All of these are 'Instruments' you can analyze or trade, but each market has its own nuances.

Back to Topics

Timeframe (Select Timeframe)

Simple Explanation

Timeframe indicates how often price data is grouped (e.g. 30m, 1h). For example, a 1h timeframe groups all trades within one hour into a single bar.

Here's how it ties together:

  • Tick Data: The rawest form, recording every single trade or quote.
  • Bid/Ask: Each tick has a bid (highest price buyers offer) and ask (lowest price sellers want).
  • OHLC: To make data easier to read, many traders condense a period's ticks into four key prices: Open (first tick), High (highest tick), Low (lowest tick), and Close (last tick). So for a 1h bar, we use all ticks in that hour to derive those four prices.

This summarized 'bar' data helps you see trends without getting lost in every tiny movement.

Academic Explanation

Academically, a timeframe is the aggregation interval for continuous market data. For each period, you identify:

  • Open: The price at the start of the interval.
  • High/Low: The max and min prices in that interval.
  • Close: The final price in that interval.

Each bar typically reflects aggregated bid/ask trades from underlying ticks.

Impact on the Algorithm/Model

Shorter timeframes capture rapid changes but may yield more signals (and possibly more noise). Longer timeframes smooth out fluctuations but react slower to sudden shifts.

Back to Topics

Lookback Period (Select Lookback Period)

Simple Explanation

The Lookback Period is how many days, weeks, or months of past data you include—like 1 month or 6 months. A shorter lookback may focus on recent trends, while a longer lookback can incorporate older market behavior.

Academic Explanation

In technical analysis, 'Lookback Period' is the size of the historical window. Some traders prefer short windows (emphasizing recent moves), others use longer windows for broader historical context.

Impact on the Algorithm/Model

Short lookbacks make the model respond quickly to new conditions. Longer lookbacks provide more data but may dilute recency.

Back to Topics

Indicator (Select Indicator)

Simple Explanation

Indicators help interpret price movements. They fall into categories:

  • Momentum Indicators (e.g., RSI, MACD, Stochastic, Momentum)
  • Volatility Indicators (e.g., Bollinger Bands, ATR)
  • Trend/Strength Indicators (e.g., SMA, EMA, ADX, CCI)

Here's a more detailed look:

  • RSI (Relative Strength Index): Measures the speed of price changes by comparing average gains/losses.
  • SMA (Simple Moving Average): Calculates an average of recent prices, smoothing out short‐term volatility.
  • EMA (Exponential Moving Average): Similar to SMA but gives more weight to recent data.
  • MACD (Moving Average Convergence/Divergence): Compares two EMAs to identify momentum shifts.
  • Stochastic Oscillator: Looks at where the price closes relative to its recent high/low range.
  • ADX (Average Directional Index): Measures trend strength.
  • ATR (Average True Range): Gauges average range of price movement (volatility).
  • Bollinger Bands: A middle average line with upper/lower bands that expand/contract with volatility.
  • CCI (Commodity Channel Index): Assesses how far price deviates from its average.
  • Momentum: The difference between current price and the price n bars ago.

Academic Explanation

Formulas for each:

RSI: RSI = 100 - (100 / (1 + RS)), where RS = Avg(Gain)/Avg(Loss)
SMA: Sum of prices over N periods / N
EMA: EMA_today = EMA_prev + α * (Price_today - EMA_prev), where α = 2/(N+1)
MACD: MACD = EMA_fast - EMA_slow, Signal = EMA of MACD line
Stochastic: %K = ((Close - LowestLow)/(HighestHigh - LowestLow)) * 100
ADX: ADX is a smoothed average of the 'Directional Movement Index' (DMI) values (+DI, -DI)
ATR: A rolling average of the True Range (max of High‐Low, High‐PreviousClose, Low‐PreviousClose)
Bollinger Bands: Middle Band = SMA(n), Upper = SMA(n) + k·StdDev, Lower = SMA(n) - k·StdDev
CCI: (TypicalPrice - SMA) / (0.015 × MeanDeviation), TypicalPrice = (High+Low+Close)/3
Momentum: Momentum = Price_today - Price_(today - n)

Excel Example (Bollinger Upper Band):

=AVERAGE(range) + 2*STDEV(range)

Python Example (RSI):

import talib as ta
rsi = ta.RSI(df['Close'], timeperiod=14)

Impact on the Algorithm/Model

Choosing an indicator focuses the model on momentum (fast moves), volatility (range of movement), or trend detection. This influences when trades are signaled and how responsive the model is to market swings.

Back to Topics

Indicator Parameters

Simple Explanation

Traders often start with industry-standard parameters (like RSI=14, MACD=12/26/9) because over the years, these values became accepted as good baselines. They strike a balance between smoothing data and reacting in a timely manner.

Academic Explanation

Typical defaults:

  • RSI: 14
  • MACD: Fast=12, Slow=26, Signal=9
  • Stochastic: K=14, D=3
  • Momentum: 10
  • Bollinger Bands: Length=20, Std Dev=2
  • ATR: 14
  • SMA: 20
  • EMA: 20
  • ADX: 14
  • CCI: 20

Shortening these periods increases sensitivity, lengthening them smooths out signals.

Impact on the Algorithm/Model

Parameter choices can radically alter the frequency and reliability of signals. Using standard values is a safe start; advanced traders often fine‐tune them for specific markets or timeframes.

Back to Topics

In Sample Split (%)

Simple Explanation

This sets how much historical data is used for model building (in-sample) vs. reserved for testing (out-of-sample). For example, 70% in-sample and 30% out-of-sample.

Academic Explanation

The main idea is to confirm that a model performing well on training data also performs decently on unseen data, reducing overfitting concerns.

Impact on the Algorithm/Model

A balanced split ensures you test your model in conditions it didn't train on. If the OOS performance collapses, it may be overfitted.

Back to Topics

Maximum Drawdown (%)

Simple Explanation

Drawdown is the drop from the highest account value to a subsequent low. Setting a max drawdown threshold limits how much you're willing to lose from a peak.

Academic Explanation

Drawdown is calculated as: (Peak - Trough)/Peak. A threshold ensures strategies exceeding this risk are avoided.

Impact on the Algorithm/Model

Any model that might cause a larger capital drop than your comfort zone is rejected, promoting capital preservation.

Back to Topics

Strategy Analytics (IS & OOS Backtest Results)

Simple Explanation

The app produces analytics for both In-Sample (IS) and Out-of-Sample (OOS) data to gauge model performance. Below is an example of how results might appear:

Direction of Trade: GO LONG IS Period: 21 days (0.06 years) Profit: 10.78% Annual Profit: 187.49% Maximum Drawdown: 7.64% Number of Trades: 61 Average Profit of Winning Trades: $101.1 Average Loss of Losing Trades: $-102.5 True Positives: 36 False Positives: 25

Interpretation:

  • Direction of Trade: The model took only long positions.
  • IS Period: The time range used to build/tune.
  • Profit & Annual Profit: Gains in total and on a yearly projection.
  • Max Drawdown: The worst drop from a peak.
  • Number of Trades: Frequency of signals.
  • Avg Profit/Loss: Typical outcome of winners vs. losers.
  • True vs. False Positives: Positive trades that actually won vs. those that lost.

Often, you'll see a chart of P&L as well.

Academic Explanation

Backtesting splits data into training (IS) and testing (OOS). By comparing them, you check if the strategy generalizes. Key metrics—like total/annualized returns, drawdown, and average win/loss—help assess performance quality.

Impact on the Algorithm/Model

If IS results are solid but OOS is poor, the model might be overfit. Consistency across both sets suggests more robust performance.

Back to Topics

Trade Setting Overview

Simple Explanation

In the report, you might see something like:

How long is 1 Period for this analysis: 30m Trade Duration (Periods): 2 Max Concurrent Trades: 2 Max Leverage Used: 2X

Explanation & Risks:

  • A 'Period' is 30 minutes, so each bar is half an hour.
  • Trade Duration (2 Periods) means each trade closes after 1 hour.
  • Max Concurrent Trades (2) allows up to two open trades at once.
  • Max Leverage (2X) doubles your exposure compared to your cash.

Be cautious with leverage: while it can amplify gains, it also magnifies losses. If the market moves against you, losses can exceed what they would be without leverage.

Impact on the Algorithm/Model

Short durations (fewer periods) = quicker trades, but more churn. Allowing multiple concurrent trades can spread opportunities, but also can raise overall risk. Using leverage (2X) requires careful risk management to avoid large drawdowns in volatile markets.

Back to Topics

Algorithm/Model Explained

Simple Explanation

Example:

(c) Entry Logic: GO LONG IF(AND(%chgStochasticD > -19.6935 AND %chgStochasticD < -7.138)) (d) Exit Logic: Close the trade after 30 minutes

Interpretation:

  1. The model goes Long if the percentage change of StochasticD is between those two numbers. This implies it's detecting a specific momentum condition.
  2. After 30 minutes (1 period if that's your setting), the trade automatically closes. This is a time-based exit rather than a stop-loss or profit-target exit.

Such logic is purely rule-based and removes emotion from decision-making.

Back to Topics

Overfitting & Identifying a Good Model

Simple Explanation

Financial data is noisy, full of random fluctuations. If you train a model too precisely on these quirks, it may do great on past data but fail on new data—this is overfitting.

For example, imagine you create rules that perfectly predict 100 trades from last year's data. Chances are, many of those 'perfect signals' just fit random luck in the historical set. When you apply it to this year's market, the rules no longer hold.

A good model focuses on persistent market patterns, not random noise, and it passes out-of-sample tests with stable results.

Academic Explanation

In quantitative finance, overfitting arises when your model's complexity or number of parameters is too high for the limited market data available, capturing noise instead of true market structure.

Example:

  • If you keep adding rules ('Only trade on rainy Tuesdays near full moon if RSI crosses 50!'), you might 'explain' the past perfectly but future performance collapses.
  • Cross-validation, walk-forward testing, or rolling OOS can help identify whether performance is consistent and truly predictive.
  • Sticking to simpler, well-understood signals typically reduces the risk of overfitting.

Impact on the Algorithm/Model

Overfitted strategies may show spectacular backtest returns but fail quickly in live conditions. Realistic forward testing and multiple OOS checks are crucial to confirm a model's robustness.

Back to Topics

Risk Management

Simple Explanation

This covers ways to protect yourself from excessive losses. Commonly:

  • Stop-losses to automatically exit losing trades.
  • Money management: sizing positions so a single loss won't cripple your account.
  • Diversification: spreading capital across different instruments or strategies.
  • Watching out for economic events with high volatility.

If you over-leverage and markets swing against you, losses can escalate. Good risk management helps you survive rough periods and preserve capital.

Academic Explanation

Key elements:

  1. Stop-Loss Orders: Pre-set exit points.
  2. Position Sizing (e.g., fixed fraction, Kelly Criterion).
  3. Diversification to reduce correlation risk.
  4. Volatility Awareness to adjust risk around major announcements.

Combined, these limit drawdowns and ensure longevity, even amid random market noise.

Impact on the Algorithm/Model

Without robust risk controls, even profitable algorithms can face ruin if they hit a bad streak or a sudden high-volatility event. Effective risk management is essential for consistent returns.

Back to Topics