Trade Signals
Forward-Looking Signals
What it is. A composite verdict (BUY / HOLD / SELL) for each ticker, derived from five independent quant indicators that each capture a different market regime.
The indicators.
- RSI(14) — Wilder's Relative Strength Index. Below 30 = oversold (mean-reversion long); above 70 = overbought (mean-reversion short).
- Z-score (20d) — how many standard deviations price sits from its 20-day mean.
z = (P − μ20) / σ20. |z| > 1.5 flags a stretched move.
- Momentum — total % return over 20 / 60 / 120 trading days. Strong positive momentum is a trend-following long; strong negative is a short.
- 50/200 MA crossover — golden cross (50d > 200d) is a long-term bullish regime; death cross is bearish.
- Volatility regime — ratio of 20-day to 1-year annualized vol. > 1.4 = elevated risk; < 0.7 = compressed.
The score. Each indicator contributes ±25 / ±15 / ±10 points to a -100 to +100 composite. ≥ +35 → BUY, ≤ -35 → SELL, otherwise HOLD.
Trade levels. Entry zone, stop-loss, and target are sized using the 14-day ATR (Average True Range) so position risk is normalized across high- and low-vol stocks.
21-day forecast. Projects a price distribution using the lognormal / GBM model: ln(PT/P0) ~ N((μ − ½σ²)T, σ²T). Reports the median expected return and the 5th–95th percentile range.
Pairs Trading
Statistical Arbitrage
What it is. A market-neutral strategy that bets two highly co-moving stocks will revert toward their long-run spread, regardless of overall market direction.
How we run it.
- Compute pairwise daily-return correlations across your basket.
- Pick the pair with the highest ρ (must be ≥ 0.50 to be considered a real pair).
- Fit a hedge ratio β by OLS regression of
ln(PA) on ln(PB).
- Build the spread
S = ln(PA) − β · ln(PB) and z-score it on a 60-day rolling window.
The trade. When |z| > 1.5σ, the spread is statistically stretched. The signal: short the over-performer and go long the under-performer in proportions 1 : β. Unwind when z reverts to 0.
Overview
Risk-Adjusted Performance
What it is. A snapshot of how your portfolio has performed historically, after accounting for the risk you took to get there.
Key metrics.
- Annual Return — geometric mean daily return, annualized:
(1 + r̄)252 − 1.
- Annual Volatility — standard deviation of daily returns × √252.
- Sharpe Ratio —
(Return − Rf) / Volatility. Reward per unit of total risk. Above 1.0 is good, above 2.0 is excellent.
- Sortino Ratio — like Sharpe but only penalizes downside volatility, so it doesn't punish lucky upside.
- Max Drawdown — the worst peak-to-trough loss the portfolio would have suffered.
Frontier
Efficient Frontier (Markowitz)
What it is. Of all possible weight combinations, the frontier shows the ones that give the highest expected return for each level of risk. It comes from Harry Markowitz's 1952 Modern Portfolio Theory.
How we compute it. We generate 5,000 random weight vectors (long-only, summing to 1), and for each one calculate annualized return, volatility, and Sharpe. The upper-left edge of the cloud is the efficient frontier.
Two reference portfolios. Max Sharpe = best risk-adjusted return. Min Volatility = lowest possible variance.
Backtest
Benchmark Backtest
What it is. A side-by-side comparison: $1 invested in your portfolio versus $1 invested in the S&P 500 (^GSPC) over the same window.
How to read it. Where your line is above the benchmark, you outperformed; where it dips below, you trailed. The gap at the end is your total alpha for the period.
Caveat. Past performance is not predictive. Backtests assume zero transaction costs, taxes, and slippage.
Monte Carlo
Monte Carlo Simulation
What it is. A statistical "what if" — we simulate 1,000 possible futures for your portfolio over the chosen horizon and show the distribution of outcomes.
How we compute it. We take the historical mean-vector and covariance matrix, do a Cholesky decomposition, and generate correlated normal shocks each day. Then we compound them.
Reading the fan. The shaded band is the 5th-to-95th percentile. The center line is the median. Wider fans = more uncertainty.
Rebalancing
Drift vs Rebalancing
What it is. Without intervention, winners grow into a larger share of your book and your portfolio drifts away from your target weights. Rebalancing periodically sells winners and buys laggards to restore balance.
How we compute it. One path holds weights constant after launch (drift). The other resets weights back to the target on a monthly, quarterly, or yearly schedule. We compare ending value and risk.
Tradeoff. Rebalancing usually reduces volatility and can boost long-term Sharpe, at the cost of taxes and transaction friction.
Sector
Sector Exposure
What it is. The percentage of your capital sitting in each GICS sector (Technology, Financials, Healthcare, etc.).
Why it matters. Two portfolios with totally different tickers can be exposed to identical macro risks if they cluster in the same sector. A "diversified" book of 10 names that's 80% Tech isn't really diversified.
How we compute it. We pull each ticker's sector classification from Yahoo Finance and aggregate by your weights.
Risk Score
QPL Risk Index
What it is. A single 0–100 number designed to make portfolio risk legible at a glance. 0 is bond-like; 100 is highly speculative.
Formula. A weighted blend, normalized to a benchmark range:
raw = 0.40 · σ + 0.35 · |MaxDD|² + 0.25 · downsideDev
then mapped to 0–100. We also score the Max-Sharpe and Min-Vol portfolios so you can see how your current allocation compares.
Bands. 0–25 Conservative · 25–50 Balanced · 50–75 Aggressive · 75–100 Speculative.
Insight Engine
Auto-Generated Insights
What it is. The blue boxes under each chart turn the numbers into one or two sentences of plain English — flagging strong Sharpe ratios, deep drawdowns, sector concentration, weak diversification, and so on.
Think of them as a junior analyst's notes — useful as a starting point, not a substitute for judgment.
For educational and research use. Not investment advice. Market data via Yahoo Finance.