Millet Porridge

English version of https://corvo.myseu.cn

0%

Treasury Reverse Repo Auto-Ordering: Broker Feature or DIY with QMT?

Conclusion first: if you only occasionally do treasury reverse repos, the broker’s built-in auto-ordering feature is worry-free and worth trading service fees for convenience; but if you use larger idle funds for 1-day reverse repos every day, the extra service fees become a continuous transaction friction.

The two broker auto-ordering pages I saw had rates of:

1
2
Auto scheme A: 0.003%, charging 3 yuan per 100k yuan
Auto scheme B: 0.0035%, charging 3.5 yuan per 100k yuan

While a common manual commission example for 1-day treasury reverse repos is:

1
Manual ordering: 0.001%, charging 1 yuan per 100k yuan

Estimating with 240 trading days a year, doing 1-day reverse repos with 100k yuan daily:

Method Fee per time Annual fee
Manual ordering 1 yuan 240 yuan
Auto scheme A 3 yuan 720 yuan
Auto scheme B 3.5 yuan 840 yuan

That is, per 100k yuan you may pay an extra 480 to 600 yuan a year. With 1 million yuan, that’s 4,800 to 6,000 yuan.

This is the main reason I didn’t directly turn on the broker’s auto-ordering, but considered building my own automation with QMT and Python.

This article merely records my calculations and implementation ideas and constitutes no investment advice. Commissions may differ by broker, account, and reverse repo term; please defer to your broker’s latest fee schedule and actual settlement statements.


Where Is the Broker’s Auto-Ordering Expensive?

Broker auto-ordering solves the “remembering to operate every day” problem. It typically checks the account’s available funds at a set time, deducts the user-configured reserve amount, then uses the remaining funds for treasury reverse repos. Some features also judge whether returns cover the fees, or automatically cancel unfilled orders.

Such features’ biggest advantage is being worry-free: no code to write, no QMT to maintain, no worry about the program disconnecting.

But the problem is right there: it turns “worry-free” into an extra paid service.

The two images below are broker page screenshots I saw. Because the originals are very long phone screenshots, only the key fee-rate areas are shown here; click the images to view the full screenshots.

Broker balance-management auto-ordering fee description, showing auto-ordering rate 0.003%, charging 3 yuan per 100k yuan
Scheme A: 0.003% Charges 3 yuan per 100k yuan; the page notes it already includes the original manual-ordering commission rate.
Broker auto-ordering setup page risk notice, showing per-order fee 0.0035%, including 0.001% commission and 0.0025% feature service fee
Scheme B: 0.0035% Charges 3.5 yuan per 100k yuan, including 0.001% commission and 0.0025% feature service fee.

An extra 2 or 2.5 yuan per time doesn’t look like much. But if 1-day reverse repos are done daily, frequency amplifies small fees.

Auto frequency Example annual trades Scheme A extra fee / 100k yuan Scheme B extra fee / 100k yuan
Once per half year 2 4 yuan 5 yuan
Once per month 12 24 yuan 30 yuan
Once per week 52 104 yuan 130 yuan
Once per trading day 240 480 yuan 600 yuan

So the key isn’t “whether the broker’s auto feature is usable”, but whether your usage frequency and capital scale make it worth paying for.


In a Low-Rate Environment, Fees Stand Out More

Suppose 100k yuan does a 1-day reverse repo at a filled annualized rate of 1.5%. Roughly calculated on a 365-day basis:

1
Gross return = 100000 × 1.5% ÷ 365 ≈ 4.11 yuan

After deducting fees:

Ordering method Gross return Fee Net return
Manual ordering 4.11 yuan 1 yuan 3.11 yuan
Auto scheme A 4.11 yuan 3 yuan 1.11 yuan
Auto scheme B 4.11 yuan 3.5 yuan 0.61 yuan

This is why I care about this matter.

Auto-ordering is of course not forever unprofitable. For example, before holidays, 1-day products may earn multiple actual interest days, when the fee proportion drops. But on the many ordinary trading days — especially when rates are low — the auto service fee eats a considerable part of the net return.


When to Use the Broker Feature, When to DIY?

My judgment is simple:

Scenario Better suited to
Low-frequency operations, small capital, just want worry-free Broker auto-ordering
Unfamiliar with Python, unwilling to maintain Windows / QMT Broker auto-ordering
Larger idle funds every day DIY program with QMT
Already have QMT, Python, logging and notification systems DIY program with QMT
Want to compare SH/SZ rates, set dynamic thresholds, integrate custom notifications DIY program with QMT

