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
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; a FRED key unlocks macro series.
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).