The document discusses reward design for reinforcement learning applied to foreign exchange hedging. A typical objective combines portfolio gains with penalties for risk, such as variation in portfolio value, and for trading costs associated with changes in…
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
9,660 documents
The document asks who drives the accumulation and distribution process associated with Richard Wyckoff, and whether it is led by market makers, insiders, or other large traders. It describes a proposed mechanism in which a large participant sells to trigger…
The discussion examines whether a displayed bid at or below a stop price can trigger a stop order. One reply says a trade at the trigger level is generally required, rather than merely submitting a low bid. It gives a hypothetical sequence in which a market…
This note describes the gap between theoretical online portfolio selection (OLPS) models and live implementation. It points to assumptions often used in research, such as no transaction fees or market impact, ample liquidity, and the ability to trade…
This note examines how a buy limit order priced above a sell limit order may execute when both reach an empty book. It explains that the matching outcome depends on event sequencing at the venue and on the national best bid and offer (NBBO). In the example,…
The discussion considers back-testing a portfolio of individual stocks intended to track an equity index or ETF. It emphasizes that matching constituent trades alone is insufficient: a faithful simulation must reproduce the index’s rules, rebalance timing,…
Time and sales feeds can include prices far from the displayed best bid or offer. Such prints may reflect special trade conditions, including out-of-sequence trades or crosses, rather than ordinary executions that should immediately update an algorithm’s P&L…
The document explains a dealing practice in which a principal rejects compensation from a broker and insists that a transaction be completed with the original counterparty at the originally agreed price. The example describes a buyer and seller whose initial…
The document clarifies how tick imbalance bars are formed from transaction data. Each tick receives a direction of plus or minus one based on the change from the prior trade price; unchanged prices inherit the previous direction. The running sum of these…
The document raises a practical question about applying triangular arbitrage to CFDs. It describes a supposed mispricing across EUR/USD, USD/GBP, and GBP/EUR, then asks how to account for opening three long positions, keeping them open, and closing them into…
This discussion concerns the timestamps attached to historical intraday equity data from Yahoo’s chart endpoint. The sample rows contain Unix epoch values, but converting them appears to produce times offset by varying seconds from the expected minute…
The document considers whether a noisy Ornstein–Uhlenbeck process with a moving reference band and a cooldown period has a financial interpretation. The band is reset when the process exits it, while a dead period prevents another update for a fixed time.…
The document explains two order status messages that indicate trading has ended for an order. An expired status can apply when a Good Till Date order reaches its stated expiry or when a Good Till Cancel order reaches a broker’s maximum age. That age can vary…
The document concerns imbalance bars and run bars, sampling methods discussed in Advances in Financial Machine Learning. The author is implementing them and asks for further literature, explaining that the material consulted so far emphasizes volume…
The document discusses whether a stock backtest can assume execution at daily opening and closing prices. It describes market-on-open and market-on-close orders as ways to target auction prices, while noting that traders must submit orders before the final…
The document addresses how to represent short-sale constraints in a backtest. Its proposed control is to include a borrowing cost for short positions, since live shorting generally requires shares to be borrowed through a broker. The cost can be included in…
The document compares database options for storing large financial tick datasets and aggregating them into open, high, low, and close bars. It reports an initial test in which InfluxDB was slower than MySQL for one-minute bar creation on a dataset of around…
The document asks how to compare long-only commodity futures roll strategies using historical contracts and ratio back-adjusted price series. The questioner adjusts earlier prices at each roll, then estimates returns from changes in adjusted prices while…
The document evaluates a simple intraday rule: buy instruments at the open and sell when price rises by one tick. It explains that the rule is incomplete unless it specifies how to handle positions that never reach the target, including whether to hold them,…
The document explains how a repo can fund a bond position and addresses whether the bond purchase and repo must be simultaneous or use the same counterparty. It describes a repo as collateralized lending: the borrower transfers collateral and agrees to…
The discussion considers whether applying stop-loss rules to a diversified stock portfolio can reduce losses during a market crisis. It contrasts a prolonged, relatively orderly decline with a sudden market break. In the former case, stops may trigger as…
The document asks how the size and frequency of bond trades affect subsequent bid–ask spreads. It frames the problem as a market microstructure question: trading can change liquidity, supply and demand, and sentiment, while the size of the effect is…
The document discusses how to design trading systems that use both historical market data and live feeds. One approach is to expose a common interface so strategies can reuse the same logic in both settings, reducing implementation differences. The accepted…
A beginner with programming and mathematics experience asks how to build a basic system for viewing market data and placing trades, with both simulated and live modes. The responses discuss broker access, demo and paper accounts, data costs, APIs, and…