cc-liquid - open source reference implementation for a simple, metamodel-based Hyperliquid portfolio rebalancer
Project description
cc-liquid
⚠️ PRE-ALPHA SOFTWARE - USE AT YOUR OWN RISK ⚠️
This is PRE-ALPHA software provided as a reference implementation only. By using this software, you acknowledge:
- Risk of COMPLETE LOSS of funds - CrowdCent makes NO WARRANTIES and assumes NO LIABILITY
- Software is provided "AS IS" without any guarantees
- You must comply with all Hyperliquid terms of service
- We do NOT endorse any vaults, strategies, or implementations using this tool
Overview
cc-liquid is a simple metamodel-based rebalancer for Hyperliquid that:
- Downloads metamodel predictions from CrowdCent or Numerai
- Identifies top long and bottom short opportunities
- Rebalances your Hyperliquid portfolio based on predictions
- Manages position sizing and risk automatically based on portfolio configurations
Read the docs: documentation
Installation
# Install globally
uv tool install cc-liquid
# With Numerai support
uv tool install cc-liquid[numerai]
# Or run without installing
uvx cc-liquid --help
# Optional: Enable shell completion
cc-liquid completion install
Quick Start
cc-liquid init # Interactive setup wizard (recommended for new users)
The wizard guides you through:
- Choosing testnet (recommended) or mainnet
- Selecting data source (CrowdCent/Numerai/local)
- Entering API keys securely
- Setting portfolio parameters
- Auto-configuring for safety
Configuration
Secrets (.env only - never commit)
# API Keys
CROWDCENT_API_KEY=...
# Signer private keys (owner key or approved agent wallet keys)
HYPERLIQUID_PRIVATE_KEY=0x...
HYPER_AGENT_KEY_PERSONAL=0x...
HYPER_AGENT_KEY_VAULT=0x...
Get your keys from:
- CrowdCent:
https://crowdcent.com/profile - Hyperliquid:
https://app.hyperliquid.xyz/API
Settings (cc-liquid-config.yaml)
profiles:
default:
owner: 0xYourMain # Main owner address (never the API/Agent wallet)
vault: null # null for personal, or vault address
signer_env: HYPERLIQUID_PRIVATE_KEY # ENV var name (not the key itself)
my-vault:
owner: 0xYourMain # optional, informational
vault: 0xVaultAddress
signer_env: HYPER_AGENT_KEY_VAULT
active_profile: default
data:
source: crowdcent # crowdcent, numerai, or local
path: predictions.parquet
portfolio:
num_long: 10
num_short: 10
target_leverage: 1.0 # 1.0 = no leverage, 2.0 = 2x, etc.
execution:
slippage_tolerance: 0.005
min_trade_value: 10.0
Profile Management:
cc-liquid profile list
cc-liquid profile show
cc-liquid profile use <name>
Agent Wallets (Recommended for automation):
- Use separate agent keys per bot for nonce isolation
- Approve agent in Hyperliquid UI, then add private key to
.env - Never use agent address for Info queries (use owner/vault)
Usage
Basic Commands
# Account info
cc-liquid account
# Download predictions
cc-liquid download-crowdcent -o predictions.parquet
cc-liquid download-numerai -o predictions.parquet
# Rebalance portfolio
cc-liquid rebalance
# Continuous rebalancing (WARNING: auto-executes)
cc-liquid run --skip-confirm
Configuration Overrides
Use --set to override any config value at runtime:
# Data source (auto-applies column mappings)
--set data.source=numerai # → date, symbol, meta_model columns
--set data.source=crowdcent # → release_date, id columns
--set data.path=custom.parquet
# Portfolio
--set portfolio.num_long=15
--set portfolio.num_short=8
--set portfolio.target_leverage=2.0
# Execution
--set execution.slippage_tolerance=0.01
# Environment
--set is_testnet=true
Example combinations:
cc-liquid rebalance --set data.source=numerai --set portfolio.num_long=20 --set portfolio.target_leverage=2.0
How It Works
- Download Metamodel: Fetches consolidated predictions from CrowdCent or Numerai
- Select Assets: Identifies top N longs and bottom N shorts based on 10-day predictions
- Calculate Positions: Determines target sizes based on account value and leverage
- Generate Trades: Calculates required trades from current to target positions
- Execute Orders: Places market orders with configured slippage tolerance
Backtesting & Optimization
cc-liquid includes backtesting and optimization tools to test strategies on historical data:
cc-liquid analyze # Run backtest with current config
cc-liquid optimize # Find optimal parameters via grid search
⚠️ BACKTESTING DISCLAIMER ⚠️
Past performance does not predict future results. Backtesting has inherent limitations:
- Results are hypothetical and may not reflect real trading conditions
- Optimized parameters are prone to overfitting
- Market conditions, liquidity, and execution costs change over time
- Always validate with out-of-sample data and paper trading before live deployment
See full documentation for details.
Future Enhancements
- Neutralize to known risk factors
- Unequal-weight position sizing
- Advanced portfolio optimization
License
MIT License - See LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cc_liquid-0.1.4a4.tar.gz.
File metadata
- Download URL: cc_liquid-0.1.4a4.tar.gz
- Upload date:
- Size: 589.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66570225c9b788dcd853f581310d25dafa07e2bc4beb66e1668d5c6350fa4aed
|
|
| MD5 |
4ee3f70f10f77b1a5d09c2c3f9f9add9
|
|
| BLAKE2b-256 |
8275cb029553a8815ec767c44bd80bbb2b6fd9ad635a7fbc0f1f338892bf610c
|
File details
Details for the file cc_liquid-0.1.4a4-py3-none-any.whl.
File metadata
- Download URL: cc_liquid-0.1.4a4-py3-none-any.whl
- Upload date:
- Size: 60.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1cead912b44059f799f4f339afaee44f73a8bb527783246a849eac7b56b411
|
|
| MD5 |
ddc5b5426b945efb92a619e1007eddd7
|
|
| BLAKE2b-256 |
8928acdabcc48aa7afbf10747747d949cbcbcc0676feed950551053169991f65
|