没有不值得去解决的问题,也没有不值得去学习的技术!

From Sentiment Grids to Simulated Trading: A Complete Research Record of a Crypto Grid Strategy

Cryptocurrency grid strategy research illustration showing price movements, grid levels, historical backtesting, and paper trading.

作者:

在

Preface: An Idea About Automated Cryptocurrency Trading

I have long been interested in the cryptocurrency market and trading strategies.

After some earlier experience with virtual currency trading, I gradually realized that relying solely on judging market direction and chasing short-term moves makes it very hard to build a stable, sustainable trading system.

So I began thinking about a question:

Can I use market sentiment indicators and a grid trading mechanism to build an automated trading strategy that runs over the long term with as little manual intervention as possible?

The initial concept was fairly simple:

  • Go long when the market is extremely pessimistic.
  • Go short when the market is extremely greedy.
  • Do not rely on short-term price prediction; instead, capture the returns generated by price fluctuations through grid trading.
  • Use a wide price range to reduce the probability that the price breaks out of the range in the short term.
  • Use automated trading to reduce the need for constant market monitoring.

I had previously also discussed using the Fear and Greed Index as a trading signal—for example, switching trade direction only after the corresponding sentiment threshold had been reached for two consecutive days.

But that was only the initial strategy concept. To actually implement it, I still had to resolve issues such as grid parameters, capital allocation, trading fees, capital utilization, and redemption delays.

So I began working through these step by step with the help of ChatGPT and Python.

1. Setting the Baseline Grid Trading Plan

The first thing to settle was the basic parameters of the grid trading setup.

I mainly considered the following questions:

  1. Fixed price range or moving grid?
  2. Arithmetic grid or geometric grid?
  3. How many grid levels should be set?
  4. How to avoid fees becoming excessive because the grid is too dense?
  5. How to improve idle capital utilization while maintaining trading activity?

In the end, the research gradually converged on a plan with a fixed wide price range and a geometric grid.

A geometric grid keeps the same price ratio between adjacent grid levels, rather than the same absolute price difference.

For cryptocurrencies at different price levels, this makes it easier to compare the theoretical return per grid level.

At the same time, I did not want all of the capital to sit in the market waiting for fills indefinitely.

If orders far from the current market price temporarily had no chance of being filled, could the corresponding idle capital earn extra returns through the exchange’s Simple Earn product?

This led to another focus of this round of research: combining a spot grid with Simple Earn.

2. Researching Simple Earn and the Active Price Range

Among OKX’s spot grid strategies, there is a feature worth studying:

Simple Earn allocation.

Once enabled, the strategy does not have to keep all orders active across the entire price range at all times.

Orders near the current market price keep running, while the more distant idle capital can be moved into Simple Earn and redeemed when new orders need to be placed.

This raised a new question:

How wide should the active price range be?

If the active range is too wide, more capital goes into grid orders, leaving less for Simple Earn.

If the active range is too narrow, the proportion of idle capital increases, but grid fill opportunities may decrease.

I therefore focused on comparing two parameters:

  • 5% above and below.
  • 10% above and below.

The goal was to find a reasonably balanced trade-off between grid returns and idle-capital returns.

3. Backtesting with Historical Data

To avoid choosing parameters based purely on subjective judgment, I decided to run a historical backtest first.

This round focused on the ENS/USDT spot grid.

The main test conditions:

ParameterSetting
Historical data period2024-03-01 to 2025-02-28
Data interval1 hour
Initial capital3,000 USDT
Grid price range1–100 USDT
Number of grids250
Grid modeGeometric
Active range5% or 10% above and below
Earn assetUSDT
Earn interestCalculated with an hourly compounding model

I also considered different trading fee assumptions and different Simple Earn return assumptions.

Note that the historical rate data is only proxy data for Simple Earn returns, and does not equal the historical Simple Earn rates that a real account would actually have received.

3.1 Results Under the Instant Redemption Assumption

Under the instant redemption assumption, some results for the Maker fee scenario were as follows:

Metric5%10%
Net return21.15%21.17%
Maximum drawdown15.27%15.27%
Number of fills5,5225,544

The results show that the return for 10% is slightly higher than for 5%, but the gap is only 0.02 percentage points.

The maximum drawdown is identical for both parameters.

So it would be wrong to claim that either 5% or 10% is clearly superior to the other.

This also shows that comparing final returns alone is not enough; liquidity issues during the capital redemption process also need to be considered.

