Fruit-fly trader (8): The top-performing swarm turned a 5% gain into a 60% loss within 16 days once trading fees were applied
Since the complete wiring diagram of a fruit fly's brain was published, researchers and enthusiasts abroad have been racing to build "virtual fruit flies" inside computers — running games and simulations on them as a kind of trend. The Herald Business has been documenting its own experiment in which a reporter used a publicly available fruit-fly brain map to let virtual flies trade cryptocurrency. All trades were conducted as simulated transactions. This series is not intended as investment advice. [Editor's note]
A swarm of 30 virtual fruit flies that earned more than 5% while bitcoin was falling turned the same trading record into a nearly 60% loss once exchange fees were applied — in just 16 days.
After nearly a month of simulated bitcoin trading experiments with virtual fruit flies, the only strategy that avoided a loss even after paying fees was a single moving-average rule familiar to everyday investors. Even that rule could not beat simply buying bitcoin and holding it.
The experiment involved virtual fruit flies running on a PC, built from the fruit-fly brain wiring diagram completed by scientists in 2024. Chart data was converted into odor signals the flies could interpret, and the flies' responses were read as buy or sell orders.
The first experiment began Sept. 21, and 33 fruit-fly experiments were run over 27 days through Saturday.
30 virtual flies earn 5% while bitcoin falls
The best-performing strategy in the experiment was a swarm of 30 virtual fruit flies modeled on the insect's natural behavior of following wind-borne scents to find food.
Each time a large trade was executed on the market, the flies were treated as having detected a scent and were allowed to react in real time, second by second. The individual judgments of all 30 flies were then aggregated like a vote to determine whether to buy or sell.
As of Wednesday, the swarm had completed 689 trades and posted a final return of +5.42%. Had an investor simply bought and held bitcoin over the same period, the return would have been -4.85% — meaning the flies outperformed a buy-and-hold strategy by more than 10 percentage points while bitcoin was declining.
The profit per trade was extremely small. Of the 689 trades, 38% were profitable. The average gain per round trip was 0.0077%, with a median of -0.009%. Most trades resulted in small losses, but occasional larger gains made up the difference.
The swarm's returns were calculated on the assumption of a zero-fee exchange. Only the cost of the bid-ask spread was factored in; commissions were set to zero.
A 0.14% fee flips the return to -60%
On a domestic exchange, a single bitcoin round trip costs roughly 0.14% in total — a 0.05% commission charged twice (once to buy, once to sell) plus the bid-ask spread, which reflects the slight price slippage that occurs between placing an order and having it filled.
Before fees, the swarm's average gain per round trip was around 0.03% — less than a quarter of the 0.14% cost of trading.
When the 0.14% domestic exchange cost was applied to all 689 actual trades, the average result per round trip swung to a loss of 0.13%. The share of profitable trades fell from 38% to 9%.
Because the strategy reinvested the full balance on every trade, losses compounded quickly. After 16 days, the cumulative return came to -59.9% — 55 percentage points below simply holding bitcoin over the same period (-4.85%).
A separate test using actual domestic exchange order-book prices produced similar results. From Oct. 4 through Saturday, the swarm made 552 trades and returned -48.1%, far below the -4.5% that a bitcoin buy-and-hold would have yielded over the same stretch.
Other fruit-fly approaches fared no better. A single virtual fly modeled on fruit-fly behavior, and a statistical model incorporating fruit-fly characteristics, both eked out small gains on a zero-fee exchange but turned to losses once exchange costs were applied.
When the tabular virtual fly was retrained on Thursday to account for fees, its pre-fee average gain per round trip rose from 0.04% to 1.04%. The improvement was attributed to the fly having happened to ride an upward price trend rather than to any genuine improvement in trading skill.
No method could generate realistic profits
Only one approach avoided a loss under the assumption that fees were actually paid. On Thursday, 50 combinations were backtested against historical charts — 10 fee-resistance methods applied to each of five trading strategies.
Three of the five strategies were the 30-fly vote, the tabular virtual fly, and the statistical model incorporating fruit-fly characteristics. The fee-resistance methods included tightening the buy and sell thresholds by the amount of the fee, and allowing a trade only when the historical gain from the same signal exceeded the fee.
Thirty of the 50 modified strategies failed to clear any preset benchmark. The seven that did pass were all based on rules unrelated to virtual fruit flies.
Unlike the 30 virtual fruit flies that traded second by second, the rule that cleared the benchmark checks the chart just once a day.
The method counts how many of bitcoin's 50-day, 100-day, 140-day and 200-day moving averages the closing price on Thursday exceeded, then sets the investment allocation accordingly — 100% if the price is above all four averages, 50% if it is above two. It is, in effect, a straightforward application of the moving averages that ordinary investors routinely consult.
The allocation changes about 29 times a year, far fewer than the roughly 40 round trips a day made by the 30-fly swarm.
Even the fee-resistant strategy could not outperform simply holding bitcoin. Backtested against historical charts from 2023 through this October, it returned 386% — below the 448% that a buy-and-hold would have produced over the same period.
Its Sharpe ratio of 1.61 did exceed that of a bitcoin buy-and-hold (1.31), indicating better risk-adjusted performance. The strategy entered live simulated trading with fees applied on Thursday, but over six days it returned -0.81%, underperforming bitcoin's -0.33% over the same stretch.
One caveat: the fee-adjusted results for the 30-fly swarm were calculated by adding costs to the original trade prices rather than re-simulating execution, which limits their precision. The virtual flies are also a basic model that crudely mimics neurons, making it difficult to treat the results as a true measure of a real fruit fly's capabilities.
After nearly a month of experiments drawing on the fruit-fly brain wiring diagram, the insect's natural foraging behavior, reward-and-penalty learning, and a 30-fly voting mechanism, no method managed to outperform simply buying and holding bitcoin after accounting for trading fees.
This four-week Saturday-and-Sunday series documented an experiment in which a reporter built "virtual fruit flies" from a publicly available fruit-fly brain map and let them trade cryptocurrency directly.
dbsdn1110@heraldcorp.com