Skip to content
Elliot's Harness Lab
Go back

Codex Series 01: I Gave an A-Share Account to AI. One Month Later, It Doubled

Vibe Coding

This is the first article in my Codex series.

I have been using Codex heavily for a while. It can write code, update a website, fix bugs, and handle plenty of tedious engineering work. But the question I care about is not really whether Codex can code. It is this:

Can Codex help me enter a field I do not understand and create value in the real world?

So I ran a slightly reckless experiment.

I funded a stock account and handed it to AI.

More precisely, I handed the experiment to Codex.

Let me be clear before going any further: this is not investment advice, a stock recommendation, or a tutorial on using AI to trade. I would not advise anyone to hand real money to AI the way I did. This is a record of my own Codex experiment. I wanted to know whether AI could expand my understanding of finance, help me develop a strategy, and perhaps even make money when I did not understand the short-term logic behind individual stock movements.

The result was that the account roughly doubled in about a month.

But the amount of money is not the most interesting part. What changed for me was my understanding of Codex’s limits.

Why I chose China’s A-share market

Honestly, I am not a stock expert.

I understand some business fundamentals and industry logic. But if you ask why a stock rose today, why it might fall tomorrow, or why one company in a sector hit its daily limit while another barely moved, I do not have that kind of intuition.

That was exactly why I wanted to test Codex here.

If I already know a field very well, AI will probably help me by making familiar work faster. I can write faster, research faster, and organize information faster.

But what happens when I do not know the field?

Can AI help me enter it more quickly, build an observation framework, and break down the questions I do not yet know how to ask? Can it at least help me avoid some unnecessary detours?

Finance is a useful environment for testing that question because it has:

Together, those conditions make it a good test for Codex. It cannot get away with sounding convincing. It has to turn an idea into data, code, rules, backtests, and an execution plan.

I gave Codex an intentionally broad objective

I did not begin by prescribing a specific strategy.

I did not ask it to find a particular factor. I did not tell it to build a momentum strategy. And I certainly did not ask which stock I should buy tomorrow.

Instead, I gave it a broad objective:

Help me develop an A-share quantitative strategy suited to my account size, trading habits, and risk expectations. Use data, backtesting, and continuous iteration to produce a strategy I can actually execute.

This is similar to how I set product direction for a team: define the result first instead of dictating the solution.

Then I let it move forward.

The first requirement was data.

Without data, there is no quantitative validation. Without validation, all that remains is intuition. I first asked GPT to recommend a reasonably priced data source and eventually chose Tushare. Once I had access, I gave the data requirements to Codex and asked it to build the data, backtesting, and strategy iteration loop.

I started a long-running Goal and let it work for a little over 24 hours.

During that time, it did much more than write a block of code. It kept working through an entire system:

I did comparatively little.

I provided the objective, capital, data, and feedback. Codex handled most of the strategy exploration, implementation, and backtest iteration.

That is what made the experiment interesting. I was not asking AI to complete a task whose answer I already knew. I was asking it to take me into a field I did not understand.

The first version started around May 23

The first version of the strategy began running around May 23.

The broader market was not rising in a straight line every day; there was volatility in the middle. It would be misleading to say the market window did not help. Still, what surprised me was how strongly some of the selected stocks performed relative to the rest of the market.

My original question had been simple:

Could AI help me understand finance faster and identify something useful in the data?

It did not only help me learn. It also helped me make money.

The shock was not that AI had somehow become a legendary stock picker.

I do not believe that doubling an account in one month proves a strategy will work over the long term. Short-term returns inevitably include luck, market conditions, the chosen sample window, and possibly overfitting.

But the experiment was still valuable.

It showed that Codex could do more than write quantitative finance code. In a field I did not understand, it could quickly build a scaffold for learning.

I began to understand which data mattered, how to read a backtest, how to think about stop losses, why return alone is insufficient, why maximum drawdown matters, and how A-share constraints such as daily price limits, T+1 settlement, suspensions, board lots, and liquidity change strategy results.

Learning all of this alone from scratch would have taken me much longer.

Codex turned it into a system I could run.

Return is feedback, not a conclusion

I know that “100% in one month” is an attention-grabbing number.

But I would rather treat the return as feedback than as a conclusion.

The feedback says that the strategy captured something during this particular market window.

It does not say that:

That is why I kept asking Codex to run more backtests, add real constraints, and encode risk controls into the strategy.

What I wanted was an AI that could help me test hypotheses.

The public repository includes one historical sample chart. It shows candidates generated after the close on May 25, 2026, uses the May 26 open as the reference execution price, and follows their performance over the next 20 trading days.

Forward return curves for BaiQuant candidates generated after the May 25, 2026 close

It is a beautiful chart.

But the chart is not the important part.

What matters is the loop behind it: form a hypothesis, acquire data, write code, backtest, revise the rules, produce an execution plan, and record the real outcome.

Codex’s value was not a one-off answer. It was its continued participation in the validation process.

BaiQuant is what the experiment left behind

The experiment eventually became an open-source project called BaiQuant.

I do not want this article to become a tour of the BaiQuant framework, though. The project is the result, not the starting point.

The starting point was this question:

When I do not understand a field, can Codex help me build understanding quickly and expose that understanding to real-world feedback?

BaiQuant is simply the first answer.

I open-sourced it to preserve the engineering traces of the process: how the data is ingested, how strategies are executed, how backtests are run, how risk becomes part of the rules, and how the public version separates private data from real account information.

It is not a tool that anyone can use to make guaranteed money.

It is a case study in what happens when one person gives an objective to AI, and the AI helps turn the objective into a system, the system into validation, and the validation into experience.

My new view of Codex

Before this experiment, I would have described Codex as a powerful AI coding tool.

Now I am more inclined to call it an exploration engine for real problems. It does not only write code. It can keep pushing a vague objective forward.

When you do not know where to begin, it starts decomposing the problem. It can work through data, backtesting, risk controls, constraints, and documentation one piece at a time.

That is why I want to write a Codex series.

I do not only want to publish installation guides and basic tutorials. Those are useful, but I am more interested in documenting what Codex can do inside real problems. Can it help someone enter a new field? Can it expand one person’s ability to execute? Can it turn a vague idea into a system that can be tested?

This A-share experiment is the first article.

I funded an account, defined the objective, trusted the AI, let it work for more than 24 hours, and evaluated it with a month of real feedback.

In the end, I made money, learned something, and produced an open-source project.

For me, that is already a meaningful form of value from Codex.

I will keep testing it

I am not going to conclude that AI can trade profitably and consistently because this account doubled once.

That would be naive.

I see it as a beginning.

I will keep asking Codex to validate the strategy over longer periods, different market regimes, different constraints, different risk targets, and different account sizes. It may continue making money. It may lose money. It may show that some rules only work temporarily.

All of those outcomes are useful.

The real subject of the experiment is not one stock strategy. It is the upper limit of AI in different professional settings.

If Codex can help me build understanding, generate a strategy, and receive real feedback in finance, a field I did not know, it may be able to do something similar in many other domains.

The point is not that AI traded stocks and made money for me.

It is this:

I gave a real problem to Codex, and it genuinely took me into a new field.


Working on Agent products, enterprise AI, or AI transformation?

I focus on design Agents , enterprise Harness / FDE , Agent frameworks , and AI Coding . If these are the problems you are working through, I am open to serious conversations.

About Elliot Bai
Share this post:

Previous
Loop Engineering in Practice: How I Let AI Work on Its Own in a Million-Scale ARR Product
Next
What Is Loop Engineering? What a Year of Building MewDesign Taught Me