4. Adding a 1-Hour Redemption Delay Stress Test

This was a very important step in this round of research.

The earlier historical backtest used an instant redemption assumption.

In actual trading, however, capital in Simple Earn cannot necessarily return to the trading account immediately when needed.

If the market price moves quickly and the grid needs to place new orders while the corresponding capital is still in the redemption process, trading opportunities could be missed.

I therefore decided to add a stress test:

Assume that capital in Simple Earn has to wait 1 hour before a redemption arrives in the account.

The test focused on:

  1. After a redemption request is submitted, the capital cannot be used for trading immediately.
  2. While waiting for redemption, the principal still counts toward assets but earns no Simple Earn interest.
  3. Only after the capital arrives can it be used again for grid trading.
  4. If the capital is insufficient to support new buy orders, observe whether grid fills are affected.

This test covered 32 combinations in total, including:

  • Two active ranges: 5% and 10%.
  • Four Simple Earn yield capture rate assumptions: 0%, 25%, 50%, and 100%.
  • Two fee scenarios: Maker and Taker.
  • Two intra-candle price paths.

4.1 Stress Test Results

The test results:

  • 32/32 combinations completed.
  • Zero occurrences of insufficient buy-order capital caused by the redemption delay.
  • Zero occurrences of insufficient subscription capital.
  • No buy orders were found to be blocked by this 1-hour delay.
  • In this model, the number of fills, net return, and maximum drawdown were unchanged.

I further compared the difference in ending equity between 5% and 10%:

Earn yield capture rateMaker: 5% vs. 10%Taker: 5% vs. 10%
0%-0.675 USDT-0.551 USDT
25%+3.487 USDT+3.611 USDT
50%+7.726 USDT+7.850 USDT
100%+16.438 USDT+16.561 USDT

Positive numbers mean 5% outperformed 10%.

What can be seen:

  • Without counting Simple Earn returns, 10% has a slight edge.
  • Assuming some Simple Earn returns are captured, 5% starts to come out ahead.
  • The higher the capture rate of Simple Earn returns, the larger the gap between the two.

But note carefully: these capture rates are research assumptions, not a promise from OKX about actual account returns.

4.2 Interim Conclusion

After this stress test, I decided to provisionally adopt 5% as the priority parameter for further research.

This does not mean 5% has been proven optimal.

It is simply the choice more worth prioritizing for validation under the current research conditions.

Also, this test only shows that the modeled 1-hour redemption delay did not affect the results; it cannot be taken to mean that the exchange will never experience longer redemption delays.

5. Moving from Historical Backtesting to OKX Demo Trading

With the historical backtest done, I decided not to keep fine-tuning 5% versus 10%.

The reason is simple:

Historical data can never fully reflect future markets.

Even excellent backtest results do not guarantee that actual trading will reproduce them.

The next phase should therefore use the exchange’s demo trading to observe how the strategy behaves in a live trading environment.

I chose OKX demo trading rather than real capital.

The demo account has 5,000 USDT of available funds.

For the first batch I planned to pick five cryptocurrencies:

AssetTrading pairLowest priceHighest priceNumber of gridsInvestment
BTCBTC/USDT20,000200,000100800 USDT
ETHETH/USDT40020,000100800 USDT
SOLSOL/USDT202,000100800 USDT
DOGEDOGE/USDT0.011100800 USDT
UNIUNI/USDT1100100800 USDT

The five assets total 4,000 USDT invested, leaving 1,000 USDT in reserve.

All grids use geometric mode.

The price ranges here are the wide ranges adopted for the first round of demo testing; they do not imply that each of the five assets has passed its own full historical backtest.

5.1 Unified Simple Earn Parameters

All five assets use the same active price range settings:

  • Below current price: 5%.
  • Above current price: 5%.
  • Simple Earn allocation: enabled.
  • Profit reinvestment: disabled.
  • Grid price upward shift: disabled.
  • Grid price downward shift: disabled.

While setting this up, I noticed a detail worth highlighting:

OKX’s active price range percentage is calculated from the full span of the grid’s price range, not directly from the current price of the asset.

For example:

BTC’s grid range is 20,000–200,000 USDT, a total span of 180,000 USDT.

5% corresponds to 9,000 USDT.

When BTC is priced around 60,167 USDT, the active price range is roughly 51,167–69,167 USDT.

ETH’s grid range is 400–20,000 USDT, a total span of 19,600 USDT.

