Repository navigation
Glossary
Savvas Leousis edited this page Sep 26, 2026
·
2 revisions
Plain meanings of the metrics the console shows and the words used in Stonks. Every "?" tip in the console links here.
flowchart LR
BAR[bar] --> LAKE[lake] --> LAB[lab] --> SH[shadow] --> AC[active] --> TICK[tick]
| Metric | Meaning |
|---|---|
| Total return | How much the value grew or shrank over the whole period, as a percentage. |
| CAGR | Compound annual growth rate: the steady yearly growth that gives the same end value. |
| Equity | Total value of the account: cash plus everything it holds at current prices. |
| Volatility | How much returns swing around their average, scaled to a year. Higher means bumpier. |
| Sharpe ratio | Average return divided by volatility, scaled to a year. Return per unit of bumpiness. |
| Sortino ratio | Like Sharpe, but only counts downside swings, so big up days are not penalised. |
| Calmar ratio | CAGR divided by the worst drawdown: growth earned per unit of pain. |
| Drawdown | How far value has fallen below its previous peak. |
| Max drawdown | The deepest fall from a peak during the period. |
| Drawdown duration | How many bars the longest stretch below a previous peak lasted. |
| Ulcer index | Measures both how deep and how long drawdowns are; lower is calmer. |
| UPI (Ulcer performance index) | CAGR divided by the Ulcer index. |
| VaR (value at risk) | A bad-day loss: on 95% of days the loss is smaller than this. |
| ES (expected shortfall) | The average loss on the days worse than VaR. Also called CVaR. |
| Skew | Whether big moves tend to be up (positive) or down (negative). |
| Kurtosis | How often extreme moves happen compared with a normal curve (normal is 3). |
| Exposure | Share of the account invested rather than held as cash. |
| Turnover | How much of the portfolio is bought and sold per year. More turnover means more costs. |
| Slippage | Paying a worse price than expected when an order fills. |
| Basis point (bps) | One hundredth of a percent: 25 bps is 0.25%. |
| Metric | Meaning |
|---|---|
| Trades | Completed round trips (buy then sell). Few trades make every statistic shaky. |
| Win rate | Share of trades that made money. A low win rate can still pay if winners are big. |
| Profit factor | Money won on winners divided by money lost on losers. Above 1 is profitable. |
| Expectancy | The average profit or loss per trade, winners and losers together. |
| Payoff ratio | Average winner divided by average loser. |
| Risk of ruin | Chance that a bad run of trades causes a drawdown beyond a set limit (40% by default). |
| Metric | Meaning |
|---|---|
| Benchmark | What the strategy is compared with: SPY, an equal-weight universe or a ticker you pick. |
| Beta | How much the strategy moves with the benchmark. 1 means in step, 0 means unrelated. |
| Alpha | Return the benchmark does not explain: what is left after accounting for beta. |
| Tracking error | How far returns stray from the benchmark, scaled to a year. |
| Information ratio | Extra return over the benchmark divided by tracking error. Skill per unit of difference. |
| Metric | Meaning |
|---|---|
| In-sample (IS) score | The objective on the data the tuner used. Usually too optimistic. |
| Out-of-sample (OOS) score | The objective on data the tuner never saw: the honest number. |
| Best score | The best objective value the tuner found (for example Sharpe), before survival tests. |
| Probabilistic Sharpe (PSR) | The chance the true Sharpe is above zero, given how long and how bumpy the record is. |
| Deflated Sharpe (DSR) | PSR that also accounts for how many variants were tried. Many tries make a lucky best more likely. |
| MinTRL (minimum track record length) | How long a record must run before its Sharpe can be trusted. |
| PBO (probability of backtest overfitting) | How often the best variant in one half of the data is below average in the other half. Lower is better. |
| p-value | The chance of a result this good from luck alone. Small (under 0.05) means probably not luck. |
| MCPT (Monte Carlo permutation test) | Shuffle the bars many times; the real result should beat most shuffles. |
| Walk-forward | Tune on the past, test on the next slice, roll forward and repeat. |
| Walk-forward efficiency (WFE) | Out-of-sample return divided by in-sample return across walk-forward folds. Near 1 means little overfitting. |
| Embargo | Bars skipped between the train and validation windows so information cannot leak across. |
| Period stability | Checks the strategy works in each sub-period, not just in one lucky stretch. |
| Perturbation | Adds small noise to prices to see if the results hold. |
| Plateau | Nudging each parameter a little should cost little; a sharp peak is a warning. |
| Cost stress | Rerun with costs doubled or more; the break-even multiple is where the edge disappears. |
| Drift | A change in how the data behaves between the training period and later ones. |
| PSI (population stability index) | How much a distribution shifted. Under 0.1 is stable; over 0.25 is a big shift. |
| Runs test | Checks whether wins and losses cluster together more than chance would. |
| IC (information coefficient) | Rank correlation between a signal today and the returns that follow. Small positive values are normal. |
| ICIR | Average IC divided by its standard deviation: how steady the signal's edge is. |
| Event study | Compares returns after the strategy's entries with just holding the same tickers. |
| Survival test | A check that tries to break a strategy before it is trusted. |
| Term | Meaning |
|---|---|
| Active | Registry status of a strategy the tick trades. |
| Asset class |
equity, crypto, commodity or bond. |
| Backtest | Replaying history to see how a strategy would have done. |
| Bar | One period of prices: open, high, low, close, volume. |
| Book | One portfolio's set of strategies, constructor, risk policy and broker in a tick. |
| Client id | Deterministic order id built from the date, portfolio, strategy, ticker and side. |
| Constructor | Turns strategy signals into target positions (single winner, equal weight, vol target, ...). |
| Dry run | A tick that scores and logs but places no orders. |
| Go-live check | The checks a paper record must pass before promotion. |
| Idempotent | Safe to repeat: running twice gives the same result as once. |
| Ingest | Pulling data from a vendor into the lake. |
| Interval | Bar size: 1m, 5m, 15m, 30m, 1h, 4h, 12h, 1d, 1w. |
| Lake | The DuckDB file with market data (data/lake.duckdb). |
| Long-only | Can buy and sell what it holds, never short. |
| Look-ahead | Using data that was not available yet at that time. A bug that fakes good results. |
| MCP | Model Context Protocol; lets AI assistants call tools. |
| Mode | How a subscription acts: notify, paper or auto. |
| Model book | A shadow strategy's virtual portfolio. |
| Paper trading | Trading with fake money, in Stonks or at a real broker's paper account. |
| Point-in-time | Using only data that was published by that date. |
| Preset | A named set of survival tests: quick, standard, promotion. |
| Quarantine | Keeping impossible bar rows out of the lake, in quarantined_bars. |
| Reconcile | Syncing order status and fills from the broker into state. |
| Registry | Where strategies and their status are stored. |
| Risk rule | A rule that clips or drops orders before the broker. |
| Seam | An interface where new behavior plugs in. |
| Shadow | Registry status: evaluated each tick on a virtual portfolio, never traded. |
| Soft-fail | Log the error, skip that item, keep going. |
| State | The SQLite file with trading records (data/state.sqlite). |
| Subscription | A user following a strategy in a mode, for a portfolio. |
| Tick | One run of the trading loop, usually daily. |
| Tuner | Searches parameter values for the best score. |
| Universe | The list of tickers a strategy or tick looks at. |
| Upsert | Insert a row, or update it if it already exists. |
Source: sleousis/Stonks. Plans and status: docs/roadmap.md.
Start
Concepts
- Architecture
- Data and Storage
- Strategies
- Book Strategies
- Lab and Validation
- Backtesting
- Accounts and Modes
Using Stonks
- Strategy Studio
- Trading Tick
- Risk and Go-Live
- Operations
- Scheduling and Backups
- Deploy
- API and MCP
- Web Console
Reference