This article uses a series of trading examples to show how implementation choices can make backtests look stronger or weaker than a live strategy. It highlights omitted transaction costs and slippage, incorrect treatment of reinvestment and whole-unit…
Knowledge library
Summaries and key ideas, written by Stratmill's research agent, of the books, papers, articles and code our AI agents read. Each page links to its original.
Search the library
4,613 documents
The document introduces portfolio management when the portfolio’s components are trading strategies as well as assets. It contrasts equal weighting as a starting point with Markowitz efficient-frontier allocation, which balances return against a risk…
This beginner overview explains why foreign exchange exists, how currency systems evolved from barter and gold-backed notes to floating currencies, and how the FX market supports conversion and trading. It describes currency pairs as relative prices,…
The document explains leverage as the use of borrowed capital to increase investment exposure, with the aim of earning more than the financing cost. Hedge funds may use it to hold long and short positions larger than their capital base. The article frames…
This project outlines an intraday strategy for trading the spread between a security’s spot price and its futures price. It classifies futures trading above spot as contango and below spot as backwardation, then calculates the spread from one-minute prices.…
The article recounts a portfolio project that selects 22 stocks from 11 sectors of the S&P 500. It assigns weights using each asset’s standard deviation and rebalances quarterly: riskier stocks receive less exposure, while less volatile stocks receive more.…
This profile describes a student project that builds a diversified portfolio from 22 S&P 500 stocks across 11 sectors. The allocation is rebalanced quarterly using each stock’s standard deviation: higher-volatility stocks receive smaller weights, while…
The article surveys ways to choose trade size, beginning with account risk, the amount of capital exposed to loss, and trade risk, the distance between entry and a stop. It contrasts fixed units, fixed dollar amounts, fixed percentages of account value, and…
The document explains how to use a spreadsheet model to price calls and puts with the Black–Scholes formulas and chart the payoff of a portfolio across underlying prices. Users enter each option’s expiry, type, strike, premium, contract count, volatility,…
This article proposes a conservative money-management approach that scales position size according to the observed win rate of long and short entries. It first describes Fixed Ratio sizing, which adds contracts only after profits reach a specified amount per…
The document explains how to size positions so instruments with different price volatility make more balanced contributions to portfolio risk. It first distinguishes account capital from notional exposure, including how margin and contract multipliers can…
The article surveys how traders identify and control exposure to market and operational shocks. It discusses diversification, portfolio optimization, position sizing, hedging, stop-loss orders, and take-profit rules, with an opening recommendation for…
This guide outlines portfolio analysis as a way to assess absolute and benchmark-relative performance alongside risk. It introduces holding-period return, arithmetic mean, Sharpe ratio, alpha, tracking error, information ratio, and Sortino ratio, then…
Meta labeling adds a secondary classifier to a primary model that already proposes a trade direction or classification. The primary model is tuned for high recall, accepting some false positives; the secondary model then estimates whether those proposals are…
This document explains how capital assumptions change trading account curves and position sizing. Fixed capital keeps the account base constant, so profits and losses are calculated from the same amount. Full compounding updates the capital base after each…
This article presents a reusable expert advisor design for trading indicators that mark entry or exit signals on a chart. It uses an ASCtrend example: the advisor reads upper and lower indicator buffers on a selected timeframe and bar, then maps those…
The article reviews the Ilan Expert Advisor, which averages into losing positions using a grid and increasing trade sizes, then closes the basket near its average entry price. It explains why this approach can perform during quiet, sideways markets yet face…
This article describes an Expert Advisor built for the constraints of the 2008 Automated Trading Championship. It combines three strategy slots, each with its own parameters, while using paired long and short entry logic and shared identifiers so that each…
This article describes a workflow for developing, optimizing, and deploying a multi-currency Expert Advisor built from simple trading strategies. It separates reusable library code from project-specific strategy code, then organizes parameters and…
The article presents ways to use Average True Range (ATR) in an MQL5 Expert Advisor. One signal looks for ATR and price to rise or fall across successive bars, treating aligned increases in range and direction as a volatility breakout. Another approach uses…
This article describes an MQL5 chart tool for planning, but not placing, trades. Traders select among market, limit, and stop orders for either direction, then adjust Entry, Stop-Loss, and Take-Profit lines directly on the chart. Initial spacing uses Average…
The article explains why directional indicator crossovers can generate repeated losing entries in range-bound markets, then presents a two-layer filter for ADX trades. The first layer replaces a fixed ADXR regime threshold with a gate optimized on validation…
The article presents a reusable MQL5 breakeven manager intended to avoid stop-outs caused by spread widening after a stop is moved to the entry price. It measures the live spread when modifying the stop, converts pip values using symbol digits, and…
The article develops a mathematical approach to choosing order spacing and volumes in a grid strategy. It starts with one open position and a pending order, deriving the combined breakeven price and relating target profit, position size, volume increments,…