A quant-driven selector for grid-style swing trading.
Ranks USD pairs on Coinbase by volatility, liquidity, and short-term trend.
Outputs
scores.csvβ full universe with metricsskipped.csvβ failed or illiquid coinsrecommendations.csvβ top 4 rebalance picks
No API key required. Uses public Coinbase endpoints.
Install prerequisites
brew install asdf coreutils git openssl@3 ca-certificates
Enable asdf
echo '. "$(brew --prefix asdf)/libexec/asdf.sh"' >> ~/.zshrc
exec zsh
Install Ruby
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf install ruby 3.2.4
asdf set ruby 3.2.4
ruby -v
Project setup
git clone gobaby
cd gobaby
bundle install
Run
ruby gobaby.rb --input coins.txt
Example output:
=== REBALANCE PICKS (4) ===
NOICE-USD hyper-vol score=46.6 vol30d=29.4 range=39.8 trend7d=0.0 vol24h=$2.6M
USELESS-USD hyper-vol score=21.7 vol30d=11.9 range=19.7 trend7d=1.4 vol24h=$14.3M
ALICE-USD mid-vol score=13.7 vol30d=8.6 range=9.5 trend7d=2.9 vol24h=$2.5M
SQD-USD hyper-vol score=13.6 vol30d=13.9 range=15.2 trend7d=18.3 vol24h=$10.3M
Example file:
BTC-USD
ETH-USD
ALICE-USD
SUI-USD
NOICE-USD
USELESS-USD
Lines starting with # are ignored.
Data sources
β’ Coinbase /products for USD markets
β’ /products/{id}/candles for daily OHLCV (60 days)
β’ /products/{id}/stats for 24 h volume and price
Metrics
- realized_vol_30d_pct = standard deviation of 30 day returns Γ100
- avg_daily_range_pct = mean (high-low)/close Γ100
- trend_7d_abs_pct = absolute 7 day price change
- vol24h_usd = 24 h USD volume
Score formula
score = vol30d + 0.35 Γ avg_range + 0.5 Γ log10(vol24h_usd) β 0.5 Γ trend7d
Categories
- hyper-vol β₯ 12 % vol or β₯ 18 % range
- mid-vol 6β12 % vol or 8β18 % range
- high-liquidity β₯ $10 M 24 h volume
- excluded > 40 % 7 day trend (breakout)
Standard run: ruby score_gbt_universe.rb --input coins.txt
Limit coins: ruby score_gbt_universe.rb --input coins.txt --max 50
Verbose: LOG_LEVEL=debug ruby score_gbt_universe.rb --input coins.txt
Outputs
scores.csvβ all scored coinsrecommendations.csvβ rebalance setskipped.csvβ unlisted / failed
Daily cron example:
15 7 * * * cd /path/to/gbt-scorer && LOG_LEVEL=info ruby score_gbt_universe.rb --input coins.txt >> run.log 2>&1
Weekly rebalance rules:
β’ Replace coins if score drops > 50 %
β’ trend > 30 %
β’ 24 h volume < $1 M
DAYS_BACK = 60
WEIGHT_VOL = 1.0
WEIGHT_RANGE = 0.35
WEIGHT_LIQ = 0.50
WEIGHT_TREND = 0.50
HYPER_VOL_MIN = 12.0
HYPER_RANGE_MIN = 18.0
HIGH_LIQ_USD_MIN = 10_000_000.0
MAX_TREND_ABS_PCT = 40.0
Public data only (no API keys).
Retries + throttling built in.
Strict JSON parsing.
No writes outside project folder.
This guide outlines your weekly trading rhythm using the gobaby.rb script to score coins, select top performers, and manage your GoBabyTrade trader setup efficiently.
Youβll rebalance your active coins once per week.
Each week, the script re-evaluates volatility, liquidity, and trend data to suggest the top 4 coins to trade.
The goal is to:
- Stay aligned with the most active, profitable market conditions
- Avoid over-trading
- Let open positions close naturally through the traderβs profit logic
| Day | Task | Description |
|---|---|---|
| Sunday (Rebalance Day) | Run the script | Run ruby gobaby.rb and review recommendations.csv for the weekβs top 4 coins. |
| Compare vs current active coins | Identify any coins you are currently trading that arenβt in the new top 4. | |
| Adjust trader configuration | Use Option 1 (default) or Option 3 (faster exit) to offboard old coins. | |
| MondayβSaturday | Monitor trader performance | Let the trader automatically buy/sell; optionally check open lots midweek. |
| End of week (Saturday night) | Review progress | Note profits realized and remaining open lots; prepare for next rebalance. |
Run this command from your project folder:
ruby gobaby.rb
The script will:
- Fetch 30 days of price and volume data from Coinbase
- Compute volatility, range, and trend metrics for each coin
- Rank and score all coins, saving three output files:
scores.csvβ full list of ranked coinsskipped.csvβ coins that couldnβt be scoredrecommendations.csvβ your 4 best picks for the next week
Compare your current trader coins with the new top 4:
- Coins in both lists β keep trading
- Coins dropped from the top 4 β prepare to phase out
- Coins new in the top 4 β enable them in GoBabyTrade
You have three main strategies depending on how aggressively you want to rotate.
Let open lots sell naturally but stop adding new ones.
Steps:
- Go to Menu β Select Currencies
- Uncheck Add for that coin (leave Sell checked)
- Click Spread Funds Equally
- Click Save All Settings
β
Pros: Keeps profit-taking logic intact.
Lower your profit target so existing lots close sooner.
Steps:
- Go to Menu β Edit Strategy
- Find Profit Goal (Per Trade)
- Temporarily reduce (e.g., from
5%β2%) - Click Save All Settings
β
Pros: Speeds up liquidation while staying within system logic.
Force-sell all or some open lots immediately.
Steps:
- Go to Menu β My Trader
- Locate the coin and click Close to sell all, or expand (+) to close specific lots.
- When prompted, check βStop the trader from purchasing more.β
- After sell orders complete, return to Select Currencies β Spread Funds Equally β Save All Settings.
β
Pros: Frees capital right away.
- Sunday: Run
ruby gobaby.rb, rebalance your coins using the top 4 picks. - MondayβFriday: Let GoBabyTrade operate autonomously β no manual trades.
- Saturday: Review profits and open positions. If funds are low, adjust allocations.
- Sunday (next week): Repeat β run the script, update your coins, rebalance again.
- Always keep at least one high-liquidity coin in rotation (e.g., SOL, BTC, ETH).
- Avoid switching coins more than once per week β let volatility cycles play out.
- Keep around 10β20% of USDC in reserve to handle new entries or ladder buys.
- Move realized profits back to USDC monthly to maintain compounding stability.
Running the script weekly + letting GoBabyTrade manage entries/exits allows:
- Maximum exposure to active market cycles
- Controlled downside via volatility scoring
- Passive compounding without over-managing
This rhythm is designed for a low-time, high-consistency approach β just one rebalance per week.
Adding a simple weekly tracking routine helps you measure results, refine your strategy, and stay consistent over time.
To understand how your GoBabyTrade portfolio performs week over week β how much profit youβre realizing, which coins perform best, and how your volatility-based selections behave in real market cycles.
-
After running
ruby gobaby.rbeach Sunday:- Note the 4 recommended coins from
recommendations.csv. - Copy the list into your tracking file (see format below).
- Note the 4 recommended coins from
-
At the end of each week (Saturday):
- Open GoBabyTrade β My Trader.
- Record your realized profit for the week.
- Estimate your average daily gain % (divide weekly gain by 7 and portfolio size).
- Add any short notes β e.g., βSOL was strongest, SHIB low volume week.β
-
Update your CSV log or sheet:
- Use the format below in a local file like
history.csvor a Google Sheet. - Optionally automate appending this data from Ruby (future improvement).
- Use the format below in a local file like
week_start, top_4_picks, total_profit_usd, avg_daily_gain_pct, notes
2025-10-13, "DOGE,SUI,L3,XCN", 312.50, 0.42, "SUI strong trend; DOGE flat."
2025-10-20, "SHIB,SOL,ALGO,XCN", 287.10, 0.37, "Lower volatility this week."
2025-10-27, "SOL,SUI,L3,TRB", 425.75, 0.55, "SOL breakout; strong mid-vol performance."
π‘ Tip: Keep
history.csvin the same folder asgobaby.rbfor easy version control and future automation.
| Metric | Why It Matters |
|---|---|
| Weekly profit/loss (realized) | Tracks overall compounding progress |
| Average daily return % | Shows consistency of your results |
| Funds tied in open lots | Measures liquidity efficiency |
| Coin overlap week-to-week | Reveals stability in your selections |
| Top performers (by name) | Helps identify which coins are βkeepersβ |
At the end of each month:
- Sum the last 4 weeksβ realized profits
- Check if your average daily gain aligns with your expectations (e.g., ~0.4β0.5%)
- Look for coins appearing in multiple top-4 selections β these are statistically resilient picks
- Use your notes to tune parameters or decide when to adjust your grid size or profit goal
By tracking weekly, youβll:
- Quantify real returns instead of guessing
- Spot early signs of underperformance
- Build confidence in your data-driven rebalancing
- Create a permanent performance log you can use to refine your model
MIT License β use at your own risk.
Crypto trading involves substantial risk.