The article compares Windows, macOS, and Ubuntu/Linux as environments for quantitative trading research and deployment. It frames the choice around the user's research workload, preferred tools, need for automation, and comfort with command-line work.…
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
104 documents
The document explains the Position component in an early event-driven trading system. A position records buys and sells, average prices, commissions, cost basis, net exposure, and realized and unrealized profit and loss. The broader design separates this…
The article develops an object-oriented framework for generating synthetic correlation matrices as an initial component of a tool for creating correlated financial time series. An abstract base class defines a common generation interface so different models…
The article introduces serial correlation, also called autocorrelation, as dependence between observations at different times. It reviews expectation, variance, covariance, and correlation, then explains why correlation is a normalized measure of linear…
The article explains an event-driven backtesting design that separates a lean Portfolio class from a PortfolioHandler. The Portfolio stores cash and positions, updates position values after transactions, and calculates portfolio cash, equity, and realized…
This June 2020 update reports several releases of the QSTrader backtesting engine. Its main technical change was an overhaul of portfolio, position, transaction, and simulated broker components to support short selling. The platform moved from long-only…
The diary entry describes an early event-driven forex system and its roadmap toward more realistic trading and backtesting. It identifies components already present, including price streaming, signal generation, order execution, local portfolio replication,…
The document explains why no single programming language is best for every algorithmic trading system. Language choice follows system requirements: research and backtesting, signal generation, portfolio construction, risk management, and order execution have…
This article describes a mean-reversion strategy trading the spread between TLT, a long-duration Treasury ETF, and IEI, an intermediate-duration Treasury ETF. A recursive Kalman filter estimates a time-varying linear relationship between the pair, along with…
This article describes a directional S&P 500 strategy that refits a return model on a rolling window, forecasts the next day, and takes a long or short position according to the forecast sign. For each window, it selects an ARMA specification by Akaike…
This article explains how to use an annualised rolling Sharpe ratio to monitor whether a trading strategy’s risk-adjusted performance is weakening. It calculates the ratio from excess returns over a trailing year of observations, scaling the…
This article describes how QSTrader represents brokerage charges in a backtesting system through a FeeModel class hierarchy. An abstract base interface separates commission, tax, and total-cost calculations, allowing implementations to account for asset…
This tutorial presents a visual method for checking historical market data coverage. It retrieves end-of-day equity prices from a vendor, converts the response into tabular data, and aligns each security’s observations to a complete exchange trading…
This tutorial describes a Mac setup for Python-based market research, recommending the Anaconda distribution for its data science libraries, Conda package manager, and support for isolated environments. It explains how to install the distribution, check that…
This tutorial explains how to configure SLURM on a Raspberry Pi cluster so researchers can submit parallel workloads from a login node. It outlines the roles of the control node and computational nodes, shared configuration through NFS, resource allocation…
This article presents a simplified interface for configuring a forex backtest and extending it to multiple currency pairs. A Backtest object is assembled from price data, strategy, portfolio, and simulated execution components, with strategy settings passed…
The article explains the Sharpe ratio as a way to compare a strategy’s average excess return with the variability of those returns. It describes annualizing the measure according to the return sampling interval, using a suitable benchmark, and treating…
This article compares retail algorithmic traders with institutional quantitative funds across capacity, crowding, market impact, leverage, liquidity, information access, risk oversight, investor relations, and technology. It argues that smaller accounts can…
This article describes using a Gaussian Hidden Markov Model (HMM) as a risk filter for a simple S&P 500 trend-following strategy. The model is trained on historical SPY adjusted returns to identify latent volatility regimes. A QSTrader risk manager then…
This brief update explains why a planned trading-strategy book shifted toward using a more realistic backtesting framework. The author found that transaction costs could materially change the apparent profitability of strategies assessed with simpler…
The article outlines a proposed end-to-end system for researching, backtesting, and operating automated trades, initially focused on US equities and ETFs through a brokerage interface. Its architecture separates data ingestion and validation, price and…
The article describes a daily directional forecasting strategy for the S&P 500, with trades placed in SPY. A quadratic discriminant analysis model uses the prior two daily index returns to predict whether the market will rise or fall. The strategy takes a…
The article lays out a progression for learning financial econometrics, starting with probability and statistics before moving through introductory econometrics, financial data analysis, specialist time-series texts, and current research. It highlights…
The article describes updates to an event-driven forex backtesting system: generating format-compatible simulated tick files, processing daily files sequentially, supporting multiple currency pairs, and plotting equity, returns, and drawdowns. Loading one…