My First Quant Strategy
A 28% Win Rate Failure (And What I Learned)
Note: This is a detailed breakdown of my first solo trading strategy backtest. It failed and isn’t perfect. But I'm sharing it anyway because I think I learnt quite a lot from the process and would definitely get experts opinions and how they navigate theirs too. This is what the real process looks like for beginners: data scrapping issues, vpn restrictions, statiistics and probability yadayada, etc.
The Assignment
Build and backtest a complete trading strategy for a low-cap altcoin. Pick one of two approaches: momentum scalper or contrarian sniper. Document everything. Be honest about results.
I chose the momentum scalper approach.
1. Picking the Coin
Token: $UFD (Unicorn Fart Dust)
Where it trades: MEXC
Why I picked it: I’ve seen a trader on X post about the token often. Also it fits well in the low cap altcoin category with $9M FDV as at time of writing.
Side note: Data engineering is 60% of the job. You’ll spend a surprising amount of time just getting data pipelines to work correctly before any analysis begins.
2. The Data Collection Hassle.
Attempt 1: MEXC API
First challenge: their klines endpoint (1hr candle) is written as 60m instead of the standard 1h.
Second challenge: they only give 500 candles at a time. They limit how far back their klines go for tokens, or the endtime parameter isn’t paginating backwards properly.
Third challenge: they return 8 columns (fields) instead of standard 12 — open time, open price, high price, low price, close price, volume (in UFD tokens), close time, and quote volume (in USDT - dollar value traded).
The code I tried opens the album at present page and grabs the last 500 hourly candles. It then looks at the oldest candle in the batch and asks for the 500 candles before it. It keeps doing that — grab 500, step back, grab 500, etc — until MEXC has no more data or it gets to UFD launch date.
The endtime variable is the key mechanism.
Lesson learned: Data availability is a hard constraint. You can’t backtest what doesn’t exist.
Attempt 2: CoinGecko + DEXScreener
The MEXC retrieval method didn’t work. So I switched to using CoinGecko free API and DEXScreener manual export.
Two endpoints: CoinGecko gives us the OHLC candles per day, while DEXScreener gives daily trading volume in USD.
Important: CoinGecko has two separate API environments — pro-api for paid users and api for demo/free users. CoinGecko free offers only 365 days of data. They also compress their data for free tier into 4-day interval candles if you request over 90 days. This means the candles i worked with are 4-day PA in a candle.
I noticed that one of the hardest things when doing anything is data access — getting these data and working with them comes with tons of restrictions. Binance API for one isn’t allowed for my Nigerians.
Lesson learned: Never share API keys publicly, especially for paid services. Anyone can use it and burn through your credits.
3. Understanding the Asset
Lesson learned: A downtrending asset isn’t automatically bad for a momentum scalper.
In a sustained downtrend, most volume spikes are capitulation events — meaning panicked holders finally giving up and selling at once. That’s a massive dump candle with huge volume. Volume spike in a downtrend is more likely sellers than buyers — unless price action on that same candle tells a different story.
Simply put: Volume alone tells you nothing. Volume + price direction together tells you everything.
4. Building the Entry System
Volume spike + price CLOSES UP = buyers are in control = potential entry signal
Volume spike + price CLOSES DOWN = sellers dumping = stay away
Volume spike + price barely moves = absorption = someone big is accumulating quietly
Support level is a price floor that’s been tested and held before.
Entry Signal Conditions:
- Price is at or near a known support level
- Volume spike occurs significantly above average
- Candle closes up (buyers won the candle)
- Price is showing a reversal pattern off that support
Note on compression stage: Small candles, lower volume, tight range — often precedes a directional move.
5. The Strategy Rules
Entry Rules:
- Price must be trading within identified demand zone (support at $0.008)
- Volume must be >=1.5x the 20-period average volume
- Bullish candle close (candle must close above its open)
- Trend filter — closing above the previous candle’s close for at least 1 consecutive candle
Entry should be at the opening of the candle immediately following the signal. If price is 5% above signal close, skip the trade (don’t chase).
Exit Rules:
- Take Profit: 10-15%
- Stop Loss: 5-7% (allows the noisy asset breathe without allowing small losses to turn huge losses)
Exit Trigger:
If a high volume bearish candle (down, vol >= 1.5x average) appears after entry.
Capital preservation comes first.
6. Position Sizing Logic
For position sizing, answer these questions:
- What’s the type of asset?
- How much of your portfolio are you risking?
- What’s the stop loss (how much you’re willing to lose)?
- How much would a streak of losses cost you if it were to happen?
For UFD (a memecoin), a 5% risk per trade with a 7% stop loss means the actual capital at risk is 0.35% max loss per trade. I assumed a portfolio of $10k.
This keeps individual losses small enough that a streak of 5 losses only costs 1.75% total capital (which is survivable and recoverable).
7. Expected Performance
Expected win rate: 45-55%
Risk/Reward ratio: 2.14:1 (TP of 15% / SL of 7% = 2.14)
Expected Value: (55% × 15%) - (45% × 7%) = 8.25% - 3.15% = +5.1%
A positive EV means the strategy is theoretically profitable over a large number of trades even at a 55% win rate.
That’s the power of asymmetric R:R — you don’t need to be right most of the time, just have your wins bigger than your losses.
EV is the most important idea in all of quantitative trading.
8. The Reality Check
What we ran: We eventually took off the volume criteria because the strict filter gave us too small a sample size, and it fetched us just 28% win rate for 25 trades.
9. Understanding Breakeven Win Rate
How to calculate Breakeven Win Rate:
BWR = SL% / (TP% + SL%)
BWR = 7 / (7 + 15)
BWR = 31.8%
This means we need at least 31.8% of trades just to breakeven with the R:R setup (2.14:1).
Our actual 28% is below this threshold.
10. The Statistical Analysis
Statistics scripts calculate:
Standard Error (SE): How reliable your win rate estimate is given the sample size. With just 25 trades, there’s meaningful uncertainty.
95% Confidence Interval: Gives the range where the true win rate likely lives. This is more honest than stating a single number.
Binomial test: Answers the most important question in backtesting — could these results have happened by random chance?
We test against 2 benchmarks: a 50% coin flip, and the 31.8% breakeven rate.
11. The Results
Expected Value of 28% win rate was negative: -0.84% per trade.
Standard Error:
SE = √(winrate × (1-winrate) / n)
SE = √(0.28 × 0.72 / 25)
SE = 0.0898 (8.9%)
This means our win rate estimate of 28% has an uncertainty of ±8.98% due to small sample size of 25 trades.
95% Confidence Interval:
CI = winrate ± (1.96 × SE)
CI = 28% ± (1.96 × 8.98%)
CI = [10.4%, 45.6%]
We are 95% confident the true win rate lies between 10.4% and 45.6%.
The breakeven win rate (31.8%) falls inside the confidence interval. So we can’t definitively say if the strategy beats or fails breakeven.
Binomial probability test vs 50% (p = 0.0145):
Null hypothesis: true win rate = 50%
Observed: 7 out of 25 wins
P(≤7 wins | p=0.5): 0.0145 (1.45%)
Verdict: Statistically significant (p < 0.05)
What does it mean? The below 5% threshold shows the result is statistically significant — meaning the strategy is indeed doing something and isn’t just random. Only that it’s doing something that loses you money.
It can be interpreted that there’s only a 1.45% chance that you’d get 7 or fewer wins out of 25 trades if the strategy were just a coin flip.
Binomial test vs breakeven, 31.8% (p = 0.3825):
This means there’s a 38% chance that I’d see these results even if the strategy were operating at exactly breakeven.
That’s above 5% and means that we cannot statistically prove the strategy fails breakeven. We need more data.
12. What I Learned
L1 - Never run code you don’t understand.
L2 - Data availability is a hard constraint. You can’t backtest what doesn’t exist.
L3 - Never share API keys publicly, especially for paid services. Anyone can use it and burn through your credits.
L4 - A downtrending asset isn’t automatically bad for a momentum scalper.
L5 - In a sustained downtrend, most volume spikes are capitulation events — meaning panicked holders finally giving up and selling at once. Volume spike in a downtrend is more likely sellers than buyers — unless price action on that same candle tells a different story.
Simply put: Volume alone tells you nothing. Volume + price direction together tells you everything.
13. The Honest Conclusion
This strategy failed.
28% win rate with a 2.14:1 R:R produces negative expected value. Even with the favorable risk/reward ratio, I’m not winning enough trades to overcome the losses.
The confidence interval is too wide ([10.4%, 45.6%]) to make definitive conclusions with only 25 trades. The true win rate could be anywhere in that range.
The binomial test vs breakeven (p = 0.3825) tells us we can’t prove this strategy is worse than breakeven — but we also can’t prove it’s better. It’s inconclusive.
Would I trade this with real money? No.
Why not? Negative EV, small sample size, wide confidence interval, and actual performance below breakeven threshold.
What’s next? Either gather more data to reach 50+ trades for statistical confidence, or redesign the strategy with stricter filters even if it means fewer trade opportunities.
14. Final Thoughts
Most traders never backtest. Most who backtest never use statistics. Most who use statistics aren’t honest about failures.
This was my first independent quantitative trading strategy. It failed by the numbers. But I learned more from this failure than I would have from a lucky winning streak.
The math doesn’t lie. The statistics don’t care about my ego. And that’s exactly why they’re valuable.
On to the next one.
Tools used: CoinGecko API and Python for statistical parts.
Sample size: 25 trades
Result: Unprofitable (negative EV), mostly because of low data collected and choice of strategy.
Confidence: Low (need more data)
This is part of my journey learning quant trading from scratch. I am open to tips, simplified tools or materials or just about anything that can help if you’ve got one.
If you have questions and thoughts for me, feel free to lemme know in the comments.


Good job
this is epic 🔥🔥🔥🔥
Thanks for this wonderful guide