Open Net Worth
Open Net Worth is an open-source personal AI wealth assistant you run yourself: one ledger for your whole financial life, worked by an AI agent you control.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
Loading the full README. The saved excerpt is shown below.
A full-stack backtesting tool that compares a rule-based technical strategy, a machine-learning strategy, and a buy-and-hold benchmark on real historical price data — built to demonstrate correct backtesting methodology (no lookahead bias) as much as the strategies themselves.
Live demo: algorithmic-backtester.vercel.app
API: quant-backtester-api-6eei.onrender.com (health check at /api/health)
The backend is deployed on Render's free tier, which spins down after inactivity. The first request after idling can take 30–50 seconds to wake up — that's expected, not a bug.Read the full README ↗A full-stack backtesting tool that compares a rule-based technical strategy, a machine-learning strategy, and a buy-and-hold benchmark on real historical price data — built to demonstrate correct backtesting methodology (no lookahead bias) as much as the strategies themselves.
Live demo: algorithmic-backtester.vercel.app
API: quant-backtester-api-6eei.onrender.com (health check at /api/health)
The backend is deployed on Render's free tier, which spins down after inactivity. The first request after idling can take 30–50 seconds to wake up — that's expected, not a bug.
This is an educational/portfolio project, not investment advice. It does not model transaction costs, slippage, or taxes, and no result here should be read as a recommendation to trade any security.
Given a ticker and a date range, the app runs three approaches over the exact same price data and shows them side by side:
RandomForestClassifier trained on technical indicator features to predict next-day up/down moves, trained only on an in-sample (earlier) slice of the data and evaluated only on the later, out-of-sample slice it never saw during training.All three run through one shared backtest engine, so returns, Sharpe ratio, max drawdown, win rate, and trade logs are computed identically for each and are directly comparable.
This project was built as a portfolio piece for quant/finance-adjacent roles, and it's deliberately structured around the mistake that makes most hobby backtests worthless: lookahead bias. It's easy to accidentally let a model "see the future" — training on data that includes the test period, or applying today's signal to today's return instead of tomorrow's. This project's core design decisions all exist to prevent that:
chronological_split), and every prediction it makes is for the later, out-of-sample portion only.label) is the training target and is never used as a model input.backend/ FastAPI service — data ingestion, feature engineering, the three
strategies, the shared backtest engine, and the HTTP API
frontend/ React (Vite + TypeScript) app — form, equity chart, metrics
table, feature importance chart, and trade logs (Recharts)
The two are deployed independently (Render for the API, Vercel for the frontend) and talk to each other over HTTP; see DEPLOYMENT.md for the full deploy walkthrough.
Backend: Python, FastAPI, pandas, NumPy, scikit-learn, yfinance, pytest
Frontend: React 18, TypeScript, Vite, Tailwind CSS, Recharts
Deployment: Render (backend, native Python runtime via render.yaml), Vercel (frontend)
GET /api/healthReturns {"status": "ok"}. Used for deployment health checks.
POST /api/backtestRequest body:
{
"ticker": "AAPL",
"start_date": "2018-01-01",
"end_date": "2024-01-01",
"sma_short": 20,
"sma_long": 50,
"train_fraction": 0.7,
"probability_threshold": 0.5
}
sma_short, sma_long, train_fraction, and probability_threshold are all optional and default to the values above. The response includes, for each of the rule-based, ML, and buy-and-hold strategies: an equity curve, performance metrics (total return, CAGR, annualized Sharpe ratio, max drawdown, win rate, trade count), and a trade log — plus the ML model's feature importances and the train/test split sizes actually used. A buy-and-hold result is returned both for the full requested range and for the ML strategy's out-of-sample window specifically, so the frontend can show a fair three-way comparison.
Full request/response schemas: backend/app/api/schemas.py.
backend/app/backtest/metrics.py): total return, CAGR (252 trading days/year), annualized Sharpe ratio, max drawdown, win rate, and trade count — one implementation shared by all three strategies.backend/app/features/engineering.py): 1-day and 5-day returns, 14-period RSI, MACD line and signal line, Bollinger Band position, 10-day rolling volatility, and volume change.RandomForestClassifier (200 trees, max depth 5), predicting next-day up/down; a probability threshold (default 0.5) controls how confident the model needs to be before going long.backend/app/data/ingestion.py): pulls daily OHLCV data from Yahoo Finance via yfinance, with retry-with-backoff for transient rate-limit failures, a 6-hour in-memory cache, and defensive handling of the occasional NaN closing price Yahoo returns for a not-yet-fully-settled recent bar.cd backend
python3 -m venv .venv && source .venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m uvicorn app.api.main:app --reload
This is the beginning of the README. Read the rest at the original. Read the full README ↗