Version — · Python 3.11+ · MIT
One-stop equity analysis, from the terminal.
Market data, Markowitz optimization, walk-forward backtests, saved portfolios and a
web UI — one sobres command line, one SQLite file, no API key required.
sobres optimize frontier run.
The product, in its own voice
A recorded transcript of the command below actually running — regenerated by site/scripts/record_figures.py, never written by hand.
What ships today
-
Data, cached
Prices, macro series, Fama-French factors and exchange rates from keyless providers where possible. Every observation is cached in one SQLite file, and every output says where it came from.
sobres data prices AAPL MSFT --start 2020-01-01 -
Optimize
Min-variance, max-Sharpe, target return or risk, risk parity — with Ledoit-Wolf shrinkage on by default and a concentration warning when a weight runs away.
sobres optimize markowitz --tickers AAPL MSFT NVDA --fill drop -
Backtest, walk-forward
Re-solve at each rebalance on prior data only, let weights drift between them, charge 10 bps a side, and compare against equal weight on the same schedule.
sobres optimize backtest --portfolio core --lookback 1y --rebalance quarterly -
Remember
Named portfolios and watchlists, a run history with resolved parameters, and
sobres run diffto see exactly what changed between two answers.sobres portfolio save core --tickers AAPL MSFT NVDA --weights 0.4 0.4 0.2 -
Web UI and API
Every command is also a form and an HTTP route, generated from the same declaration. The form shows the command line it runs; long jobs report real progress.
sobres open -
One container
The CLI is the image's entrypoint. Serve the UI, or run any command against the same volume.
docker run -v sobres:/data aisolutionslab/sobres db info -
Factor analysis
CAPM and Fama-French 3 and 5 factors plus momentum, with Newey-West errors and alpha reported next to its t-statistic, never alone.
sobres analyze factors NVDA --model ff5 -
Goal planning
Retirement and FIRE, house, car and education goals; every answer carries a Monte Carlo or bootstrap success probability and the 10th–90th percentile outcomes, seed printed.
sobres plan retire --income 120000 --expenses 60000 --simulate -
Econometrics
A joint VAR/BVAR price forecast scored against no-change on held-out dates and always carrying 80% and 95% bounds; stationarity diagnostics with disagreement stated; GARCH volatility with simulated bands; robust regression with VIF.
sobres econ forecast ticker:AAPL --horizon 20 -
Exchange rates and PPP
Convert once, explicitly; split a return into asset and currency; price a hedge; compare market rates with purchasing-power rates — labelled as a valuation gap, never a forecast.
sobres ppp compare --base USD --vs EUR MXN -
Pre-earnings options research
A point-in-time backtest of buying calls into the implied-volatility ramp and selling before the print, a pre-registered sweep that reports every cell with a multiplicity-adjusted p-value, a versioned candidate score, and paper recommendations you promote from the terminal. It runs on your machine against your own Massive data plan (Options Advanced and the Benzinga earnings add-on, priced by Massive) and says so when the evidence is inconclusive. Research only, a paper sleeve, never a broker order. The optional local UI shows candidates, models, recommendations and paper positions.
sobres options sweep --end 2026-06-30
The number that matters is the second one
Optimize on a window, evaluate on the same window, and the Sharpe ratio looks like this:
— —
In-sample max-Sharpe versus walk-forward on the same assets and window; costs charged, benchmark on the same schedule.
sobres labels every in-sample result as in-sample, reports alpha with its t-statistic, turns shrinkage and transaction costs on by default, and says where survivorship bias enters. Defaults that flatter results are bugs.
Install
pip install sobres
docker run -p 8787:8787 -v sobres:/data aisolutionslab/sobres serve --host 0.0.0.0
Then sobres init, sobres doctor, and you are three commands in. Works with no API key. init offers three free ones, each skippable and typed without echo: FRED for macro series and the live risk-free rate, an Alpaca paper account for trading, and a Massive key for the pre-earnings options research. sobres uninstall removes the keys and data along with the package.
Roadmap — not yet available
Specified in the repository, not shipped in the version above:
- Direct machine-learning forecasters (elastic-net, boosted trees) and the FRED macro preset for the price forecast (OpenSpec 0009 follow-up).
- Broker execution: preview and place orders from a saved portfolio through a broker adapter, paper trading first (issue #22).
- SEC filings intelligence: year-over-year change scores for 10-K risk factors and MD&A, 8-K and insider-trade features, an LLM that labels risk factors and never picks stocks, all timestamped to EDGAR acceptance so nothing looks ahead (OpenSpec 0019, issue #73).
How it is meant to fit together: the CLI is the product; the local web UI and the API are generated from the same command registry, so nothing exists in the browser that the terminal cannot compute. See docs/INSTALLATION.md for the pip, local UI and Docker install paths and the keys each one unlocks.