A trading-signal scanner for the Indian market that you can actually run. Describe a strategy in plain English, scan the Nifty universe, and review every order before it is placed.
This is the system from Zerodha Varsity's Build a Trading Algo with AI — No Coding Required, built end to end and built safely.
It follows the video's flow — log in with your API key, API secret and request token, see your account, then generate signals with Short SMA, Long SMA, Lookback and Max — and adds the parts the video leaves out.
Connect Zerodha and prices come from Kite, exactly as in the video. Without it the scanner still runs on free end-of-day data, so you can try everything before paying for anything.
▶ Download the tutorial (5 min, narrated) — or docs/varsity-algo-tutorial.mp4 in the repo.
Install, first scan, building a strategy from English, and the order guardrails. Narrated end to end. Every frame is the real application — the strategy you see being built from "golden cross on the nifty 500 but only if RSI is under 70" was produced live by a 7B model running locally with no API key.
Windows — download the repo, then double-click start.bat.
macOS / Linux
git clone https://github.com/sachincse/varsity-algo
cd varsity-algo
chmod +x start.sh && ./start.shThat is the whole thing. The script checks for Python and Node, creates a virtual environment, installs everything, builds the dashboard, and opens http://localhost:8000. Re-running it is fast.
You need Python 3.11+ (tick "Add python.exe to PATH" on the first installer screen) and Node 20.19+ or 22.12+. If Node is missing the app still runs — you just get the API instead of the dashboard.
Full walkthrough, including every error message and its fix: docs/SETUP.md.
Only used to turn English into a strategy. Pick one, put it in .env, restart.
Free, no credit card
| Provider | .env |
Get a key |
|---|---|---|
| Groq | LLM_PROVIDER=groqGROQ_API_KEY=… |
console.groq.com/keys |
| Google Gemini | LLM_PROVIDER=geminiGEMINI_API_KEY=… |
aistudio.google.com/apikey |
| OpenRouter | LLM_PROVIDER=openrouterOPENROUTER_API_KEY=… |
openrouter.ai/keys |
Free and fully offline — no key, no account, nothing leaves your machine
# install from https://ollama.com/download
ollama pull qwen3:8bLLM_PROVIDER=ollama
LLM_MODEL=qwen3:8bThe tutorial video was recorded this way. A 7B model handled "golden cross on the nifty 500 but only if RSI is under 70" correctly, on a laptop, for nothing.
Twelve providers are supported in total — Anthropic, Groq, OpenRouter, Gemini, Together, DeepSeek, Fireworks, Cerebras, Mistral, xAI, Ollama, LM Studio, plus any OpenAI-compatible endpoint. Claude uses its official SDK; the rest share one adapter.
Model IDs rot fast. Groq retired every Llama chat model in August 2026. If you see "provider does not know this model", set
LLM_MODELto a current one — no code change needed.
The AI writes code and then runs it. A model that can emit arbitrary Python
into a process holding your broker access token is a remote-code-execution path
with a natural-language prompt as its input. Here the model fills a closed
schema (core/nl.py) which compiles into a validated strategy
(core/spec.py). Asking it to add a shell_command field
returns Extra inputs are not permitted.
₹500/month before you can look at anything. Kite is used the moment you connect — same data, same broker, same chart. But you are not blocked until then: without a session the scanner falls back to free end-of-day data, so you can decide whether it is worth paying for.
Nothing checks the signals are honest. 44 tests, and the important ones try to prove the engine cannot see the future: truncate the input and signals must be unchanged; replace every bar after date T with noise and everything up to T must be bit-identical.
Bullish and bearish are presented symmetrically. A retail account cannot hold a short equity position overnight in India, so a bearish crossover is an exit for something you already own, never a trade.
No, and you should know that before building on it. SMA(6)/SMA(30) on the Nifty 100, 2011–2026, next-open fills, full Zerodha charges, 25 bps slippage, and a point-in-time universe:
| CAGR | |
|---|---|
| SMA 6/30, honestly tested | 1.92% |
| Nifty 100 total-return index, net of fees | 10.70% |
| Same universe, no timing rule at all | 11.90% |
It also sits at the 28th percentile of a random-entry null with the same trade count and holding periods. 95% of gross trading gains went to charges, and 67% of the remaining profit was dividends the strategy did nothing to earn.
The scanner is a useful lens on what is moving. It is not a reason to trade.
Placing an order is the only irreversible thing this program does, so it sits behind four locks:
ENABLE_TRADING=truein.env— a deliberate act in a text editor- a preview that mints a one-time token bound to the exact symbol, side, quantity and product
- that token expiring after three minutes, because the prices behind it go stale
- a browser confirmation naming the order
Orders go one at a time. There is no "place all".
core/ spec.py (the DSL) · nl.py (English → spec) · engine.py (causal
indicators) · data.py (yfinance or Kite)
server/ FastAPI; serves /api and the built SPA from one process
kite_client.py · jobs.py · llm/ (12 providers) · routes/
web/ React + Vite dashboard
tests/ 44 tests, mostly attempts to break the causality guarantee
tools/ record_app.py · narration.py · build_video.py — the tutorial
video is generated from source, not hand-edited
docs/ SETUP.md · API_SPEC.md · the tutorial video
python -m pytest tests/ -q # 44 passed
cd web && npm run dev # hot-reload frontend on :5173
python -m uvicorn server.main:app --reload --port 8000Rebuild the tutorial video (needs ffmpeg):
python tools/record_app.py --out build/clips # drive the real app
python tools/build_video.py --revoice # narrate, edit, encodeThe narration script lives in tools/narration.py and is
spoken by a free neural voice via edge-tts — no API key. Narration drives
the edit: each segment is stretched to fit its line rather than the line being
squeezed into a duration chosen in advance. Change VOICE for a different
accent.
MIT — see LICENSE. Not financial advice. You are responsible for every order you approve.





