AutoThesis.finance is a local Rust web app for iterative stock research. Enter a ticker, start a run, and the app will search, extract evidence, critique its own memo, and publish a final research memo with sources and iteration history.
The project is inspired by Andrej Karpathy's autoresearch pattern: instead of generating a memo in one pass, AutoThesis runs a closed loop of planning, searching, reading, writing, critiquing, and refining over multiple iterations.
- Rust stable (
cargo,rustc) - An OpenAI API key
- A Tavily API key
-
Copy the example environment file:
cp .env.example .env
-
Add your API keys to
.env:OPENAI_API_KEY=... SEARCH_API_KEY=...
-
Optionally adjust:
OPENAI_MODELMAX_ITERATIONSMAX_SOURCES_PER_ITERATIONAPP_HOSTAPP_PORT
Start the app with:
cargo runThen open:
http://127.0.0.1:3000
Database migrations are applied automatically on startup.
- Open the homepage.
- Enter a stock ticker such as
NVDA,AMZN,TSLA, orCOST. - Optionally customize the research question.
- Click Start Research.
- Watch the run progress through multiple iterations.
- Open the completed memo and inspect:
- executive summary
- bull case
- bear case
- risks
- known unknowns
- sources
- iteration history
Compare multiple stocks side-by-side:
- Navigate to the Comparisons page.
- Enter a comparison name and select multiple tickers (e.g.,
NVDA,AMD,INTC). - Optionally customize the comparison question.
- Click Create Comparison.
- Watch each ticker run its own research iteration.
- View the completed comparison with side-by-side memos.
AutoThesis supports both light and dark themes:
- The app defaults to your system preference (
prefers-color-scheme). - Click the sun/moon icon in the header to manually toggle themes.
- Your preference is saved in browser localStorage and persists across sessions.
Automatically refresh research for watchlist tickers on a configurable schedule:
- Navigate to the Decision Dashboard.
- In the Auto-refresh schedule section, enable auto-refresh.
- Select an interval (daily, weekly, etc.) and optionally a research template.
- Click Save schedule.
The scheduler will automatically spawn research runs for all tickers in the watchlist at the specified interval. Use the Refresh now button to trigger an immediate refresh.
Track your actual holdings alongside research theses:
- Navigate to the Portfolios page.
- Create a new portfolio with a name and optional cash balance.
- Add positions by entering ticker, shares, and cost basis.
- View the holdings table with:
- Current price and market value
- Gain/loss ($ and %)
- Allocation percentage
- Latest thesis conviction score
- Conviction alignment indicator (green/yellow/red)
The conviction alignment feature alerts you when a position's thesis conviction drops below 6.0 but the position is still held, helping you stay aligned between your research and actual investments.
- What is the current bull and bear case for
NVDA? - What would need to be true for the current valuation of
AMZNto make sense? - What are the most important risks and catalysts for
COSTover the next 12 to 24 months?
See .env.example for the full list. The main ones are:
APP_HOSTAPP_PORTDATABASE_URLOPENAI_API_KEYOPENAI_MODELOPENAI_BASE_URLSEARCH_API_KEYSEARCH_PROVIDERMAX_ITERATIONSMAX_SOURCES_PER_ITERATIONRUST_LOG
Scheduler settings:
SCHEDULER_ENABLED- Enable/disable auto-refresh scheduler (default:true)SCHEDULER_CHECK_INTERVAL_SECS- How often to check for due watchlists (default:60)SCHEDULER_MAX_CONCURRENT_RUNS- Maximum concurrent research runs (default:3)SCHEDULER_MIN_TICKER_AGE_HOURS- Skip tickers refreshed within this window (default:24)
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test