Stock to Flow (S2F): Complete Guide for Algorithmic Trading

The Stock to Flow (S2F) model is a scarcity-based indicator that measures the ratio of an asset’s existing supply to the rate at which new supply is produced. Originally applied to gold and precious metals, the model was adapted for Bitcoin in 2019 and gained significant attention for its ability to describe Bitcoin’s long-term price trajectory in relation to its programmatic supply schedule. For systematic traders, Stock to Flow provides a macro-level lens on Bitcoin’s scarcity dynamics — one that operates on a fundamentally different timescale to most technical indicators.

What Is the Stock to Flow Model?

Stock to Flow is a way of quantifying scarcity. “Stock” refers to the total existing supply of an asset — everything that has already been produced and is available in the market. “Flow” refers to the annual rate of new production — how much new supply enters the market each year. Dividing stock by flow gives the S2F ratio.

A high S2F ratio means the existing supply dwarfs annual new production. The asset is scarce. It would take many years of current production to meaningfully dilute the existing supply. Gold has historically had an S2F ratio of around 60–80, meaning 60–80 years of current gold mining would be needed to double the existing above-ground supply. This scarcity is a core reason gold has functioned as a store of value for centuries.

Bitcoin’s S2F ratio increases dramatically at each halving event. Before the 2024 halving, Bitcoin’s block reward was 6.25 BTC per block. After the halving, it dropped to 3.125 BTC. Annual new Bitcoin supply roughly halved. With approximately 19.7 million BTC in circulation at that point and roughly 164,000 new BTC produced annually post-halving, Bitcoin’s S2F ratio sits around 120 — significantly higher than gold. Each future halving will push it higher still.

How Is Stock to Flow Calculated?

The calculation uses two inputs: total circulating supply and annual production rate. For Bitcoin, both values are known with precision because the supply schedule is hardcoded into the protocol.

Total circulating supply is the current number of BTC that have been mined. Annual flow is the number of new BTC produced per year at the current block reward. Dividing the first by the second gives the S2F ratio for any point in time.

The S2F ratio increases gradually between halvings as the circulating supply grows slightly while flow stays constant. Then it roughly doubles at each halving event when the block reward is cut in half. This creates a staircase pattern in the S2F ratio over time — slow growth, sharp jump, slow growth, sharp jump.

In Arrow Algo, the stocktoflow block calculates the S2F ratio automatically. It uses price and supply data to output the current ratio, letting you incorporate S2F context directly into your strategy logic without any manual calculation.

How to Read Stock to Flow Signals?

The S2F model is not a short-term trading signal. It operates on a macro timescale — weeks, months, and halving cycles rather than hours or days. Understanding how to use it correctly requires treating it as a regime indicator rather than an entry trigger.

S2F ratio trend direction: When the S2F ratio is rising — whether gradually between halvings or sharply at a halving — it signals increasing scarcity. The model’s thesis is that rising scarcity should correlate with rising price over time, as the same demand chasing a proportionally smaller new supply requires higher prices to clear.

Price vs S2F model comparison: The original S2F model by PlanB expressed the relationship between the S2F ratio and Bitcoin’s market capitalisation as a power-law function. When Bitcoin’s actual price is significantly below the model’s implied value, the model suggests undervaluation relative to scarcity. When price is far above the model’s implied value, it suggests overvaluation. Systematic traders use this as a macro regime filter — not a precise entry point, but a directional bias for longer-term strategy positioning.

Post-halving windows: Historically, Bitcoin’s most significant bull runs have occurred in the 12–18 months following each halving event, as the reduced flow works through to tighter supply dynamics in the market. The S2F indicator helps track where in that cycle the market currently sits.

What Are the Best Stock to Flow Trading Strategies?

Long-term macro regime filter: The most practical application for systematic traders is using the S2F ratio as a macro regime filter. When the S2F ratio is high and rising — particularly in the 12–18 months post-halving — the macro bias for a trend-following strategy is long. This does not replace short-term technical signals, but it provides a structural context for them. A bullish technical signal that aligns with a high-S2F regime carries more long-term weight than the same signal in a low-S2F environment.

