Portfolio Value
i
—
GBP Account
Unrealised P&L
i
—
—
Advice Track Record
i
—
From your journal
Holdings
| Ticker | Company | Qty | Avg Price (USD) | Latest (USD) | Mkt Value (A$) | Unrealised P&L (USD) | Signal | Action |
|---|---|---|---|---|---|---|---|---|
| Loading… | ||||||||
AI Stock Discovery
Stocks outside your portfolio that score highest · Results cached 24h
—
Total Entries
—
Wins
—
Losses
—
Win Rate
—
Total P&L
Advice History
| Ticker | Company | Type | Entry | Target | Status | P&L | Date | |
|---|---|---|---|---|---|---|---|---|
| Loading… | ||||||||
Data & AI API Keys
📊 Stock data comes from Yahoo Finance (yfinance) — no API key needed.
Only AI advice (Anthropic) and news sentiment (Finnhub) require keys below.
Only AI advice (Anthropic) and news sentiment (Finnhub) require keys below.
Required for AI Advice · ~$0.003/call (Claude Haiku)
Required for News Sentiment · free tier: 60 calls/min
Estimated Cost (Claude Haiku)
Per advice call~$0.003
5 calls/week per user~$0.06/week
3 users, moderate use~$0.58/month
Free credits on signup~1,700 calls
Change Password
All User Portfolios
Click "View →" to open any user's portfolio on the Home page
Loading…
Users
Admin only · Each user has private encrypted credentials
Loading users…
Add New User
App Mode
Demo Mode
When ON: Research / AI / Discover pages use mock data (no real API keys needed).
Portfolio is always live from your local database regardless of this setting.
Portfolio is always live from your local database regardless of this setting.
Data Source Badges
Show Source Badges on Research
Show small YF / ∑ / FH / AI badges next to each metric showing where data comes from.
Hover the badge for a full explanation and calculation method.
Hover the badge for a full explanation and calculation method.
Encryption Key Backup
This key encrypts all API keys stored in the database. It was auto-generated on first startup
and saved to
Back it up now — if lost, all stored API keys become unreadable.
.env.Back it up now — if lost, all stored API keys become unreadable.
Environment File
Methodology & How It Works
StockPulse automates your MyStocks.xlsx scoring system. Every score, signal, and piece of AI advice
follows the exact rules documented here. No black boxes.
The 4 Scoring Formulas
Quality = min(100, ROE×2 + ROIC×2 + max(0, 20 − D/E×10))
Valuation = max(0, 100 − P/E×5 − PEG×10 − EV/EBITDA×5)
Technical = 100 if RSI<30 (oversold)
40 if RSI>70 (overbought)
70 otherwise (healthy zone)
Risk = 100 if D/E < 0.5
70 if D/E < 1.5
40 otherwise
Total = (Quality + Valuation + Technical + Risk) / 4
Signal Rules
BUY WATCHLIST
Quality ≥ sector target AND Valuation ≥ sector target AND Total ≥ 75
HOLD
Total ≥ 60 (but doesn't meet BUY criteria)
REVIEW
Total < 60 — investigate before holding
Sector Quality / Valuation Targets:
Technology: 75 / 65 · Financials: 70 / 65
Healthcare: 75 / 65 · Consumer Staples: 75 / 60
Energy: 70 / 70 · Default: 70 / 65
Technology: 75 / 65 · Financials: 70 / 65
Healthcare: 75 / 65 · Consumer Staples: 75 / 60
Energy: 70 / 70 · Default: 70 / 65
Fibonacci Retracement Rules
Calculated from the 52-week high/low from Twelve Data real-time data
Golden Zone = 38.2% to 61.8% — the ideal buy-the-dip zone for momentum stocks
Above Golden Zone — Price is strong; wait for pullback before entry
In Golden Zone — Potential buy opportunity; confirm with quality score
Below Golden Zone — Caution; may signal deeper downtrend
RSI Interpretation Guide
RSI < 30 — Oversold. Potential reversal / buy signal. Technical score = 100.
RSI 30–45 — Weak. Downward momentum. Monitor closely.
RSI 45–55 — Neutral. No clear directional signal.
RSI 55–70 — Bullish. Healthy uptrend. Technical score = 70.
RSI > 70 — Overbought. Watch for pullback. Technical score = 40.
RSI calculated locally using Wilder's EWM method on Yahoo Finance price history
(1H, 4H, 1D, 1W, 1M). Advisory brief uses 1D RSI for the Technical score.
Data Sources
Yahoo Finance (yfinance) — All price + fundamental data: price, 52W range, MA50/200, P/E, PEG, EV/EBITDA, ROE, margins, FCF, D/E. Free, no API key, no rate limits. Up to 15-min delay.
Calculated locally — ROIC (Net Income ÷ Invested Capital), Interest Coverage (EBIT ÷ Interest), RSI×5 timeframes (Wilder EWM on yfinance history), Fibonacci levels, and all 4 scores.
Finnhub + VADER NLP — Last 7 days of news headlines scored for sentiment locally. Free tier: 60 calls/min.
Anthropic Claude Haiku — AI advice generation (claude-haiku-4-5). ~$0.003/call. Optional — app works without it.
Manual Trade Import — Upload your IG Share Trading CSV or add trades manually. Holdings + AUD cost basis computed from your actual trade history.
💡 Upgrade path: For real-time data (<1 min delay) consider Polygon.io (~$29/mo) or Twelve Data paid (~$12/mo). yfinance is ideal for personal use with daily investment decisions.
Privacy & Security
Runs in Docker — portable across any machine or VPS with zero Python setup.
All API keys encrypted with Fernet (AES-128-CBC) per user. Master key in .env only — never in the image.
SQLite database at
./db/shares.db mounted as a Docker volume — survives container rebuilds.Passwords hashed with bcrypt (cost factor 12). JWT tokens expire after 7 days.
.env is excluded from the Docker image via .dockerignore — secrets never baked into the container.Running with Docker
Quick Start (Personal Laptop)
# 1. Copy and fill in your .env
cp .env.example .env
nano .env # add SECRET_KEY, MASTER_ENCRYPTION_KEY, etc.
# 2. Build and start (first time)
docker compose up --build
# 3. Open browser
open http://localhost:8000
# 4. After first time — just:
docker compose up -d
The
./db/ folder is mounted as a volume — your users, keys,
and journal survive any container restart or image rebuild.
Deploy to Any VPS (Hetzner, DigitalOcean, etc.)
# On the VPS (Ubuntu/Debian):
apt install docker.io docker-compose-plugin -y
# Clone or copy your code (without .env)
git clone https://github.com/yourrepo/stockpulse
cd stockpulse
# Create .env with real keys
nano .env
# Start
docker compose up -d --build
# Point your domain / use Cloudflare proxy for HTTPS
Recommended VPS: Hetzner CX22 (€4/month, 2 vCPU, 4GB RAM) —
plenty for this app. SQLite handles the load for personal use.
For HTTPS: put Nginx + Certbot in front, or use Cloudflare's free proxy.
⚠️ Never commit .env to git. Generate SECRET_KEY once:
python -c "import secrets; print(secrets.token_hex(32))"