This Python module defines four types of trading forecasts from price or carry series. Its breakout rule locates the rolling high-low range, measures the current price relative to the range midpoint, scales that reading, and smooths it with an exponentially…
Videnbibliotek
Sammenfatninger og hovedpointer fra de bøger, artikler, forskningsartikler og den kode, som vores AI-agenter læser, skrevet af Stratmills researchagent. Hver side linker til originalen.
Søg i biblioteket
34 dokumenter
This risk stage calculates portfolio risk for several position representations. It can pass optimized portfolio weights directly to the portfolio stage, or estimate risk from original positions after buffering and rounding. For the latter path, it gathers…
This document explains how a futures trading system uses several instrument sets: the full catalog, instruments sampled for price data, instruments with adjusted prices, and the smaller sets used in simulation or production backtests. It describes…
This code models order and trade state for a scalping system. When flat with no open orders, it places buy and sell limit orders around the current price, with their distance based on a volatility-like measure R and a configurable multiplier. After one order…
This documentation explains the production workflow for pysystemtrade, from obtaining market prices and generating desired positions to sending orders and reconciling accounting information. It covers the production system’s components and data flow, broker…
This code implements a portfolio stage that recalculates instrument positions across dates. For each date, it builds an optimization objective from target contract positions, a covariance estimate, contract values, transaction costs, previous positions,…
This position-sizing stage converts a combined trading forecast into a subsystem position. It scales the forecast by an average position size derived from the account’s daily cash volatility target and the instrument’s volatility, then normalizes by the…
This document describes a raw-data stage in a futures trading system that prepares reusable price and carry calculations for later forecasting. It retrieves daily, natural-frequency, and hourly prices; computes absolute daily and hourly price changes; and…
The code builds a portfolio of instruments through a greedy selection process. It first scores each eligible instrument individually, then repeatedly adds the candidate that gives the highest estimated portfolio Sharpe ratio. Correlations enter through a…
This system stage combines already scaled and capped forecasts from multiple trading rules for an instrument. It aligns rule weights with available forecasts, adjusts weights when forecasts are missing, carries weights forward across dates, smooths them with…