5% corresponds to 980 USDT.

When ETH is priced around 1,673.65 USDT, the active price range is roughly 693.65–2,653.65 USDT.

This also explains why using the same 5% parameter on different assets does not produce the same active price range.

6. Early Observations from Demo Trading

On November 30, 2026, I started creating the first batch of spot grid strategies in the OKX demo trading environment.

BTC/USDT was the first bot to go live.

The BTC strategy details show:

  • Investment amount: 800 USDT.
  • BTC currently held: 0.00852103 BTC.
  • USDT currently held: 65.61 USDT.
  • Simple Earn subscription record: 221.1 USDT.

This shows that, at least in the BTC demo strategy, the Simple Earn allocation has already triggered a subscription.

However, only a few minutes had passed at that point, so the earn income still showed zero.

Total returns were also slightly negative early on, and no grid profit had been generated yet.

This does not mean the strategy has failed.

Right after launch, holdings fluctuate with the market price, producing unrealized gains and losses, while grid profit only accumulates gradually as fills actually happen.

I therefore did not adjust the strategy based on a few minutes of gains and losses.

The other assets were set up step by step following the same research principles.

Note that the current stage is only a demo validation of a spot long grid combined with Simple Earn; the originally envisioned sentiment-signal-driven automatic direction switching and perpetual shorting system has not been implemented.

7. What Will I Focus on Observing Next?

Going forward, I do not plan to keep frequently tweaking the grid parameters; instead, I will let the demo strategies run for a while and accumulate enough data.

I will mainly watch the following metrics:

1. Grid Trading Performance

  • Actual number of fills per day.
  • Realized grid profit.
  • Distribution of buy and sell fills.
  • Trading fees.
  • Whether grid profit can cover the fees.

2. Simple Earn Performance

  • Actual subscription amounts.
  • Actual redemption amounts.
  • Time capital spends waiting for redemption.
  • Interest actually received.
  • Proportion of idle capital.

3. Overall Asset Performance

  • Total profit and loss.
  • Unrealized profit and loss.
  • Grid returns.
  • Simple Earn returns.
  • Position weight of each asset.
  • Maximum drawdown.

One thing to be especially careful about: do not look only at grid profit.

If the grid keeps buying while the market price keeps falling, the overall assets can still suffer substantial losses even though grid profit has been generated.

What really matters is the change in overall assets, not grid returns in isolation.

8. Remaining Open Issues

This strategy has not been fully validated yet.

At minimum, the following limitations remain:

  1. The historical backtest focused on ENS/USDT and cannot prove that the same parameters work for all five demo assets.
  2. The historical Simple Earn rates are only proxy data, not actual account returns.
  3. The 1-hour redemption delay is only a modeling assumption, not the exchange’s actual redemption commitment.
  4. Whether Simple Earn returns in the demo environment genuinely reflect real account returns still needs further observation.
  5. The five assets are strongly correlated with one another, so spreading across five assets should not be mistaken for adequate risk diversification.
  6. Once the fixed price range is broken by the market, the strategy may face a long period without normal grid fills.

Accordingly, it is still too early to conclude that this strategy can generate sustained profits.

9. Interim Summary

Looking back on this research—from the initial sentiment-grid concept, through the historical backtest, the Simple Earn and redemption-delay stress tests, and finally into OKX demo trading—I have in effect completed a fairly complete strategy research cycle.

This research made one point clearer to me:

A trading strategy cannot be judged on historical returns alone; capital utilization, trading costs, liquidity, redemption delays, and actual execution conditions all have to be considered.

I do not intend to put real capital in just because one historical backtest looked good.

The goal at this stage is to use demo trading to validate how the strategy behaves under real market price movements.

If the demo results differ noticeably from the historical research, the causes need to be analyzed—not the data or the interpretation tweaked to preserve the original conclusion.

If this strategy passes a sufficiently long demo validation, I will then consider whether moving on to small-scale real-capital testing is worthwhile.

For an individual independent developer, AI can help not only with writing code but also with data analysis, strategy modeling, historical backtesting, and research documentation.

This is also the direction I hope to keep exploring:

Using AI and automation tools so that one person can accomplish some of the research work that previously required a professional quant team.


Disclaimer: This article documents personal strategy research and a demo trading process; it is not investment advice. Historical backtest results do not represent future returns, and demo trading is not equivalent to real trading. The cryptocurrency market is highly volatile, and losses of the entire principal are possible.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系