- 154Contributors
- Oct 8, 2026Last commit
- MITLicense
- Nevertrades
Qlib is Microsoft's open-source quant research platform: load Moby candles, build features, train a model and backtest a signal across many tokens at once.
About
Qlib (pip install pyqlib) is a quant research framework from Microsoft. It stores OHLCV in its own .bin format, builds features with an expression engine (Ref($close, 60) / $close), trains models from a zoo of baselines (LightGBM, transformers, and more), and runs portfolio-style backtests with its own analysis reports. It is built for research on many instruments over long histories.
What it adds to Moby. Cross-sectional research. Backtesting.py tests one token at a time; Qlib ranks a universe. Export candles for the Solana tokens your agent follows, convert them with scripts/dump_bin.py, and test whether a feature set predicts next-day returns across the group.
How to pair it. Pull get_token_ohlcv for a basket (your watchlist, the top of get_screener_leaderboard, or wallets' holdings from get_whale_wallet_holdings), write one CSV per token with date, open, high, low, close, volume, dump to Qlib format and run a workflow. Use the result to shape a Moby strategy, not to pick a trade. Moby returns candles newest-first; reverse them before you feed them in.
What it does not do. It does not trade and does not read Moby directly. Its data collectors, examples and benchmarks are for stocks; on short, thin memecoin histories a model will overfit, so keep it to tokens with weeks of candles. It is heavy to install (LightGBM, Cython) and the main branch has unreleased breaking changes; stick to the PyPI release.
What's inside this repo
- Data layer: own .bin format, expression engine for features, offline and online modes
- scripts/dump_bin.py converts CSV or Parquet (one file per symbol) into Qlib format
- Model zoo in examples/benchmarks (LightGBM and many neural models)
- Alpha158 and Alpha360 as ready feature sets
- qrun: one command runs dataset, training, backtest and evaluation from a YAML workflow
- Strategies and nested executors for portfolio-style backtests; graphical analysis reports
- Online serving, model rolling, meta-learning (DDG-DA) and a reinforcement-learning framework
Install steps
Third-party code: Moby does not audit or control it. Read the source before you run it.
pip install pyqlib- Export one CSV per token with columns
symbol, date, open, high, low, close, volume, oldest row first, into one folder. - From a clone of the repo, convert them:
python scripts/dump_bin.py dump_all --data_path <csv folder> --qlib_dir ~/.qlib/qlib_data/moby --include_fields open,close,high,low,volume --date_field_name date --symbol_field_name symbol - Point a workflow at
~/.qlib/qlib_data/moby; the data guide is at https://qlib.readthedocs.io/en/latest/component/data.html - Ask:
Pull 30 days of hourly candles for my watchlist tokens with get_token_ohlcv, put them oldest-first, dump them to Qlib format and test whether a 24-candle momentum feature ranks next-day returns.
Permissions
- Reads
- OHLCV CSVs you export (for example from Moby's get_token_ohlcv), converted to Qlib's .bin format
- Writes
- Local data directory, trained models and backtest reports
- Tools
- Python library `pyqlib` with scripts; Python 3.8 to 3.12
- Trade
- Never trades
Review
Reviewed Nov 1, 2026. Source matches repo at commit 5435523
Links
- Repository: https://github.com/microsoft/qlib
- Docs: https://qlib.readthedocs.io/en/latest/
On GitHub
- Stars
- 50,346
- Forks
- 7,948
How it works with Moby
Qlib works on its own. With Moby your agent can also trade on what it finds.
- Set up AI Trading
In the Moby app: create your agent and fund its Solana wallet.
Get the app - Connect Moby MCP
Whale, KOL and smart-money data, plus buy, sell, SL and TP from the agent wallet.
View Moby MCP - Install Qlib
Your agent runs it alongside Moby's onchain data and trades inside your Guardrails.
Install
Related
- APSchedulerAPScheduler is an open-source Python job scheduler, so your agent…
- CCXTCCXT is a unified library for crypto exchange market data, balances…
- CryptofeedCryptofeed is a Python websocket handler for live cryptocurrency…
- DuckDBDuckDB is an in-process analytical database for SQL over local and…
- Moby MCP connectorConnect any MCP-capable agent to Moby for live onchain research on…
- Moby KnowledgeThe /agents page and agents.md as your agent's Moby reference: how…
Reviewed Nov 1, 2026 · Report this item
