This example shows how to calculate realized and unrealized profit and loss for a position over time from a trade journal and a sequence of valuation prices. The sample trade records an entry and exit, while hourly index closes provide prices for marking the…
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 note outlines ways to offset interest-rate exposure in a corporate bond using interest-rate futures or swaps. For a futures hedge, it recommends comparing the bond’s DV01 with the DV01 of the futures contract’s cheapest-to-deliver bond, using a contract…
The document describes a proposed daily long-only stock strategy with three percentage-based thresholds: an entry below the opening price, a stop loss below the entry, and a profit exit above the entry. Each threshold triggers when the observed price crosses…
The document asks how a return model with low R² could still support profitable decisions. It considers using predicted returns as expected returns for directional trades and Kelly sizing, then raises two concerns: predictions may cluster near zero, and…
The document addresses why ordinary percentage returns can become misleading when a long-short strategy’s recorded P&L or value crosses zero. It presents a net asset value approach: account for the value of long holdings, short-sale proceeds, and the current…
The document describes a challenge in training a model to classify stock news as a long, short, or no-bet opportunity while producing usable probabilities. Expected-value optimization can favor taking bets even when the estimated edge is tiny, because…
The document addresses how to size the swap and bond legs of a swap spread position. Its practical guidance is to match the legs by DV01 rather than by notional when the aim is to capture changes in the spread measured in basis points. Since instruments with…
The document explains how to hedge a fixed position in one asset using positions in two correlated hedging assets. Write the total portfolio variance as a function of the hedge holdings, then set its partial derivatives with respect to those holdings to…
The document presents several ways to estimate whether a price reaches a take-profit level before a stop-loss. One practical approach is Monte Carlo simulation, modeling price paths and applying both barriers to each path; its probability estimate depends…
The document asks how to reproduce the profit and loss of a USDCHF position with a stated size of 1,000 by trading USDEUR and EURCHF instead. It notes the triangular exchange-rate relationship: USDCHF is the product of USDEUR and EURCHF. The practical…
The question considers how to apply the Kelly criterion when capital is allocated across several trading rules that generate multiple trades. It asks whether to assign capital to each rule in advance, size each trade according to its changing outlook, or…
To update portfolio weights after a period of asset returns, multiply each starting weight by one plus that asset’s return. These products represent the assets’ ending values relative to the portfolio’s initial total value. Sum the products to find the…
The document frames a problem in which a trader chooses among candidate forward trades with known expected profits and maturity dates while operating under a finite capital limit. Since positions tie up capital until maturity, taking a profitable trade now…
This note addresses minimum-variance hedging for vanilla options in a binomial-model setting. When the hedging stock is the option's own underlying, the response recommends using the option position's net delta to determine the stock hedge. The binomial…
The document explains how to compare pip moves in two currency pairs that share the same base currency. It frames the calculation in terms of profit and loss: for a fixed base-currency trade size, the same pip move produces the same amount in the quote…
The document explains why a long-short portfolio’s return depends on the capital assigned to support its positions. With a short sale, the amount invested in securities does not directly represent the investor’s capital, so return calculations need a…
This note examines whether the optimal Kelly betting fraction should change when the number of rounds is finite. For independent bets with fixed win and loss sizes, it derives expected utility across repeated rounds under several utility functions. With…
The discussion addresses how an automated strategy can manage repeated order signals, including cases where execution algorithms generate many child orders. It recommends assigning each requested order a unique identifier and storing its parameters against…
The document considers writing a call against an existing long stock portfolio. The short call premium provides income and cushions some decline in the stock’s value, while the call obligation limits gains once the share price exceeds the strike. The…
The document raises two practical questions about turning cointegration relationships into a pairs trading portfolio. It compares a regression of log prices with one using raw prices, each expressed as a fitted relationship between assets and a residual…
The discussion compares buying in-the-money (ITM) and out-of-the-money (OTM) calls when anticipating a large upward stock move. ITM calls cost more because they include intrinsic value and generally have higher delta, so they can participate more if the…
The question concerns portfolio optimization over a large investment universe under long-only, equal-weight, and asset-count restrictions. It seeks both a maximum-Sharpe portfolio and a minimum-standard-deviation portfolio at a target return, and reports…
The document presents an approach to allocating partial fills across a sequence of stock trades when the final position must stay within a fixed share limit. The original formulation uses dynamic programming over possible positions and execution amounts, but…
The document explains how to choose a risky-asset weight for a one-period portfolio when the investor has power utility, a risk-free return, and a probability distribution for the risky asset’s return. The return distribution is represented by possible…