Cycle positioning: Using S2F to identify where Bitcoin sits in its halving cycle helps systematic traders calibrate expected volatility and return profiles. Early post-halving periods have historically offered the most favourable risk-adjusted setups for trend-following strategies. Tracking the S2F ratio helps identify those windows systematically rather than relying on memory of past cycles. For context on evaluating strategy performance across cycles, see our guide on risk-adjusted returns.

Divergence signals: When Bitcoin’s price diverges significantly from what the S2F model implies — either substantially above or below — it can generate a mean-reversion signal on a long time horizon. Extended periods of trading well below the model value have historically preceded significant recoveries. Extended periods above the model value have often marked cycle tops. These are not precise timing signals, but they provide macro context for longer-term positioning decisions.

What Are Common Stock to Flow Mistakes to Avoid?

Using it as a short-term entry trigger: S2F is a long-horizon model. Using it to time entries on hourly or daily charts introduces a fundamental mismatch between the signal’s timescale and the trade’s execution timeframe. S2F says nothing about whether Bitcoin goes up or down this week. It speaks to structural scarcity dynamics over months and halving cycles.

Treating the model as price prediction: The S2F model describes a historical relationship between scarcity and value. It is not a price forecast with a specific target and timeline. Bitcoin has deviated significantly from the model’s implied value — in both directions — for extended periods. Use it as context, not as a guarantee.

Ignoring demand-side factors: Stock to Flow only models supply. It says nothing about demand. A Bitcoin with a high S2F ratio but collapsing demand would not produce the price appreciation the model implies. S2F is most useful when combined with evidence of sustained or growing demand — ETF inflows, wallet growth, exchange balances declining. Supply scarcity requires demand to translate into price appreciation. Learn more about supply and demand dynamics in crypto at CoinMarketCap’s educational resources.

How to Build Stock to Flow Strategies in Arrow Algo?

Arrow Algo’s stocktoflow block outputs the current S2F ratio for the selected asset. You can use this value directly in your strategy logic as a regime condition. Connect the block output to a comparison block — for example, “S2F ratio greater than 100” — and wire that condition into your entry logic as a filter. Entries are only permitted when the macro regime meets your S2F threshold.

A practical approach is to combine the S2F regime filter with a shorter-term trend indicator. The S2F block confirms you are in a high-scarcity, post-halving environment where the macro backdrop is supportive. The trend indicator handles the timing of specific entries within that regime. Connect both outputs to an AND block. The strategy only enters when both conditions are satisfied simultaneously.

Backtest this combination across historical halving cycles in Arrow Algo to see how the S2F filter affects performance metrics — particularly the Sharpe Ratio and maximum drawdown. The goal is not to catch every trade, but to ensure that the trades you do take occur in the highest-quality macro environment the S2F model can identify. All of this is configurable through Arrow Algo’s visual block builder with no code required.

What Are the Key Takeaways?

  • Stock to Flow measures scarcity: existing supply divided by annual new production. A higher ratio means greater scarcity.
  • Bitcoin’s S2F ratio roughly doubles at each halving event as the block reward — and therefore annual new supply — is cut in half.
  • Post-2024 halving, Bitcoin’s S2F ratio is approximately 120 — higher than gold’s historical ratio of 60–80.
  • S2F is a macro, long-horizon indicator. It describes cycle context, not short-term entry timing.
  • The most practical use is as a regime filter: only allow trend-following entries when the S2F regime is supportive (high and rising).
  • In Arrow Algo, the stocktoflow block outputs the current ratio — combine it with a trend indicator and AND logic to build a macro-filtered strategy with no code.
Educational disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results.

Disclaimer: The information provided in this article is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.

Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who’ve made the switch to systematic trading.

About the Author

Author Bio