Frequently Asked Questions ========================== Answers to the most common questions from new Quantlens users. .. contents:: On this page :local: :depth: 1 ---- Backtesting ----------- **My strategy shows 500% total return — is that realistic?** Probably not for live trading. Very high returns in a backtest almost always indicate one of three things: 1. **Overfitting** — the parameters were tuned too precisely to historical data and won't hold in the future. 2. **Survivorship bias** — the dataset only includes stocks that survived, excluding companies that went bankrupt. 3. **Look-ahead bias** — the strategy inadvertently "saw" future data (check your offset values). A realistic Sharpe Ratio is 0.8–1.5 for a robust strategy. A Sharpe above 2.5 is worth investigating carefully. ---- **Why does my backtest show 0 trades?** Common causes: - The :ref:`config` block's start/end dates don't overlap with available data. - The entry condition is never true — check that your indicators produce valid values (e.g. RSI needs at least ``period + 1`` bars of data before it outputs a number). - The **Trading Loop** or **On Interval** blocks are missing or incorrectly nested. - Stop-loss is set very low (e.g. ``0.001``), causing immediate exit before any meaningful holding period. ---- **Why is my backtest much worse than the example strategies?** Possible reasons: - **Date range** — some periods are genuinely better for certain strategies. Try extending the test range. - **Commission and slippage** — even small fees compound over hundreds of trades. Try setting commission to ``0`` temporarily to isolate its impact. - **Too many slots** — more positions = more diversification = lower individual position sizes = less impact from any single win. - **Mean-reversion in a trending market** — RSI strategies underperform during strong bull markets where RSI stays elevated. ---- **Does a longer backtest period always give more reliable results?** Longer is generally better — more trades means more statistical significance. Aim for at least **100–200 completed trades** before trusting a metric. However, very old data (pre-2000) may include market regimes that no longer exist. ---- **My strategy wins 30% of the time — is it broken?** Not necessarily. Trend-following strategies typically have low win rates (30–45%) but profit because the average winning trade is much larger than the average losing trade. Check the **Profit Factor** — if it's above 1.5, the strategy is extracting value even with a low win rate. ---- Results & Metrics ----------------- **What's a good Sharpe Ratio?** .. list-table:: :header-rows: 1 :widths: 25 75 * - Sharpe - Assessment * - < 0 - Losing money risk-adjusted. Don't trade this. * - 0 – 0.5 - Weak. Unlikely to survive real trading costs. * - 0.5 – 1.0 - Acceptable for some systematic strategies. * - 1.0 – 2.0 - Good. Worth further investigation. * - > 2.0 - Excellent — but verify it's not overfit. ---- **What's a good Max Drawdown?** There is no universal answer — it depends on your personal risk tolerance. A drawdown of **-20%** means your $10,000 portfolio temporarily fell to $8,000 before recovering. As a rough guide: - **< 15%** — Conservative. Suitable for most investors. - **15–30%** — Moderate. Requires discipline to hold through. - **30–50%** — Aggressive. Very difficult psychologically. - **> 50%** — Extremely high risk. Most real traders would quit before recovery. .. warning:: Backtested drawdowns are usually *underestimates* — live trading often produces deeper drawdowns due to execution slippage, bid-ask spreads, and illiquidity. ---- **The equity curve rises steadily then crashes at the end — why?** The strategy likely over-concentrated in a specific sector or period. Common causes: - **No market filter** — the portfolio was fully invested during a market crash (2008, 2020, 2022). - **Small out-of-sample period** — the last year of data is always unseen by the optimizer; performance degrades. Add ``Index Value > SMA(200)`` as a market filter to exit all positions when the broad market is in a downtrend. ---- **Sortino Ratio is higher than Sharpe — what does that mean?** It means your strategy's losses are actually small and infrequent — most of its volatility is on the *upside*. This is a good sign. Sortino penalises only downside volatility, so a Sortino > Sharpe indicates the strategy has an asymmetric return profile (many small losses, few large wins). ---- Strategy Building ----------------- **Can I use multiple indicators together?** Yes — connect them with AND/OR logic blocks. For example: ``RSI(14) < 30 AND MACD histogram > 0 AND Index > SMA(200)`` Each additional condition tightens your filter and reduces the number of trades. More conditions = fewer but (potentially) higher-quality trades. ---- **What's the difference between eod and sod execution?** - **eod** (end of day) — the trade executes at the closing price of the current bar. - **sod** (start of day) — the trade executes at the opening price of the next bar. ``eod`` slightly overstates performance (you can't actually trade the exact close in real time). ``sod`` is more realistic but adds one day of slippage. ---- **How does the Slots setting affect my strategy?** **Slots** is the maximum number of open positions at once. The portfolio allocates ``1 / slots`` to each position equally. - **5 slots:** each position = 20% of portfolio. More concentrated, higher risk/reward. - **20 slots:** each position = 5% of portfolio. More diversified, smoother equity curve. More slots generally reduces Max Drawdown but also reduces peak returns. ---- **Why should I use the Cooldown Filter?** Without it, a stock stopped out this week immediately becomes eligible for re-entry next week. This can trap you in a "death spiral" — buying a deteriorating stock, getting stopped, buying again, getting stopped again. The :ref:`stock_cooldown_filter` blocks stocks for N days after a stop-out, forcing the strategy to find different positions. ---- **What does the Offset parameter do on indicators?** Offset shifts the indicator value back in time. - ``Offset = 0`` → today's RSI value. - ``Offset = 1`` → yesterday's RSI value. Use offsets to compare values across time — e.g. ``RSI(14) Offset=0 > RSI(14) Offset=1`` is true when RSI is rising. ---- Account & Plans --------------- **How many backtests can I run per month?** .. list-table:: :header-rows: 1 :widths: 30 70 * - Plan - Monthly backtest limit * - Bronze - 50 * - Silver - 200 * - Gold - Unlimited The counter resets on the 1st of each month. See :doc:`plans_billing` for full plan details. ---- **Can I try the platform before paying?** Yes — new accounts automatically receive a **free Silver trial**. No credit card is required to activate it. ---- **I accidentally deleted my strategy — can I recover it?** Use the **Snapshot** feature to save checkpoints of your workspace before making major changes. If no snapshot was saved, the workspace cannot be recovered. Make it a habit: click **Save Snapshot** before editing any strategy you care about. ---- **The optimizer ran but all results look the same — why?** If all parameter combinations produce similar results, it usually means: 1. The strategy's performance doesn't depend heavily on those parameters (robust — a good sign). 2. The parameter range is too narrow. Try wider ranges (e.g. ``7, 14, 21, 28`` for RSI instead of ``13, 14, 15``). 3. The strategy has too few trades to distinguish between parameter sets reliably. ---- Troubleshooting --------------- **The page loads but the canvas is blank** - Hard-refresh the browser (Ctrl+Shift+R / Cmd+Shift+R). - Clear your browser cache. - Try a different browser (Chrome or Firefox recommended). ---- **My results disappeared after refreshing the page** Results are tied to the current workspace session. To save results permanently, use **Export PDF** or **Save Snapshot** before closing the tab. ---- **The backtest runs for a very long time** Long run times are usually caused by: - A very large date range (20+ years) combined with short intervals (``1d``). - Heavy use of multiple indicators with long periods (e.g. SMA(500)). - Complex nested conditions evaluated on every single bar. Try reducing the date range first, then simplify the strategy if needed. ---- Still have questions? Contact support at **hello@quantlens.io** or open a thread in the Community forum.