<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[AlgoSolo: Strategy]]></title><description><![CDATA[From market ideas to testable trading systems.]]></description><link>https://www.algosolo.com/s/strategy</link><image><url>https://substackcdn.com/image/fetch/$s_!Khz1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079f6f72-8d75-4366-835d-7ab651cb91f0_1280x1280.png</url><title>AlgoSolo: Strategy</title><link>https://www.algosolo.com/s/strategy</link></image><generator>Substack</generator><lastBuildDate>Tue, 14 Jul 2026 03:57:35 GMT</lastBuildDate><atom:link href="https://www.algosolo.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[AlgoSolo]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[algosolo@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[algosolo@substack.com]]></itunes:email><itunes:name><![CDATA[AlgoSolo]]></itunes:name></itunes:owner><itunes:author><![CDATA[AlgoSolo]]></itunes:author><googleplay:owner><![CDATA[algosolo@substack.com]]></googleplay:owner><googleplay:email><![CDATA[algosolo@substack.com]]></googleplay:email><googleplay:author><![CDATA[AlgoSolo]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[From Trading Idea to Testable Rules]]></title><description><![CDATA[A market observation becomes a strategy only when every important decision can be stated clearly enough to test, reproduce, and challenge.]]></description><link>https://www.algosolo.com/p/from-trading-idea-to-testable-rules</link><guid isPermaLink="false">https://www.algosolo.com/p/from-trading-idea-to-testable-rules</guid><dc:creator><![CDATA[AlgoSolo]]></dc:creator><pubDate>Mon, 13 Jul 2026 20:07:25 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Khz1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079f6f72-8d75-4366-835d-7ab651cb91f0_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most trading strategies begin as an observation.</p><p>A trader notices that markets sometimes continue moving after breaking above a recent high. Another sees that sharp declines are often followed by partial recoveries. Someone else observes that a market behaves differently when volatility is rising.</p><p>These observations may be useful.</p><p>But they are not yet strategies.</p><p>Consider the statement:</p><blockquote><p>Markets often continue rising after a strong breakout.</p></blockquote><p>This is a trading idea. It suggests that momentum may persist.</p><p>It does not tell us:</p><ul><li><p>What counts as a breakout</p></li><li><p>What counts as strong</p></li><li><p>When the position should be opened</p></li><li><p>Which markets should be traded</p></li><li><p>How much should be risked</p></li><li><p>When the position should be closed</p></li><li><p>What costs should be included</p></li><li><p>How the idea should be evaluated</p></li></ul><p>Until these choices are made explicitly, the idea cannot be tested consistently.</p><p>The purpose of strategy design is to transform a broad market observation into a complete set of rules.</p><blockquote><p><strong>Observation &#8594; hypothesis &#8594; rules &#8594; test &#8594; interpretation</strong></p></blockquote><p>This article explains that process.</p><h2>Begin with the market behaviour</h2><p>A strategy should start with an idea about market behaviour, not with a collection of indicators.</p><p>The starting point might be:</p><ul><li><p>Trends tend to persist</p></li><li><p>Extreme short-term moves tend to reverse</p></li><li><p>Quiet markets are often followed by large moves</p></li><li><p>Strong markets tend to remain stronger than weak markets</p></li><li><p>Prices react differently during certain sessions</p></li><li><p>Volatility tends to cluster</p></li><li><p>Markets behave differently above and below long-term trend levels</p></li></ul><p>The idea does not have to be original.</p><p>Many successful trading strategies are based on behaviours that have been studied for decades. What matters is whether the idea can be expressed clearly and tested honestly.</p><p>A useful market idea should answer:</p><blockquote><p>What behaviour am I trying to capture?</p></blockquote><p>For example:</p><blockquote><p>I want to test whether a market that closes above its recent trading range is more likely to continue upward than immediately reverse.</p></blockquote><p>This is much more useful than:</p><blockquote><p>I want to build a profitable breakout strategy.</p></blockquote><p>The first statement describes a behaviour. The second describes a desired result.</p><p>Research should begin with the behaviour.</p><h2>Turn the observation into a hypothesis</h2><p>A hypothesis is a specific claim that can be tested.</p><p>Suppose the observation is:</p><blockquote><p>Markets sometimes trend after reaching a new high.</p></blockquote><p>A possible hypothesis is:</p><blockquote><p>When a liquid market closes above the highest close of the previous 20 bars, its return over the following 10 bars is positive more often than normal.</p></blockquote><p>This hypothesis identifies:</p><ul><li><p>The event: a close above the previous 20-bar high</p></li><li><p>The market type: liquid instruments</p></li><li><p>The observation period: the following 10 bars</p></li><li><p>The expected result: stronger-than-normal positive returns</p></li></ul><p>The hypothesis may turn out to be false.</p><p>That is acceptable.</p><p>The goal of research is not to protect the original idea. It is to determine whether the evidence supports it.</p><h2>Separate the hypothesis from the strategy</h2><p>A hypothesis asks whether a market behaviour exists.</p><p>A strategy defines how that behaviour might be traded.</p><p>These are related, but they are not identical.</p><p>For example, the hypothesis might be:</p><blockquote><p>Returns following a 20-bar breakout are positively biased.</p></blockquote><p>The strategy might then say:</p><blockquote><p>Enter long after a 20-bar breakout, use an ATR-based stop, and exit after a 10-bar low.</p></blockquote><p>The stop and exit do not test whether breakout momentum exists. They determine how the potential behaviour is converted into a trade.</p><p>This distinction matters because a poor strategy design can hide a valid market effect.</p><p>A breakout may have positive average forward returns, but a very tight stop could cause many trades to exit before the move develops. The researcher might incorrectly conclude that breakouts do not work.</p><p>The reverse can also happen. A complicated exit may create an attractive historical result even when the original market hypothesis is weak.</p><p>Test the behaviour first. Then design the trading rules.</p><h2>Define the market universe</h2><p>A strategy cannot be tested without deciding what it trades.</p><p>&#8220;Stocks,&#8221; &#8220;crypto,&#8221; and &#8220;futures&#8221; are too broad.</p><p>A market universe should specify the instruments that qualify.</p><p>Examples include:</p><ul><li><p>Current members of a major equity index</p></li><li><p>The 100 most liquid US stocks</p></li><li><p>Major currency pairs</p></li><li><p>A fixed list of liquid futures contracts</p></li><li><p>Bitcoin and Ethereum</p></li><li><p>One specific index future</p></li><li><p>All instruments meeting a minimum volume requirement</p></li></ul><p>The universe matters because results can be distorted by market selection.</p><p>Suppose a trader tests a trend-following idea only on gold after noticing that gold had a strong historical trend. The result may reflect favourable instrument selection rather than a generally useful strategy.</p><p>A stronger test might include:</p><ul><li><p>Equity indices</p></li><li><p>Bonds</p></li><li><p>Metals</p></li><li><p>Energy</p></li><li><p>Agricultural commodities</p></li><li><p>Currencies</p></li></ul><p>A strategy does not have to work equally well on every market. But testing across several instruments helps reveal whether the idea is broad or dependent on one unusually favourable history.</p><h2>Define the timeframe</h2><p>Every rule depends on a timeframe.</p><p>A 20-bar breakout means something different on:</p><ul><li><p>A one-minute chart</p></li><li><p>A 15-minute chart</p></li><li><p>A four-hour chart</p></li><li><p>A daily chart</p></li><li><p>A weekly chart</p></li></ul><p>The timeframe affects:</p><ul><li><p>Trade frequency</p></li><li><p>Transaction costs</p></li><li><p>Signal noise</p></li><li><p>Holding period</p></li><li><p>Execution difficulty</p></li><li><p>Required market data</p></li><li><p>Exposure to overnight gaps</p></li></ul><p>The research plan should state the timeframe before testing begins.</p><p>For example:</p><blockquote><p>Use daily bars and calculate all signals after the daily close.</p></blockquote><p>That rule removes an important ambiguity.</p><p>It also avoids mixing bar-close information with intrabar execution assumptions.</p><h2>Define the setup</h2><p>A setup describes the market condition that must exist before an entry can occur.</p><p>Suppose the original idea concerns breakouts.</p><p>Possible setup rules include:</p><ul><li><p>Price is above its 200-day moving average</p></li><li><p>Volatility is above its 50-day median</p></li><li><p>The market has not triggered another breakout in the previous 10 bars</p></li><li><p>Average volume is above a minimum threshold</p></li><li><p>The current contract is not close to expiration</p></li><li><p>The instrument has sufficient liquidity</p></li></ul><p>A setup should have a reason.</p><p>Adding conditions only because they improve the historical result is dangerous. Each filter reduces the number of trades and creates another opportunity for overfitting.</p><p>A useful question is:</p><blockquote><p>Why should this condition improve the logic of the strategy?</p></blockquote><p>For example:</p><blockquote><p>Require price to be above its 200-day moving average because long breakouts may be more reliable during established upward regimes.</p></blockquote><p>This is a testable explanation.</p><p>By contrast:</p><blockquote><p>Use a 173-day moving average because it produced the highest return.</p></blockquote><p>That is probably data mining unless there is an independent reason for the choice.</p><h2>Define the entry event</h2><p>The entry rule must identify the exact event that creates a trade.</p><p>A vague rule might say:</p><blockquote><p>Buy when price breaks resistance.</p></blockquote><p>A testable version might say:</p><blockquote><p>Enter long when the current daily close is greater than the highest daily close of the previous 20 completed bars.</p></blockquote><p>This still leaves an execution question.</p><p>Should the strategy enter:</p><ul><li><p>At the current close</p></li><li><p>At the next bar&#8217;s open</p></li><li><p>With a stop order above the breakout level</p></li><li><p>With a limit order after a pullback</p></li></ul><p>Each choice creates a different strategy.</p><p>A conservative bar-close version might be:</p><blockquote><p>Calculate the signal after the daily bar closes and enter at the next bar&#8217;s open.</p></blockquote><p>That avoids assuming that the strategy knew the final closing price before the bar had finished.</p><h2>Use completed bars correctly</h2><p>Suppose the rule is:</p><blockquote><p>Enter when the closing price exceeds the previous 20-bar high.</p></blockquote><p>The current bar should normally not be included in the previous 20-bar calculation.</p><p>Otherwise, the current close is being compared with a range that already contains the current close.</p><p>The intended logic is usually:</p><blockquote><p>Compare the current close with the highest close of the 20 bars completed before the current bar.</p></blockquote><p>This small distinction can change the signals.</p><p>Precise indexing matters in both research and code.</p><h2>Define long and short rules separately</h2><p>A short strategy is not always the exact reverse of a long strategy.</p><p>Markets often rise and fall differently.</p><p>Equity indices, for example, may:</p><ul><li><p>Rise gradually</p></li><li><p>Fall sharply</p></li><li><p>Have a long-term upward bias</p></li><li><p>Experience larger volatility during declines</p></li></ul><p>A rule that works for long positions may not work equally well when reversed.</p><p>Instead of assuming symmetry, define and test both sides separately.</p><p>For example:</p><h3>Long rule</h3><blockquote><p>Enter long after a close above the previous 20-bar high while price is above the 200-day moving average.</p></blockquote><h3>Short rule</h3><blockquote><p>Enter short after a close below the previous 20-bar low while price is below the 200-day moving average.</p></blockquote><p>These rules look symmetrical, but their results should still be evaluated independently.</p><h2>Define position sizing</h2><p>The entry rule decides when to trade.</p><p>Position sizing decides how much the trade matters.</p><p>Common sizing methods include:</p><h3>Fixed quantity</h3><blockquote><p>Trade one contract or 100 shares.</p></blockquote><p>This is simple but does not account for changes in price or volatility.</p><h3>Fixed capital</h3><blockquote><p>Allocate $10,000 to each trade.</p></blockquote><p>This keeps the investment amount stable but not necessarily the risk.</p><h3>Percentage of equity</h3><blockquote><p>Allocate 10% of current account equity to each position.</p></blockquote><p>This adjusts as the account grows or declines.</p><h3>Fixed risk</h3><blockquote><p>Risk 1% of account equity based on the distance to the initial stop.</p></blockquote><p>This attempts to equalize the planned loss across trades.</p><h3>Volatility-adjusted sizing</h3><blockquote><p>Reduce position size when volatility is high and increase it when volatility is low.</p></blockquote><p>This can help normalize exposure across instruments.</p><p>Position sizing should be selected before examining the final performance chart.</p><p>Otherwise, leverage can be adjusted until an average strategy appears impressive.</p><h2>Define the initial risk</h2><p>A strategy should state what invalidates the trade or limits the loss.</p><p>Possible initial risk rules include:</p><ul><li><p>A fixed percentage stop</p></li><li><p>A fixed price-distance stop</p></li><li><p>An ATR-based stop</p></li><li><p>A recent swing low or high</p></li><li><p>A time-based exit</p></li><li><p>No stop, but a portfolio-level risk limit</p></li></ul><p>An ATR-based rule might be:</p><blockquote><p>Place the initial stop two times the 14-bar ATR below the entry price.</p></blockquote><p>This still requires further details:</p><ul><li><p>Is ATR measured on the signal bar or entry bar?</p></li><li><p>Is the stop fixed after entry?</p></li><li><p>Is it recalculated on every bar?</p></li><li><p>What happens when the market gaps beyond the stop?</p></li><li><p>Is the exit assumed at the stop price or next available price?</p></li></ul><p>Rules that appear simple often contain hidden assumptions.</p><h2>Define the exit rule</h2><p>The exit should be specified as carefully as the entry.</p><p>Possible exit rules include:</p><ul><li><p>Exit below a recent low</p></li><li><p>Exit after a moving-average crossover</p></li><li><p>Exit after a fixed number of bars</p></li><li><p>Exit at a profit target</p></li><li><p>Exit with a trailing stop</p></li><li><p>Exit when an opposite signal occurs</p></li><li><p>Exit when the original setup is no longer valid</p></li></ul><p>For example:</p><blockquote><p>Exit long when the daily close falls below the lowest close of the previous 10 completed bars. Execute at the next bar&#8217;s open.</p></blockquote><p>This is testable.</p><p>A rule such as &#8220;exit when momentum weakens&#8221; is not testable until momentum and weakening are both defined.</p><h2>Distinguish signal price from execution price</h2><p>A signal may be generated at one price and executed at another.</p><p>Suppose a breakout is confirmed at the daily close.</p><p>The signal price is the closing price.</p><p>But if the strategy waits until the bar is complete, the earliest simple execution assumption may be the next bar&#8217;s open.</p><p>That difference can matter when the market gaps.</p><p>A backtest that enters at the same close used to generate the signal may be using information that was not available early enough to trade at that price.</p><p>Every strategy should distinguish:</p><ul><li><p>When the information becomes available</p></li><li><p>When the decision is made</p></li><li><p>When the order is submitted</p></li><li><p>Which price is assumed for execution</p></li></ul><h2>Define commissions and slippage before testing</h2><p>Transaction costs should be included from the beginning.</p><p>Suppose a strategy makes a small average profit per trade. It may appear successful before costs and fail after realistic costs are added.</p><p>A simple cost model might state:</p><blockquote><p>Include a commission of $2 per order and slippage of one minimum price increment on entry and exit.</p></blockquote><p>For stocks, the assumptions might include:</p><ul><li><p>Per-share commission</p></li><li><p>Minimum commission</p></li><li><p>Bid-ask spread</p></li><li><p>Percentage slippage</p></li></ul><p>For futures:</p><ul><li><p>Broker commission</p></li><li><p>Exchange and clearing fees</p></li><li><p>Tick size</p></li><li><p>Contract multiplier</p></li><li><p>Rollover treatment</p></li></ul><p>For crypto:</p><ul><li><p>Maker or taker fees</p></li><li><p>Spread</p></li><li><p>Funding costs</p></li><li><p>Exchange-specific execution differences</p></li></ul><p>The exact model will never be perfect. But zero-cost assumptions are rarely realistic.</p><h2>Define how overlapping signals are handled</h2><p>Suppose a long position is already open and another long signal appears.</p><p>What should the strategy do?</p><p>Possible rules include:</p><ul><li><p>Ignore the new signal</p></li><li><p>Add another position</p></li><li><p>Reset the stop</p></li><li><p>Recalculate position size</p></li><li><p>Replace the existing entry price</p></li><li><p>Allow a maximum number of additions</p></li></ul><p>This is the issue of pyramiding.</p><p>A strategy should also explain what happens when an opposite signal appears:</p><ul><li><p>Close the existing position only</p></li><li><p>Close and reverse immediately</p></li><li><p>Wait until the next bar</p></li><li><p>Ignore the opposite signal until the current trade exits</p></li></ul><p>Leaving these choices undefined can produce inconsistent results.</p><h2>Define the testing period</h2><p>The selected historical period can strongly influence performance.</p><p>A strategy tested only during a strong bull market may look more reliable than it really is.</p><p>The test should ideally include different environments:</p><ul><li><p>Bull markets</p></li><li><p>Bear markets</p></li><li><p>Sideways markets</p></li><li><p>High-volatility periods</p></li><li><p>Low-volatility periods</p></li><li><p>Crisis periods</p></li><li><p>Calm periods</p></li><li><p>Rising-rate and falling-rate environments</p></li></ul><p>The objective is not to find a period in which the strategy performs best.</p><p>It is to understand when the strategy performs well and when it struggles.</p><h2>Choose evaluation metrics before viewing the result</h2><p>The criteria used to judge the strategy should be selected in advance.</p><p>Otherwise, the researcher may focus on whichever statistic looks most favourable.</p><p>Useful metrics include:</p><ul><li><p>Total return</p></li><li><p>Annualized return</p></li><li><p>Maximum drawdown</p></li><li><p>Number of trades</p></li><li><p>Win rate</p></li><li><p>Average trade</p></li><li><p>Average win</p></li><li><p>Average loss</p></li><li><p>Payoff ratio</p></li><li><p>Profit factor</p></li><li><p>Sharpe ratio</p></li><li><p>Exposure</p></li><li><p>Time in market</p></li><li><p>Longest drawdown duration</p></li><li><p>Performance after costs</p></li></ul><p>The importance of each metric depends on the strategy.</p><p>A high-frequency strategy requires careful attention to costs. A trend-following strategy may have a low win rate but a high payoff ratio. A long-term strategy may have few trades and therefore limited statistical evidence.</p><h2>Example: turning an idea into rules</h2><p>Consider the following initial idea:</p><blockquote><p>Strong markets tend to continue rising.</p></blockquote><p>This is not testable.</p><p>We can gradually convert it into a research plan.</p><h3>Step 1: Define strong</h3><blockquote><p>A market is strong when it closes above the highest close of the previous 20 completed bars.</p></blockquote><h3>Step 2: Define the regime</h3><blockquote><p>Only consider long signals when price is above its 200-day simple moving average.</p></blockquote><h3>Step 3: Define the market</h3><blockquote><p>Test the strategy on liquid equity-index, bond, currency, metal, and energy futures.</p></blockquote><h3>Step 4: Define the timeframe</h3><blockquote><p>Use daily bars.</p></blockquote><h3>Step 5: Define the signal timing</h3><blockquote><p>Calculate the signal after the daily bar closes.</p></blockquote><h3>Step 6: Define execution</h3><blockquote><p>Enter at the next bar&#8217;s open.</p></blockquote><h3>Step 7: Define the initial stop</h3><blockquote><p>Set the initial stop two times the 14-day ATR below the entry price.</p></blockquote><h3>Step 8: Define position size</h3><blockquote><p>Size the position so that the distance from the entry to the initial stop represents 1% of current account equity.</p></blockquote><h3>Step 9: Define the exit</h3><blockquote><p>Exit when the daily close falls below the lowest close of the previous 10 completed bars. Execute at the next bar&#8217;s open.</p></blockquote><h3>Step 10: Define additional entries</h3><blockquote><p>Allow only one open position per market. Ignore new long signals while the position remains open.</p></blockquote><h3>Step 11: Define costs</h3><blockquote><p>Include estimated commissions and one tick of slippage on every entry and exit.</p></blockquote><h3>Step 12: Define evaluation criteria</h3><blockquote><p>Evaluate net return, maximum drawdown, number of trades, win rate, payoff ratio, profit factor, Sharpe ratio, and performance across different markets and periods.</p></blockquote><p>The original statement has now become a strategy that can be implemented.</p><h2>Write the complete rule set</h2><p>The strategy can be summarized as follows.</p><h3>Market universe</h3><p>A diversified list of liquid futures markets.</p><h3>Timeframe</h3><p>Daily bars.</p><h3>Direction</h3><p>Long only.</p><h3>Trend filter</h3><p>The closing price must be above the 200-day simple moving average.</p><h3>Entry signal</h3><p>The current closing price must be above the highest closing price of the previous 20 completed bars.</p><h3>Execution</h3><p>Enter at the next bar&#8217;s open.</p><h3>Position size</h3><p>Risk 1% of current account equity based on the distance to the initial stop.</p><h3>Initial stop</h3><p>Two times the 14-day ATR below the entry price.</p><h3>Exit signal</h3><p>The current closing price falls below the lowest closing price of the previous 10 completed bars.</p><h3>Exit execution</h3><p>Exit at the next bar&#8217;s open, unless the protective stop is triggered earlier.</p><h3>Pyramiding</h3><p>Not allowed.</p><h3>Costs</h3><p>Include commissions and estimated slippage.</p><h3>Maximum positions</h3><p>Apply a portfolio-level limit to prevent excessive total exposure.</p><p>This does not mean the strategy is profitable.</p><p>It means the strategy is defined.</p><p>That is the necessary first step.</p><h2>Avoid changing too many things at once</h2><p>Once the first test is complete, the temptation is to modify everything:</p><ul><li><p>Change the breakout from 20 bars to 50</p></li><li><p>Add an RSI filter</p></li><li><p>Replace the exit</p></li><li><p>Change the stop</p></li><li><p>Add a volume rule</p></li><li><p>Test another timeframe</p></li><li><p>Increase leverage</p></li></ul><p>If several components change at once, it becomes difficult to understand why the result changed.</p><p>A better process is to alter one assumption at a time.</p><p>For example:</p><ol><li><p>Test the 20-bar breakout without a trend filter.</p></li><li><p>Add the 200-day trend filter.</p></li><li><p>Compare several nearby breakout periods.</p></li><li><p>Compare fixed sizing with volatility-adjusted sizing.</p></li><li><p>Test alternative exits.</p></li><li><p>Increase cost assumptions.</p></li><li><p>Test additional markets.</p></li></ol><p>This approach reveals which components contribute meaningful value.</p><h2>Test ranges, not perfect parameters</h2><p>Suppose the strategy performs best with a 37-bar breakout.</p><p>That does not necessarily mean 37 bars has special significance.</p><p>The stronger question is:</p><blockquote><p>Does the idea work reasonably well across a range of similar values?</p></blockquote><p>For example:</p><ul><li><p>20 bars</p></li><li><p>30 bars</p></li><li><p>40 bars</p></li><li><p>50 bars</p></li><li><p>60 bars</p></li></ul><p>A stable strategy may produce acceptable results across a broad region.</p><p>An overfit strategy may perform extremely well at 37 bars and poorly at 36 or 38.</p><p>Prefer stable regions to isolated peaks.</p><h2>Keep an untouched test period</h2><p>One of the biggest research mistakes is using all available data to design the strategy.</p><p>If every rule and parameter was chosen after examining the entire history, the final backtest is not an independent test.</p><p>A basic solution is to divide the data.</p><h3>In-sample period</h3><p>Use this period to develop the rules.</p><h3>Out-of-sample period</h3><p>Keep this period untouched until the strategy design is reasonably complete.</p><p>The out-of-sample result provides a more honest test of whether the logic survives on data that did not directly influence the design.</p><p>It is still not a guarantee of future performance.</p><p>But it is more informative than repeatedly optimizing on the same history.</p><h2>Record each research decision</h2><p>A simple research log can prevent accidental hindsight.</p><p>For every test, record:</p><ul><li><p>The hypothesis</p></li><li><p>The rule being changed</p></li><li><p>The reason for the change</p></li><li><p>The markets tested</p></li><li><p>The date range</p></li><li><p>The cost assumptions</p></li><li><p>The result</p></li><li><p>The conclusion</p></li><li><p>The next test</p></li></ul><p>For example:</p><blockquote><p><strong>Hypothesis:</strong> Long breakouts may perform better when the long-term trend is positive.<br><strong>Change:</strong> Add a 200-day moving-average filter.<br><strong>Reason:</strong> Avoid long entries during established downward regimes.<br><strong>Result:</strong> Drawdown decreased, but trade count and total return also fell.<br><strong>Conclusion:</strong> The filter may improve risk-adjusted performance but reduces opportunity.</p></blockquote><p>This is more useful than saving only the best equity curve.</p><h2>Common mistakes when defining rules</h2><h2>1. Using subjective language</h2><p>Examples:</p><ul><li><p>Strong trend</p></li><li><p>Important support</p></li><li><p>Large candle</p></li><li><p>Weak momentum</p></li><li><p>Good volume</p></li><li><p>Clear breakout</p></li></ul><p>These descriptions need numerical definitions.</p><p>For example:</p><blockquote><p>Define a large candle as a true range greater than 1.5 times the 20-bar median true range.</p></blockquote><p>The definition may later be changed, but it is now testable.</p><h2>2. Selecting rules after viewing the chart</h2><p>It is easy to look at historical charts and create rules that fit visible turning points.</p><p>This is hindsight.</p><p>A testable process defines the rules first and applies them to all qualifying data, including unattractive examples.</p><h2>3. Ignoring failed signals</h2><p>A trader may remember the breakout that began a major trend and overlook the many breakouts that quickly reversed.</p><p>The backtest must include every signal that met the rule.</p><h2>4. Using future information</h2><p>Examples include:</p><ul><li><p>Entering at a close that was not known until the bar ended</p></li><li><p>Using the completed day&#8217;s high before the day was finished</p></li><li><p>Referencing future bars</p></li><li><p>Using revised data that was unavailable historically</p></li><li><p>Selecting stocks based on their current index membership</p></li></ul><p>These errors can create results that could not have been achieved in real time.</p><h2>5. Adding filters until the backtest looks good</h2><p>Every additional condition can improve historical fit.</p><p>It can also make the strategy less likely to work on new data.</p><p>A filter should solve a clearly identified problem, not merely raise net profit.</p><h2>6. Testing only one market</h2><p>A strategy may appear successful because the selected market happened to suit it.</p><p>Testing several markets helps distinguish a general behaviour from a favourable example.</p><h2>7. Ignoring execution</h2><p>A signal is not a fill.</p><p>Strategies using limit orders, stop orders, intrabar conditions, or illiquid instruments require careful execution assumptions.</p><h2>8. Optimizing position size instead of the idea</h2><p>Increasing leverage can improve return statistics while hiding weak underlying performance.</p><p>Evaluate the unleveraged logic first.</p><h2>A reusable strategy specification</h2><p>Before coding a strategy, complete the following template.</p><h2>Trading idea</h2><p>What market behaviour might create an opportunity?</p><h2>Hypothesis</h2><p>What specific claim will be tested?</p><h2>Market universe</h2><p>Which instruments qualify?</p><h2>Timeframe</h2><p>Which bar interval will be used?</p><h2>Session</h2><p>Which trading hours and timezone apply?</p><h2>Direction</h2><p>Long, short, or both?</p><h2>Setup</h2><p>What conditions must exist before entry?</p><h2>Entry signal</h2><p>What exact event triggers the trade?</p><h2>Signal timing</h2><p>When does the required information become available?</p><h2>Execution</h2><p>Which order type and assumed fill price are used?</p><h2>Position size</h2><p>How is trade quantity calculated?</p><h2>Initial risk</h2><p>Where is the initial stop or invalidation point?</p><h2>Exit</h2><p>What exact event closes the trade?</p><h2>Additional entries</h2><p>Is pyramiding allowed?</p><h2>Opposite signals</h2><p>Does the strategy close, reverse, or ignore them?</p><h2>Costs</h2><p>Which commissions, spread, slippage, and financing costs are included?</p><h2>Portfolio constraints</h2><p>What limits total exposure?</p><h2>Test period</h2><p>Which dates are included?</p><h2>Out-of-sample period</h2><p>Which data remains untouched during development?</p><h2>Evaluation</h2><p>Which metrics will determine whether the idea deserves further research?</p><p>When every field has an answer, the strategy is ready to be coded.</p><h2>The core principle</h2><p>A trading idea becomes useful when it can fail clearly.</p><p>That may sound strange, but it is essential.</p><p>A statement such as:</p><blockquote><p>Buy when the market looks strong.</p></blockquote><p>can always be reinterpreted after the result is known.</p><p>A rule such as:</p><blockquote><p>Enter long at the next bar&#8217;s open after a daily close above the previous 20-bar high.</p></blockquote><p>can be tested and rejected.</p><p>That is a strength.</p><p>Clear rules allow the market to provide evidence.</p><p>The objective is not to make every idea survive. It is to eliminate ambiguity and discover which ideas deserve further investigation.</p><blockquote><p><strong>A strategy should be precise enough to code, simple enough to explain, and explicit enough to prove wrong.</strong></p></blockquote><p>That is how a trading idea becomes a testable system.</p><div><hr></div><h2>Next in Strategy</h2><p><strong>Expectancy: The Number That Matters More Than Win Rate</strong></p><p>The next article will explain how win rate, average gain, and average loss combine to determine whether a strategy has a positive long-term expectation.</p><p>Subscribe to AlgoSolo for systematic trading strategy, realistic backtesting, and practical Pine Script v6 tutorials.</p><p><em>Educational content only. Nothing in this publication is investment advice or a recommendation to trade any financial instrument.</em></p>]]></content:encoded></item><item><title><![CDATA[What Is a Trading Strategy?]]></title><description><![CDATA[A trading strategy is not an indicator or an entry signal. It is a complete set of rules for entering, managing, and exiting positions under defined conditions.]]></description><link>https://www.algosolo.com/p/what-is-a-trading-strategy</link><guid isPermaLink="false">https://www.algosolo.com/p/what-is-a-trading-strategy</guid><dc:creator><![CDATA[AlgoSolo]]></dc:creator><pubDate>Mon, 13 Jul 2026 20:05:28 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!Khz1!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F079f6f72-8d75-4366-835d-7ab651cb91f0_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most traders begin with an entry idea.</p><p>Buy when two moving averages cross. Sell when price reaches a new low. Enter when the RSI becomes oversold. Trade when the market breaks out of a range.</p><p>These can all be useful ideas, but none of them is a complete trading strategy.</p><p>An entry signal answers only one question:</p><blockquote><p>When might I open a position?</p></blockquote><p>A trading strategy must answer several more:</p><ul><li><p>What will I trade?</p></li><li><p>On which timeframe?</p></li><li><p>How much will I buy or sell?</p></li><li><p>When will I exit?</p></li><li><p>How much am I willing to lose?</p></li><li><p>What happens when several signals occur together?</p></li><li><p>How will commissions, spread, and slippage affect the result?</p></li><li><p>Under which conditions should the strategy remain inactive?</p></li></ul><p>Until these questions have explicit answers, there is nothing that can be tested consistently.</p><p>There is only an idea.</p><h2>A strategy is a decision-making system</h2><p>A trading strategy is a set of rules that converts market information into trading decisions.</p><p>Those decisions normally include:</p><ol><li><p>Whether to enter</p></li><li><p>Whether to remain in a position</p></li><li><p>Whether to reduce or increase exposure</p></li><li><p>When to exit</p></li><li><p>How much capital to risk</p></li></ol><p>The rules do not have to be complicated.</p><p>A strategy may be based on one moving average, a price breakout, a volatility measurement, or the relationship between two markets. Complexity does not automatically make a system more effective.</p><p>What matters is that the rules are sufficiently clear that two people applying them to the same data would reach the same decision.</p><p>Consider this instruction:</p><blockquote><p>Buy when the market looks strong.</p></blockquote><p>It may sound reasonable, but it is not testable. Different traders will interpret &#8220;strong&#8221; differently.</p><p>Now consider this rule:</p><blockquote><p>Enter long when today&#8217;s closing price is higher than the highest closing price of the previous 20 completed bars.</p></blockquote><p>This rule is explicit.</p><p>It can be coded, tested, repeated, and challenged.</p><p>That is the beginning of a systematic strategy.</p><h2>Strategy, setup, indicator, and system</h2><p>These terms are often used as though they mean the same thing, but they describe different things.</p><h3>Indicator</h3><p>An indicator transforms market data into another value.</p><p>A moving average, Average True Range, RSI, and MACD are indicators. They describe some aspect of price, momentum, or volatility.</p><p>An indicator does not automatically tell you what action to take.</p><h3>Setup</h3><p>A setup describes a market condition that may be interesting.</p><p>Examples include:</p><ul><li><p>Price trading above a long-term moving average</p></li><li><p>Volatility falling to a six-month low</p></li><li><p>A market reaching a new 50-day high</p></li><li><p>A fast moving average crossing above a slow moving average</p></li></ul><p>A setup helps identify a possible opportunity, but it may not define the complete trade.</p><h3>Entry signal</h3><p>An entry signal defines the event that opens a position.</p><p>For example:</p><blockquote><p>Enter long at the next bar&#8217;s open after the market closes above its previous 20-bar high.</p></blockquote><p>This is more precise than a setup, but it still does not explain position size or exit logic.</p><h3>Trading strategy</h3><p>A strategy combines the entry rule with position sizing, risk management, exit rules, trading costs, and execution assumptions.</p><h3>Trading system</h3><p>The terms &#8220;strategy&#8221; and &#8220;system&#8221; are often used interchangeably.</p><p>A broader trading system may also include:</p><ul><li><p>A portfolio of several strategies</p></li><li><p>Market-selection rules</p></li><li><p>Capital allocation</p></li><li><p>Operational controls</p></li><li><p>Broker and execution procedures</p></li><li><p>Monitoring and review processes</p></li></ul><p>In AlgoSolo, a strategy means the complete rules required to test and execute one defined trading approach.</p><h2>The components of a complete trading strategy</h2><p>A well-defined strategy should contain at least the following components.</p><h2>1. Market universe</h2><p>The strategy must define which instruments it is allowed to trade.</p><p>Examples:</p><ul><li><p>Stocks in the S&amp;P 500</p></li><li><p>Major currency pairs</p></li><li><p>Liquid cryptocurrency markets</p></li><li><p>Equity-index futures</p></li><li><p>Gold and crude-oil futures</p></li><li><p>One specific instrument, such as Bitcoin or the S&amp;P 500</p></li></ul><p>A result obtained on one market should not automatically be assumed to work on another.</p><p>Different instruments have different:</p><ul><li><p>Trading hours</p></li><li><p>Volatility patterns</p></li><li><p>Liquidity</p></li><li><p>Contract specifications</p></li><li><p>Transaction costs</p></li><li><p>Long-term behaviour</p></li></ul><p>The chosen market universe is therefore part of the strategy.</p><h2>2. Timeframe</h2><p>The same rule may produce very different results on a five-minute chart and a daily chart.</p><p>A strategy should identify:</p><ul><li><p>The chart timeframe</p></li><li><p>The decision frequency</p></li><li><p>Whether signals are evaluated during the bar or after it closes</p></li><li><p>The trading session used</p></li><li><p>The timezone used for session-based rules</p></li></ul><p>For example:</p><blockquote><p>Evaluate the strategy once per day after the official market close.</p></blockquote><p>This is substantially different from recalculating the strategy after every price change.</p><h2>3. Setup and market filter</h2><p>A market filter determines when the strategy is permitted to trade.</p><p>A long-only strategy might require price to be above its 200-day moving average. A mean-reversion strategy might trade only when volatility is below a certain level. A futures strategy might avoid entering shortly before the contract expires.</p><p>Filters may improve a strategy, but they also create additional parameters. Every extra condition should have a defensible purpose.</p><h2>4. Entry rule</h2><p>The entry rule should specify:</p><ul><li><p>Long, short, or both</p></li><li><p>The exact signal condition</p></li><li><p>When the condition is evaluated</p></li><li><p>The type of order used</p></li><li><p>The assumed execution price</p></li></ul><p>Compare these two descriptions:</p><blockquote><p>Buy after a breakout.</p></blockquote><p>and:</p><blockquote><p>After the daily bar closes, enter long at the next bar&#8217;s open when the closing price is above the highest closing price of the previous 20 completed bars.</p></blockquote><p>The second rule can be tested without interpretation.</p><h2>5. Position size</h2><p>A strategy must determine how much to trade.</p><p>Possible methods include:</p><ul><li><p>A fixed number of shares or contracts</p></li><li><p>A fixed amount of capital</p></li><li><p>A percentage of account equity</p></li><li><p>A fixed percentage of equity at risk</p></li><li><p>Volatility-adjusted sizing</p></li><li><p>Equal allocation across markets</p></li></ul><p>Position sizing can change the character of a strategy even when the entry and exit rules remain unchanged.</p><p>A strategy that risks 0.5% of account equity per trade is not equivalent to the same strategy risking 5%.</p><p>The signals may be identical, but the drawdowns and probability of ruin are not.</p><h2>6. Exit rule</h2><p>A strategy is incomplete without an exit.</p><p>Common exit methods include:</p><ul><li><p>Stop-loss exits</p></li><li><p>Profit targets</p></li><li><p>Trailing stops</p></li><li><p>Moving-average exits</p></li><li><p>Opposite signals</p></li><li><p>Time-based exits</p></li><li><p>Volatility-based exits</p></li><li><p>Closing the position after a fixed number of bars</p></li></ul><p>The exit rule often has as much influence on performance as the entry rule.</p><p>A trend-following entry combined with a tight profit target may prevent the strategy from capturing long trends. A mean-reversion strategy without a protective exit may remain exposed while a temporary deviation turns into a lasting market move.</p><p>The entry and exit must be designed as parts of the same system.</p><h2>7. Risk controls</h2><p>Position sizing controls risk at the trade level, but a complete strategy may also need broader limits.</p><p>Examples include:</p><ul><li><p>Maximum number of simultaneous positions</p></li><li><p>Maximum exposure to one market</p></li><li><p>Maximum sector exposure</p></li><li><p>Maximum daily loss</p></li><li><p>Maximum portfolio leverage</p></li><li><p>Rules for correlated positions</p></li><li><p>Suspension after a specified drawdown</p></li></ul><p>These controls are especially important when the same strategy trades several instruments.</p><p>Ten positions do not necessarily represent ten independent risks. They may all respond to the same underlying market event.</p><h2>8. Trading costs</h2><p>Backtests that ignore trading costs can create an unrealistic impression of profitability.</p><p>Relevant costs may include:</p><ul><li><p>Broker commissions</p></li><li><p>Exchange fees</p></li><li><p>Bid-ask spread</p></li><li><p>Slippage</p></li><li><p>Borrowing costs for short positions</p></li><li><p>Financing or funding costs</p></li><li><p>Market-data costs</p></li><li><p>Contract rollover costs</p></li></ul><p>The impact depends on the strategy.</p><p>A long-term system making ten trades per year may be relatively insensitive to small commissions. A short-term strategy making hundreds of trades may become unprofitable after realistic costs are included.</p><p>Costs should be treated as part of the strategy, not added as an afterthought.</p><h2>9. Execution assumptions</h2><p>A backtest must make assumptions about how orders are filled.</p><p>Suppose a daily strategy produces a signal using the closing price. It cannot normally assume that the trade was also executed at that same closing price unless an appropriate order was actually available before the close.</p><p>A more conservative rule may be:</p><blockquote><p>Calculate the signal after the bar closes and execute at the next bar&#8217;s open.</p></blockquote><p>Other execution questions include:</p><ul><li><p>Can a limit order remain unfilled?</p></li><li><p>What happens when price gaps beyond a stop?</p></li><li><p>Are several orders allowed on the same bar?</p></li><li><p>Is the strategy allowed to reverse immediately?</p></li><li><p>Are partial fills possible?</p></li><li><p>Is sufficient volume available?</p></li></ul><p>These details can materially change a result.</p><h2>10. Evaluation criteria</h2><p>A strategy should be judged using more than net profit.</p><p>Useful measurements include:</p><ul><li><p>Total return</p></li><li><p>Annualized return</p></li><li><p>Number of trades</p></li><li><p>Win rate</p></li><li><p>Average winning trade</p></li><li><p>Average losing trade</p></li><li><p>Payoff ratio</p></li><li><p>Profit factor</p></li><li><p>Maximum drawdown</p></li><li><p>Recovery time</p></li><li><p>Exposure</p></li><li><p>Sharpe ratio</p></li><li><p>Performance after costs</p></li></ul><p>No single number tells the complete story.</p><p>A high win rate can conceal rare but very large losses. A high total return may have required unacceptable leverage. An attractive Sharpe ratio may be based on too few trades to provide meaningful evidence.</p><p>The objective is not to find one flattering statistic. It is to understand how the strategy produces returns and what risks it takes while doing so.</p><h2>An example of a complete strategy</h2><p>Consider a simple long-only breakout strategy.</p><p>This example is deliberately basic. It is not a recommendation to trade.</p><h3>Market</h3><p>A liquid instrument with reliable daily price data.</p><h3>Timeframe</h3><p>Daily bars.</p><h3>Evaluation</h3><p>Signals are calculated after each daily bar has closed.</p><h3>Market filter</h3><p>The closing price must be above its 200-day simple moving average.</p><h3>Entry</h3><p>Enter long at the next bar&#8217;s open when the current closing price is higher than the highest closing price of the previous 20 completed bars.</p><h3>Position size</h3><p>Risk no more than 1% of current account equity based on the distance between the entry price and initial stop.</p><h3>Initial stop</h3><p>Place the initial stop two Average True Ranges below the entry price.</p><h3>Exit</h3><p>Exit at the next bar&#8217;s open when the closing price falls below the lowest closing price of the previous 10 completed bars.</p><h3>Costs</h3><p>Include commission and an estimated amount of slippage for every entry and exit.</p><h3>Maximum exposure</h3><p>Only one position may be open in the instrument at a time.</p><p>This description is still not perfect. For example, it should specify the ATR period, how position size is rounded, and what happens when price gaps beyond the stop.</p><p>But it is already much closer to a strategy than the statement:</p><blockquote><p>Buy 20-day breakouts.</p></blockquote><h2>Why explicit rules matter</h2><p>Clear rules make a strategy easier to improve.</p><p>When the result is disappointing, you can identify the component responsible:</p><ul><li><p>Does the entry occur too late?</p></li><li><p>Does the exit cut profitable trades too quickly?</p></li><li><p>Is the stop too close for the market&#8217;s normal volatility?</p></li><li><p>Are costs consuming the expected return?</p></li><li><p>Is the strategy active during unsuitable market regimes?</p></li><li><p>Is position sizing creating excessive drawdowns?</p></li></ul><p>Without explicit rules, changes tend to become emotional and inconsistent.</p><p>One losing trade leads to a wider stop. A missed trend leads to an earlier entry. A drawdown leads to adding another indicator. Soon the original strategy has been replaced by a collection of reactions.</p><p>Systematic research requires changing one defined assumption at a time and measuring the effect.</p><h2>A strategy is not validated by one profitable backtest</h2><p>Turning an idea into rules makes it testable. It does not prove that the strategy works.</p><p>A profitable historical result may be caused by:</p><ul><li><p>Random chance</p></li><li><p>Overfitting</p></li><li><p>Selection of a favourable market</p></li><li><p>Selection of a favourable period</p></li><li><p>Unrealistic execution</p></li><li><p>Missing trading costs</p></li><li><p>Lookahead bias</p></li><li><p>Survivorship bias</p></li><li><p>A market regime that may not return</p></li></ul><p>The purpose of a backtest is not to manufacture the best possible result.</p><p>It is to challenge the strategy.</p><p>A useful research process asks:</p><blockquote><p>Does the idea remain reasonable when the assumptions become less favourable?</p></blockquote><p>That may involve testing:</p><ul><li><p>Different markets</p></li><li><p>Different periods</p></li><li><p>Nearby parameter values</p></li><li><p>Higher trading costs</p></li><li><p>Delayed execution</p></li><li><p>Out-of-sample data</p></li><li><p>Different volatility regimes</p></li></ul><p>A robust strategy does not need to produce identical results everywhere. But its performance should not depend entirely on one perfect combination of settings.</p><h2>Before testing a strategy, write it down</h2><p>A practical habit is to write the complete strategy before running the backtest.</p><p>Use this checklist:</p><h3>Market</h3><p>What instruments may be traded?</p><h3>Timeframe</h3><p>When are decisions made?</p><h3>Setup</h3><p>What conditions must exist before an entry is permitted?</p><h3>Entry</h3><p>What exact event opens the position?</p><h3>Position size</h3><p>How much capital is allocated or placed at risk?</p><h3>Exit</h3><p>What exact event closes the position?</p><h3>Costs</h3><p>What commission, spread, and slippage assumptions are included?</p><h3>Risk limits</h3><p>What prevents one trade or group of trades from becoming excessively large?</p><h3>Evaluation</h3><p>Which measurements will determine whether the test is promising?</p><p>Writing these rules first reduces the temptation to repeatedly change the strategy until the historical result looks attractive.</p><h2>The core principle</h2><p>A trading strategy is not defined by how sophisticated it sounds.</p><p>It is defined by how clearly it makes decisions.</p><p>A useful strategy should allow you to explain:</p><blockquote><p>What am I trading, why am I entering, how much am I risking, when will I exit, and under what conditions might the idea fail?</p></blockquote><p>When those questions have precise answers, the strategy can be coded and tested.</p><p>That is where systematic trading begins.</p><div><hr></div><h2>Next in Strategy</h2><p><strong>From Trading Idea to Testable Rules</strong></p><p>The next article will show how to take a general observation about market behaviour and convert it into rules that can be researched without ambiguity.</p><p>Subscribe to AlgoSolo for practical strategy research, realistic backtesting, and Pine Script v6 tutorials.</p><p><em>Educational content only. Nothing in this publication is investment advice or a recommendation to trade any financial instrument.</em></p>]]></content:encoded></item></channel></rss>