The article compares ways to organize a trading business: managed accounts, commodity trading advisory firms, proprietary funds, hedge funds, and family offices. Managed accounts are presented as a lower-cost way to manage separate client accounts and build…
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
67 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 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 article introduces statistical learning as the task of estimating a relationship between response variables and predictor features. A quantitative finance example frames index values as responses and company fundamentals as possible predictors. It…
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 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 article defines Value at Risk as a loss threshold for a portfolio over a specified time horizon and confidence level. It explains that VaR can be applied to an individual strategy or a larger portfolio, with the horizon chosen to reflect the time needed…
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 introduction to electronic market microstructure explains how market orders and limit orders interact. Limit orders specify a price and quantity, rest in the limit order book, may fill partially, and can be cancelled. Market orders seek immediate…
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…
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…
This article explains the pricing developer’s role in a systematic hedge fund and how market data is prepared for research and trading. It divides the trading pipeline into pricing and feeds, signal research, and execution, then focuses on building the…
This article introduces conditional heteroskedasticity: periods of high return variance can cluster, even when a return series’ ordinary correlogram resembles white noise. ARCH models represent changing variance using past squared shocks, while GARCH models…
This update describes the progress and planned design of QSTrader, a modular engine for systematic trading simulations. Its working components include broker, exchange, alpha, and portfolio construction models coordinated by an event driven simulation…
This tutorial shows how to retrieve daily price data from AlphaVantage, convert nested JSON or CSV responses into Pandas DataFrames, and prepare several ETFs for charting. It explains that API responses may default to a limited history, describes sorting and…
The article describes a Python workflow for retrieving historical intraday US equity data from an IQFeed service. It assumes the local IQLink server is running, then connects to its socket, sends a historical-data request specifying a ticker, bar interval,…
The article introduces bootstrap resampling and three decision tree ensemble methods. Bagging fits trees to separate samples drawn with replacement and averages their predictions, aiming to reduce the high variance of individual trees. Random forests add…
The article explains how ARMA(p,q) combines autoregressive effects from past observations with moving-average effects from past shocks. It introduces BIC as a more severe penalty for model complexity than AIC, and the Ljung–Box test as a check of residual…
The document explains how cointegration can identify a mean reverting relationship between non-stationary asset price series. A linear combination of two series that share a stochastic trend may be stationary; deviations of that combination from its mean can…
The article explains how to distribute a US sector ETF momentum strategy’s parameter sweep across a Raspberry Pi cluster managed with SLURM. It varies momentum lookback windows from 21 to 252 business days and the number of holdings from one to eight,…
The document explains QSTrader’s basic asset class hierarchy for representing instruments in a backtesting system. A generic base class provides a place for future shared behavior, while the described subclasses represent cash and equities. Cash stores its…
This first-person account describes a typical day in a quantitative developer role at a small trading fund. Work spans monitoring overnight data jobs, diagnosing API or data failures, maintaining tests and deployments, building automated data ingestion, and…