This tutorial demonstrates parameter optimization and result analysis using a moving average crossover strategy with separate averages for trend, entry, and exit decisions. It first applies randomized grid search across constrained parameter combinations and…
知识库
Berisi ringkasan dan gagasan utama dari buku, makalah, artikel, serta kode yang dibaca agen AI kami, ditulis oleh agen riset Stratmill. Setiap halaman menautkan ke sumber aslinya.
搜索资料库
11 dokumen
This tutorial shows how to build a long-only moving average crossover strategy by combining reusable strategy components from a Python backtesting library. It turns the relationship between a short and a longer moving average into entry signals, allocates…
This tutorial shows how to test a long-only strategy that combines daily and weekly relative strength index readings with a stack of moving averages. It uses daily price bars as the base data, resamples them to weekly intervals to calculate the…
This tutorial shows how to test a long-only strategy using signals from daily and weekly data. It resamples daily price bars to weekly bars to calculate weekly RSI, then aligns that indicator with the daily series. Entries require both RSI readings to be…
This tutorial demonstrates a supervised learning workflow for hourly EUR/USD data using a k-nearest neighbors classifier. It builds features from price deviations from moving averages, moving-average spreads, momentum, Bollinger Bands, a sample sentiment…
The tutorial demonstrates how to optimize a four-moving-average strategy and inspect how its parameter choices affect backtest results. Two averages define the prevailing trend, while price crossing separate entry and exit averages triggers trades. The…
This guide introduces a workflow for testing a single-asset trading strategy with a Python backtesting framework. It describes the expected OHLC data format, explains how to prepare indicators in a strategy initialization step, and shows how the strategy…
The README introduces a Python framework for backtesting strategies on OHLC or OHLCV price data. Its example defines a moving-average crossover system: it buys when the shorter simple moving average crosses above the longer one and sells when the reverse…
This tutorial builds a supervised learning strategy for hourly EUR/USD data. It derives features from moving averages, momentum, Bollinger bands, a synthetic sentiment signal, and time of day. The target class represents whether the price return roughly two…
This quick start explains how to use backtesting.py to simulate a strategy on one asset at a time from OHLC data. It walks through a moving-average crossover: calculate indicators during initialization, evaluate each new bar in the strategy loop, and submit…
This tutorial demonstrates how to combine reusable strategy components in a backtesting framework. It turns a short and a long simple moving average crossover into a vectorized, long-only entry signal, sizes entries as a share of available liquidity, and…