Id like to do a backtest with performance filters that i can easily use from finviz to scan, like "price crossed xxSMA" or xxSMA crossed xxSMA", with a combination of other filters too but not too crazy... just something to narrow down the scope a bit and focus on relatively strong, more liquid stocks, can you help me come up with some combinations to backtest?
3/6/2026 10:29am
You can absolutely do that, and it’s a good idea: define a **Finviz-friendly filter set**, then backtest the underlying logic on historical data.
Below I’ll:
1. Propose a **baseline Finviz filter** you can keep on all the time (liquidity, quality).
2. Give you **4 concrete strategy templates** built from:
- “Price crossed xxSMA”
- “xxSMA crossed xxSMA”
- Simple **performance filters** (Finviz “Performance” fields, RSI, etc.).
3. For each, I’ll describe:
- How to set it up in **Finviz**.
- How we’d translate it into a **backtest rule** (entry/exit).
You can then tell me which one you want to actually backtest first (and on what universe).
---
## 1. Baseline Finviz filter (for all strategies)
Assumptions (so we don’t have to keep asking):
- **Universe:** U.S. listed stocks.
- **Timeframe:** Daily bars, swing to position trades (weeks–months).
- **Direction:** Long-only.
- **Execution convention:** Signal on day’s close → trade at **next day’s open** in backtest.
**Baseline Finviz settings** you can apply across all ideas:
- **Descriptive**
- Exchange: `NYSE`, `NASDAQ` (you can include AMEX if you want, but I’d skip it for now).
- Country: `USA` (optional but often useful).
- Market Cap: `Mid ($2B+)` or `Large ($10B+)`
→ keeps you in larger, more institutionally owned names.
- **Price & Liquidity**
- Price: `Over $10` or `Over $20`
→ avoids tiny, illiquid names with huge spreads.
- Average Volume: `Over 1M` (or `Over 500K` if you want more names).
- Relative Volume: `Over 1` (optional; for more active names).
- **Optional basic quality**
- EPS growth next 5 years: `Positive`
- Return on Equity: `Positive` or `Over 10%`.
You can treat this as your **“base universe”**. Everything below just adds **technical/performance filters** on top.
---
## 2. Strategy 1 – Golden Cross + Momentum filter
**Idea:** Own stocks where the **50-day SMA has crossed above the 200-day SMA** (golden cross) and price is holding above both, with decent medium-term performance.
### 2.1 Finviz filter setup
On top of the baseline:
- **Technical**
- 50-Day Simple Moving Average: `Price above SMA50`
- 200-Day Simple Moving Average: `Price above SMA200`
- (If available in your Finviz version) Pattern: `SMA50 crossed SMA200`
If that’s not available, we approximate with:
- `SMA50 above SMA200` (trend is already golden-crossed).
- **Performance**
- Performance Quarter: `Up more than 5%` (or 10%, depending on how selective you want).
- Performance Year: `Up more than 15–20%` (optional; confirms longer-term strength).
This finds **established uptrends** with a golden cross and positive recent performance.
### 2.2 Backtest rule translation
**Universe:** Baseline filters + above technical/performance rules.
**Entry (signal day = close, trade at next open):**
- A stock that previously did **not** satisfy `SMA50 > SMA200 & price > SMA50 & price > SMA200`
- Now **starts** satisfying all of them and meets the performance filters.
**Exit:**
Choose one of:
- **Trend break exit (simple):**
- Exit when **price closes below SMA50**, or
- More conservative: exit only when **price closes below SMA200**.
- **Time/risk:**
- Add a stop-loss (e.g. **−15% from entry**).
- Optional: time stop (e.g. exit after 6 months if still held and conditions are neutral).
We can backtest this as:
- **Portfolio-style:** At each daily (or weekly) close, buy all new signals equally weighted, sell those that violate exit conditions.
---
## 3. Strategy 2 – Strong uptrend + pullback (buy the dip)
**Idea:** Focus on stocks in **clear long-term uptrends** that have had a **short-term pullback** and are now **reclaiming** a key SMA. This is closest to “price crossed xxSMA” from below.
### 3.1 Finviz filter setup
On top of baseline:
- **Trend filters**
- 50-Day SMA: `Price above SMA50`
- 200-Day SMA: `Price above SMA200`
- 50-Day SMA vs 200-Day SMA: `SMA50 above SMA200` (if available).
- **Performance**
- Performance Quarter: `Up more than 5%`
(still a strong intermediate trend)
- Performance Month: `Down` or `Down more than -5%`
(recent short-term pullback)
- Performance Week: `Up`
(starting to turn back up).
This approximates: **long-term up, short-term pullback, very recent bounce**.
### 3.2 Backtest rule translation
**Entry idea: price reclaiming SMA20 or SMA50 after a dip.**
For backtesting, we’d define concrete rules:
- **Entry:**
- Long-term trend: `SMA50 > SMA200` and `close > SMA200`.
- Short-term pullback: over the past M days (e.g. 10–20 days),
- price closed **below SMA20 or SMA50** at least once, and
- Performance Month < 0.
- **Signal bar:** today’s close **crosses back above SMA20 (or SMA50)** from below.
- **Exit:**
- Price closes **below SMA50** again, or
- Stop-loss (e.g. **−10–15%**), or
- Optional profit-take (e.g. **+25–30%**), or exit when price stretches to some % above SMA50.
Finviz can’t perfectly define the **“cross from below”** event, but your screener will find candidates matching the **state** (uptrend, recent pullback, starting to bounce). In backtest, we can model the cross exactly (prior-day vs current-day relation to SMA).
---
## 4. Strategy 3 – SMA20 reclaim after shakeout (short-term continuation)
**Idea:** More tactical: capture **short-term continuation** by buying when price **reclaims the 20-day SMA** in an overall uptrend. This is closer to your “price crossed xxSMA” concept, with a faster MA.
### 4.1 Finviz filter setup
On top of baseline:
- **Trend context**
- 50-Day SMA: `Price above SMA50`
- 200-Day SMA: `Price above SMA200`
- (Optionally) Performance Year: `Up more than 10–20%`.
- **Short-term behavior (approximate cross)**
Because Finviz can’t check the previous bar, we approximate:
- 20-Day SMA: `Price above SMA20`.
- Performance Month: `Down` or `Down more than -3%`.
- Performance Week: `Up`.
Interpretation: stock is in an uptrend, had a mild down month, and is up on the week with price now above SMA20.
### 4.2 Backtest rule translation
**Entry:**
- Uptrend: `SMA50 > SMA200` and `close > SMA200`.
- Yesterday: `close_yesterday < SMA20_yesterday`.
- Today: `close_today > SMA20_today`.
→ **Price has just crossed above SMA20 from below.**
**Exit:**
- Short-term trend break: `close < SMA20` (fast mean reversion), or
- Slightly slower: `close < SMA50`, or
- Fixed SL (e.g. −8–10%) and a modest TP (e.g. +15–20%), depending on how aggressive you want it.
This tends to produce **more trades**, shorter holding periods.
---
## 5. Strategy 4 – High RS breakout (near 52-week highs)
**Idea:** Focus on **relative strength leaders** breaking out upward. You can use Finviz’s **Performance** and **52-week High** fields for this.
### 5.1 Finviz filter setup
On top of baseline:
- **Performance / RS**
- Performance Year: `Up more than 30%`.
- Performance Quarter: `Up more than 10–15%`.
- Performance Month: `Up` (or `Up more than 5%` if you want only very strong names).
- **Technical levels**
- 50-Day SMA: `Price above SMA50`.
- 200-Day SMA: `Price above SMA200`.
- 52-Week High: `0–5% below High` or `New High`
(depending on how tight you want the breakout zone).
This gives you a **shortlist of liquid, high-momentum leaders** pushing new highs.
### 5.2 Backtest rule translation
**Entry:**
- Pick a **breakout trigger**, e.g.:
- Today’s close is **at a 52-week closing high**, and
- Volume today > 1.5 × 50-day average (you can’t formally filter this in Finviz, but we can add it in backtest), and
- Price > SMA50 & SMA200.
**Exit:**
- Trend break: close < SMA50, or
- More patient: close < SMA200, or
- Trailing stop (e.g. 20–25% from peak).
This is a **classic trend/momentum** breakout strategy.
---
## 6. How to use these practically
**In Finviz:**
1. Save your **baseline filter** (market cap, volume, price).
2. Save each of the 4 **technical/performance templates** as a separate screener preset:
- “Golden Cross Momentum”
- “Strong Uptrend Pullback”
- “SMA20 Reclaim”
- “Breakout Near 52-Week High”
Then:
- On your trading days, run a given preset.
- You’ll get a **manageable list** of candidates that match the state you want.
- For timing, you can:
- Enter at/near the next day’s open if the conditions still hold.
- Optionally check the chart to ensure the cross/breakout is actually happening (Finviz can’t see “yesterday vs today”).
**In backtesting:**
- We implement the **exact SMA cross / reclaim rule** on historical daily data (no Finviz limitations) with:
- Defined universe (e.g. S&P 500 or “U.S. stocks with mkt cap > $2B and avg vol > 1M”).
- Signal: SMA cross / reclaim event.
- Exits: SMA breaks, stops, etc.
- This lets us measure:
- Win rate, average trade, max drawdown, CAGR, etc.
- Sensitivity to thresholds (e.g. SMA20 vs SMA50, stop at 8% vs 15%, etc.)
---
## 7. Next step: which one do you want to test first?
If you tell me:
1. **Universe** for backtest (e.g. S&P 500 only, or all U.S. stocks with mkt cap > $2B and avg vol > 1M),
2. **Strategy template** from above you want to start with (1–4),
3. **Rough risk preference** (tighter SL / faster exits vs more patient),
I can formalize that strategy with precise rules (entries/exits, SL/TP) and then run a backtest for you over, say, the last 10–15 years to see how it behaves.