Production-grade quant platform for Opening Range Breakout strategy and multi-factor alpha generation.
Built for the YC Hedge Fund Competition. Designed to scale to $100M+ AUM. Deployed on free/freemium infrastructure.
ORBIS
├── engine/ Python quant core
│ ├── orb_scanner.py 15-min ORB signal generation
│ ├── signal_engine.py Pipeline orchestrator
│ ├── score_model.py Regime-aware composite scoring
│ ├── trade_plan.py Deterministic trade plan generation
│ ├── risk_manager.py Circuit breakers + position sizing
│ └── strategies/ Pluggable alpha modules
│ ├── momentum.py Cross-sectional factor ranking
│ ├── stat_arb.py Cointegration pair scanner
│ ├── vol_regime.py ATR regime detection
│ └── earnings_drift.py PEAD model
├── backtest/ Institutional backtesting framework
│ ├── runner.py Event-driven simulator
│ ├── metrics.py Sharpe, Sortino, Max DD, Profit Factor
│ └── report.py Equity curves + PR comment generator
├── data/ Multi-source data feeds
│ ├── feeds.py Aggregator (routes to best source)
│ ├── us_feed.py yfinance + Alpha Vantage
│ ├── nse_feed.py NSE India via yfinance
│ └── cache.py Upstash Redis + in-memory fallback
├── api/ FastAPI backend
│ ├── main.py App entry + lifespan
│ └── routes/ /signals, /plans, /backtest, /config
├── dashboard/ Next.js frontend (Vercel)
│ ├── app/ App Router pages
│ ├── components/ React components
│ └── lib/ API client + Supabase
├── supabase/ Database schema + migrations
└── .github/workflows/ CI/CD pipeline
Signal Classification: LONG / SHORT / WATCH / INSIDE
Rule Checklist (all must pass for execution):
| Rule | Description | Default |
|---|---|---|
| R1 | Gap filter | |gap%| ≥ 0.3% |
| R2 | Volume filter | vol ≥ 500K |
| R3 | Range filter | ORB range ≤ 5% |
| R4 | Breakout confirm | Price beyond ORB-H/L |
| R5 | Relative volume | RVOL ≥ 1.0x |
| R6 | Time window | Within market hours |
| R7 | Risk:Reward | R:R ≥ 1.5 |
| R8 | AI confirmation | Optional |
Scoring: Weighted composite (R:R 25%, Volume 20%, Range 15%, Gap 15%, Signal 15%, AI 10%)
cd orbis
cp .env.example .env # Fill in your API keys
pip install -r requirements.txt
uvicorn api.main:app --reload --port 8000cd orbis/dashboard
npm install
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local
npm run devcd orbis
python -c "
from engine.config import get_settings
from backtest.runner import BacktestRunner, BacktestConfig
from backtest.report import console_report
from data.us_feed import LIQUID_UNIVERSE
import yfinance as yf
settings = get_settings()
runner = BacktestRunner(settings, BacktestConfig())
data = {}
for sym in LIQUID_UNIVERSE[:10]:
df = yf.download(sym, period='1y', interval='1d', progress=False)
if not df.empty:
data[sym] = df.rename(columns={'Open':'open','High':'high','Low':'low','Close':'close','Volume':'volume'})
result = runner.run(data)
print(console_report(result))
"| Service | Purpose | Tier |
|---|---|---|
| yfinance | US/NSE OHLCV | Free, no key |
| Alpha Vantage | Supplemental data | 25 req/day |
| Supabase | Postgres + Realtime | 500MB free |
| Vercel | Dashboard hosting | Free hobby |
| Railway | API hosting | $5 credit |
| Upstash Redis | Cache + rate limit | 10K req/day |
| GitHub Actions | CI/CD | 2000 min/month |
| Telegram Bot | Signal alerts | Free |
| Sentry | Error monitoring | 5K events/month |
| Trigger | Action |
|---|---|
| PR to main | Lint → Test → Backtest → Post metrics as PR comment |
| Push to main | Deploy API (Railway) → Deploy dashboard (Vercel) → Telegram notify |
| Cron (09:30 IST) | Run ORB scan → Push to Supabase → Telegram top 3 signals |
Quality Gate: PRs are blocked if backtest Sharpe < 0.5 or Max Drawdown > 15%.
- Max risk per trade: 1% of equity
- Max daily loss: 3% → halt new trades
- Circuit breaker: 5% drawdown → kill switch
- Max concurrent positions: 5
- LIVE_TRADING=false by default in every environment
See .env.example for all required and optional configuration.
Critical: API keys are NEVER hardcoded. All secrets flow through:
- Local:
.env(gitignored) - CI/CD: GitHub Secrets
- Production: Vercel/Railway environment variables
License: Private — YC Hedge Fund Competition
LIVE_TRADING is set to false. This is a research and competition platform.