In other words, the broker feature sells convenience; a DIY program buys control.

If someone doesn’t normally write programs and has no long-running trading terminal, building a system to save a few hundred yuan a year per 100k may not pay off. But if you already have QMT and an automation environment, reverse repo auto-ordering is just connecting one more segment to existing capabilities.

For me, it’s not only saving service fees — more importantly it makes account fund management observable, traceable and controllable.


My QMT Implementation Approach

The complete code is in this Gist; I suggest letting AI read it through for you:

https://gist.github.com/corvofeng/5870cf0357600293e7ebee9d2237b182

The program’s core goal is single: at a fixed time daily, check the account; if conditions are suitable, put idle funds into 1-day reverse repos; if not suitable, record the reason and skip.

The rough flow:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Start strategy
├─ Subscribe to SH/SZ 1-day reverse repo quotes
├─ Bind the account
└─ Register the daily scheduled task

Scheduled trigger
├─ Check whether it's a trading day and allowed time
├─ Check whether today's run already happened
├─ Query available funds
├─ Deduct reserved cash and safety buffer
├─ Compare SH/SZ reverse repo rates
├─ Judge whether above the minimum rate threshold
└─ Submit the order or skip

After ordering
├─ Record order status
├─ Record fill results
├─ Handle failure reasons
└─ Send notifications

What really matters here isn’t “being able to call the ordering API”, but these protections:

  • Don’t sweep all available account funds in — reserve cash and a safety buffer;
  • Round the order amount DOWN to compliant trading units;
  • First verify order quantity, buy/sell direction, price fields and fees live with the minimum amount;
  • Use a day-unique remark, same-day order queries, and in-memory state together to prevent duplicate orders;
  • Distinguish “triggered”, “submitted”, “filled”, “failed” — don’t treat a submission request as a fill result;
  • Integrate notifications so insufficient funds, rates too low, order failures, partial fills etc. can all be seen;
  • Enable simulation mode by default; gradually raise the maximum trade amount after stabilizing.

What automated trading fears most isn’t a program that can’t order — it’s a program too eager to order. Cash management tools should pursue reliability, not cleverness.


Summary

The broker’s auto reverse repo feature isn’t bad. Its essence: users pay extra service fees in exchange for no development, no maintenance, and no need to remember daily operations.

At low frequency, this exchange is very reasonable — per 100k yuan you may spend only a few to a few dozen extra yuan a year.

But doing 1-day reverse repos daily makes the extra fees continuous. Estimating 240 trading days, per 100k yuan you may pay 480 to 600 yuan more per year than manual; 1 million yuan may pay 4,800 to 6,000 more.

So my choice: without an existing automation environment, use the broker feature for peace of mind; with QMT, Python and a notification system already in place, DIY and bring this transaction friction down.

Treasury reverse repos themselves are just a tiny feature, but behind them lies the same question: trading returns come not only from judgment but from reducing unnecessary friction. The service fees saved, the execution chain recorded, the anomalies intercepted in advance — they all eventually become part of the system.


References

  1. Xuntou QMT built-in Python knowledge base, ContextInfo.run_time() timer and Python API documentation:
    https://docs.thinktrader.net/vip/QMT/

  2. Xuntou system function documentation, ContextInfo.run_time():
    https://dict.thinktrader.net/innerApi/system_function.html

  3. Xuntou QMT official website:
    https://www.thinktrader.net/

  4. Ping An Securities investor education page, treasury reverse repo fee example: 1 yuan per 100k for 1-day:
    https://m.stock.pingan.com/omm/mobile/zixun/m.html?adid=1000000000007387&id=1000016796&infid=1000016797

  5. Securities Times report on treasury reverse repo fees and interest rules:
    https://stcn.com/article/detail/1504170.html

  6. SSE explanation of the new bond pledged repo rules effective May 22, 2017, mentioning the annual interest-day count changing from 360 to 365 days, with interest calculated by actual days funds are occupied:
    https://www.sse.com.cn/aboutus/mediacenter/hotandd/c/c_20170519_4313753.shtml

  7. In the SZSE “Bond Trading Implementation Rules” formulas, the repo repurchase price is calculated as actual occupied days / 365:
    https://docs.static.szse.cn/www/disclosure/notice/W020210512409004773670.pdf

  8. The broker auto-service rates, auto-cancellation and minimum order rate descriptions in this article come from screenshots of broker feature pages within the author’s account. They may differ by broker and account.