Methodology

Transparency matters. Here is exactly how every number on Clairvoyance is computed.

Data pipeline

Quotes and historical OHLCV are pulled from Yahoo Finance for NSE (suffix.NS) and BSE (.BO) tickers via server-side functions. Live quotes cache for 1 minute; daily candles cache for 6 hours so the dashboard refreshes through the trading day without hammering the upstream API. The NIFTY 50 universe is pre-curated for the dashboard, but you can search and analyze any listed ticker.

Descriptive analytics

  • Daily simple returns rₜ = (Pₜ − Pₜ₋₁) / Pₜ₋₁ over the last ~252 trading days.
  • Annualized return = mean(r) × 252; annualized volatility = stdev(r) × √252.
  • Sharpe ratio uses an Indian risk-free rate proxy of 6% annual.
  • Max drawdown computed on close-to-trough basis from the running peak.
  • Skewness and excess kurtosis use the standard sample estimators.
  • Value-at-Risk 95% (1-day) is the historical 5th-percentile loss; CVaR averages the tail.

Predictive analytics

Two complementary models are run for every stock:

  1. Linear regression forecast. Ordinary least squares fitted on the last 60 trading days, projected 30 sessions forward. The shaded band is the 95% prediction interval derived from the residual standard error and leverage of the future point.
  2. Monte Carlo simulation (GBM). 1,000 paths under a Geometric Brownian Motion: Sₜ₊₁ = Sₜ · exp((μ − ½σ²) + σZ), with μ and σ estimated from log-returns. We report the 5/50/95th-percentile cone and the empirical probability of finishing above today's close after 30 trading days.

Technical signals layer on top: 20/50/200-day SMA crossovers, EMA-20, RSI-14, MACD (12, 26, 9), and Bollinger bands (20, 2σ). The composite score weights these inputs into a transparent BUY / HOLD / SELL recommendation.

Prescriptive analytics

The portfolio optimizer applies Markowitz mean-variance optimization to your basket. We sample 4,000 random long-only weight vectors that sum to 1, compute each portfolio's expected return wᵀμ and volatility √(wᵀΣw) using the annualized covariance matrix Σ from 2 years of daily returns, then identify:

  • Max-Sharpe portfolio — the tangency portfolio maximizing (return − rf) / vol.
  • Min-volatility portfolio — the lowest-risk allocation.
  • Equal-weight benchmark — naive 1/N allocation, for comparison.

Random-search optimization is fast and approximates the efficient frontier well for baskets ≤ 10. For larger universes we'd swap in quadratic programming.

Disclaimers

Clairvoyance is an educational analytics platform. Forecasts are statistical projections based on historical data and assume returns are stationary — they do not account for earnings, macro shocks, regulatory news, or corporate actions. Nothing on this site is investment advice. Always do your own research and consult a SEBI-registered advisor.