This document contains daily open, high, low, close, and volume observations for Bitcoin priced in USDT during 2020. The rows are timestamped at 08:00 and show the market's changing price and trading volume through the year. The visible records include sharp…
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
3,101 documents
This introductory explanation presents functions as reusable blocks of code. It covers defining a function with def, choosing a descriptive name, calling the function, documenting it with a docstring, and returning a value. A market-data example retrieves…
This document explains how to configure a trading application to store historical data and connect to an exchange. It compares SQLite, MongoDB, and MySQL settings, describes database fields such as driver, database name, host, port, and authentication…
This example implements a spot grid that keeps one buy and one sell order working around the latest top of book. At timed intervals, when neither side has an outstanding order, it places orders offset from the best bid and ask by half the configured grid…
This document describes a spot trading interface that retrieves balances and market data, submits buy and sell orders, and reports order status. Its execution workflow checks an order after submission and can cancel and replace an unfilled or partially…
The document introduces Python dictionaries through a sample exchange response containing a trading symbol and its latest price. It explains key-value storage, unique keys, mutable contents, and how dictionaries differ from indexed sequences. The example…
The document explains a market-neutral approach to perpetual futures funding. When funding is positive, it proposes buying spot and shorting an equal amount of the perpetual contract; when funding is negative, it proposes borrowing and selling spot while…
The document shows how a graphical trading application is assembled from an event engine, a main engine, exchange gateways, and several trading applications. The configured components include strategy execution, backtesting, data management and recording,…
Liquidity depends on the asset class and on how participants access each market. The document compares spot, futures, options, and swaps across currencies, single stocks, equity indices, commodities, and fixed income. It offers a practical framework: there…
The document raises a market-structure question: when a futures exchange imposes daily price limits but the underlying spot market does not, can the two prices temporarily diverge? It asks whether that divergence would force a sharp futures adjustment when…
The document distinguishes precious metals from foreign exchange when describing spot-price dynamics under a risk-neutral measure. In FX, the domestic and foreign interest rates reflect the ability to invest in short-term sovereign instruments in each…
The discussion asks whether Bitcoin has a quantifiable fair value and how mispricing might be recognized. The answers describe its traded price as an outcome of supply and demand once the market is sufficiently liquid, while emphasizing that speculation is…
The document asks whether reliable foreign-exchange prices are available during the weekend, when conventional spot markets are largely closed. The response cautions that quotes visible during quiet hours can be stale, making them poor evidence of current…
The document describes the gap risk a broker can face when it immediately hedges a customer's leveraged spot FX trade with a liquidity provider. If the market jumps through a liquidation level, the customer may incur a negative balance that cannot be…
The document examines a hypothetical collapse in USDT’s value and considers its consequences for Bitcoin holders and market pricing. It distinguishes direct self-custody, exchange balances, and exposure through financial intermediaries. Self-custody does not…
The document explains what a currency pair position represents, why a newly opened trade can show a loss, and why three pair trades may not automatically leave an account flat. In a spot-market interpretation, buying a pair means acquiring the base currency…
The document frames a cash-and-carry trade in a contango market: buy the underlying asset and sell a futures contract. It compares a nearer contract with a higher annualized yield against a later contract that may offer a larger absolute basis. The trader…
The document explains how to calculate account performance when deposits, withdrawals, and currency conversions can occur at any time. It recommends treating the account like a fund: track the number of units outstanding and the net asset value per unit in a…
The document discusses how to construct a daily carry return index for a currency pair and compare it with a vendor index. The proposed approach combines the spot return with the interest earned on the funded currency and the interest cost on the borrowed…
This script describes a long-only grid for TWT priced in USDT. It places a series of levels between configurable high and low bounds, using either geometric spacing, which maintains proportional gaps, or arithmetic spacing, which maintains equal price gaps.…
This strategy measures the difference between weighted Bitcoin futures and spot prices from Binance and OKX, then standardizes that spread as a rolling z-score. It calculates the measure on three configurable timeframes, with example defaults of 60, 120, and…
This TON strategy divides a fixed price range into evenly spaced arithmetic or percentage-spaced geometric levels. When the close crosses down through a level, it opens a long position sized from an allocated investment per grid slot. When price later…
This long-only daily spot strategy makes confirmed market structure a prerequisite for entries. It tracks swing highs and lows, defines structural trends from higher highs and higher lows or lower highs and lower lows, and detects breaks of the latest…
This strategy models a static grid for UNI/USDT spot trading. It divides a fixed price band into geometric or arithmetic levels and buys when a bar closes down through an unfilled level. A position is closed when price crosses the next level upward. The…