Rithik Singh
All work

QuantiFi · UTEFA algorithmic trading competition · 2025 · Python

Trend and momentum under a 0.5% fee

UTEFA's QuantiFi competition gave each team five synthetic stocks, three macro series, $100,000 and 252 trading days, with a 0.5% fee on every purchase and sale. Our strategy placed in the top 3. The fee shaped most of the choices below.

Question
Can a trend-and-momentum strategy stay profitable after a 0.5% fee on every trade?
Built
  • An EMA-crossover regime signal that moves between invested and cash, with momentum ranking into a three-stock basket and an ADX trend filter.
  • Volatility and ATR tilts on the weights, macro-sensitive exposure scaling, a 5% trailing stop and a 20-trade cap, all built to survive a 0.5% fee on every trade.
  • 144 parameter sets compared in a grid search, alongside bootstrap and correlated-GBM simulations.
Result
Third place, with a 24.3% simulated return and a 1.78 Sharpe over 252 trading days, net of fees.Team entry with Ethan Yang, Michael Xu and Sina Sharifi.
Stack
Python

The setup

UTEFA supplied the market and portfolio code, the dataset and the backtester. We wrote the strategy inside that framework: what to hold, how much, and when to get out.

The dataset had daily prices, volume and 10-day momentum for each stock, plus interest rates, economic growth and inflation.

Strategy

A regime signal decides whether to be invested at all. It tracks an equal-weighted index of the five stocks, buys when the 20-day EMA crosses above the 30-day EMA, and sells everything when it crosses back below.

On entry, stocks are ranked by 10-day momentum. Any stock with an ADX below 20 (a weak trend) or above 50 is skipped. The top three are bought at roughly equal weight, trimmed slightly for high volatility or a high ATR and raised slightly for low.

Macro data adjusts the amount deployed by up to 5%. Rising rates with high inflation, or slowing growth with high inflation, scale it down. Strong growth with low inflation and low rates raises the target, but buying is capped by available cash, so in practice that only shifts weight toward the top-ranked names. Each series is compared with its own running median, using only data available up to that day.

Keeping fees down

Each position has a 5% trailing stop from its peak, and the strategy stops trading after 20 trades, which puts a ceiling on total fees. Fees are tracked on every order, so each setup was judged on its return after costs.

Testing

A grid search compared 144 parameter sets, scoring each on Sharpe, return and fees against a benchmark, with Sharpe weighted most.

We also used Monte Carlo simulation to see how wide the range of outcomes could be on the five stocks: bootstrap resampling of daily returns with VaR and CVaR, correlated GBM paths built from the stocks' historical correlations, and a version conditioned on the macro regime. One version also took 30% off each stock's historical return in its expected-return and Sharpe estimates, as a deliberate guard against overfitting.

Limits

Everything here comes from one synthetic 252-day dataset. That is too short to show the strategy would hold up out of sample, and a parameter search can overfit it even with conservative scoring.

The fixed fee also leaves out spread, slippage and market impact, all of which real trading would add.