Disclaimer: Not financial advice. All examples use paper trading / simulated environments only. Crypto is highly volatile — you can lose 100% of your investment. This guide is educational only.
The most expensive mistake in crypto isn't buying the wrong coin.
It's going live before you're ready.
I've watched people lose thousands of dollars in their first week of "automated trading" because they skipped one crucial step: paper trading.
This guide will show you exactly how to set up AI-assisted paper trading for crypto — so when you eventually go live, you do it with months of data proving your strategy works.
What Is Paper Trading?
Paper trading (also called "simulated trading" or "virtual trading") means you execute trades using real market prices but with fake money.
You track what you would have bought and sold, at what prices, and measure your hypothetical profit/loss over time.
It sounds simple. It's profoundly useful.
Here's why most beginners skip it and regret it:
"I understand the theory. I just want to start making money."
The theory and the practice are completely different things. Paper trading is where you discover:
- Your strategy has a 45% win rate, not the 70% you imagined
- You exit positions emotionally rather than at your planned targets
- Your "buy the dip" logic fires during bear markets and never recovers
- Transaction fees eat more of your profit than you modeled
You find all of this out with fake money instead of real money. That's the entire point.
Why Add AI to Paper Trading?
Manual paper trading means logging every trade in a spreadsheet. That works, but it has limits:
- You miss signals when you're not watching
- You can't analyze thousands of candles manually
- Emotion still affects your decisions even with fake money
- You can't test "what if I had bought here?" systematically
AI-assisted paper trading changes this:
- AI scans for signals 24/7 while you sleep
- AI logs every opportunity it identifies, whether you "trade" it or not
- AI analyzes your historical decisions and finds patterns in your behavior
- AI generates market commentary that helps you learn faster
The goal isn't to let AI make the trades. The goal is to learn faster by having an intelligent system surfacing information and tracking outcomes.
The Stack: What You Need
For a complete beginner, here's what I recommend:
Required (Free)
- Python 3.10+ — python.org
- Ollama — local LLM runner — ollama.ai
- Llama 3.2 (3B model) — runs on any modern laptop
- CoinGecko API — free market data, no account needed
Optional but helpful
- OpenClaw — AI agent runtime for chaining skills together
- CryptoClaw Skills — pre-built analysis modules
Install in 5 minutes:
# 1. Install Ollama (downloads from ollama.ai)
# 2. Pull the model
ollama pull llama3.2:3b
# 3. Install Python packages
pip install requests pandas rich schedule
Building Your Paper Trading System
Step 1: The Price Tracker
import requests
import json
from datetime import datetime
from pathlib import Path
PORTFOLIO_FILE = Path("paper_portfolio.json")
def load_portfolio():
if PORTFOLIO_FILE.exists():
return json.loads(PORTFOLIO_FILE.read_text())
return {
"cash": 10000.00, # Start with $10,000 virtual dollars
"holdings": {},
"trades": []
}
def save_portfolio(portfolio):
PORTFOLIO_FILE.write_text(json.dumps(portfolio, indent=2))
def get_prices(coins=["bitcoin", "ethereum", "solana"]):
resp = requests.get(
"https://api.coingecko.com/api/v3/simple/price",
params={
"ids": ",".join(coins),
"vs_currencies": "usd",
"include_24hr_change": "true",
"include_market_cap": "true"
}
)
return resp.json()
# Load your portfolio
portfolio = load_portfolio()
prices = get_prices()
print(f"Cash: ${portfolio['cash']:,.2f}")
for coin, data in prices.items():
if coin in portfolio['holdings']:
held = portfolio['holdings'][coin]
value = held * data['usd']
print(f"{coin}: {held:.6f} units = ${value:,.2f} ({data['usd_24h_change']:+.2f}% 24h)")
Step 2: Paper Buy/Sell Functions
def paper_buy(portfolio, coin, amount_usd, current_price, reason=""):
"""Simulate buying a coin with USD."""
if portfolio['cash'] < amount_usd:
print(f"⌠Insufficient cash: have ${portfolio['cash']:.2f}, need ${amount_usd:.2f}")
return portfolio
units = amount_usd / current_price
portfolio['cash'] -= amount_usd
portfolio['holdings'][coin] = portfolio['holdings'].get(coin, 0) + units
trade = {
"type": "BUY",
"coin": coin,
"usd": amount_usd,
"units": units,
"price": current_price,
"reason": reason,
"timestamp": datetime.now().isoformat()
}
portfolio['trades'].append(trade)
save_portfolio(portfolio)
print(f"✅ Paper BUY: {units:.6f} {coin} at ${current_price:,} = ${amount_usd:.2f}")
return portfolio
def paper_sell(portfolio, coin, units, current_price, reason=""):
"""Simulate selling a coin for USD."""
if portfolio['holdings'].get(coin, 0) < units:
print(f"⌠Insufficient holdings")
return portfolio
usd_received = units * current_price
portfolio['holdings'][coin] -= units
portfolio['cash'] += usd_received
trade = {
"type": "SELL",
"coin": coin,
"usd": usd_received,
"units": units,
"price": current_price,
"reason": reason,
"timestamp": datetime.now().isoformat()
}
portfolio['trades'].append(trade)
save_portfolio(portfolio)
print(f"✅ Paper SELL: {units:.6f} {coin} at ${current_price:,} = ${usd_received:.2f}")
return portfolio
Step 3: AI Market Analysis
import subprocess
def get_ai_analysis(coin, price, change_24h, portfolio):
"""Ask the local LLM for market analysis."""
prompt = f"""
You are a cautious crypto market analyst. Analyze this data and give a brief assessment.
Coin: {coin}
Current price: ${price:,}
24h change: {change_24h:+.2f}%
My current paper portfolio:
- Cash available: ${portfolio['cash']:,.2f}
- Holdings: {portfolio['holdings']}
Question: Based purely on this price action, what is your market sentiment for {coin}?
- Is this bullish, bearish, or neutral?
- Is there a potential entry opportunity or should we wait?
- What risk should we be mindful of?
Keep your response to 3-4 sentences. Be conservative and analytical, not hype.
Remember: We are paper trading only, not risking real money.
"""
result = subprocess.run(
["ollama", "run", "llama3.2:3b", prompt],
capture_output=True, text=True, timeout=30
)
return result.stdout.strip()
# Example usage
prices = get_prices(["bitcoin"])
btc_price = prices["bitcoin"]["usd"]
btc_change = prices["bitcoin"]["usd_24h_change"]
analysis = get_ai_analysis("bitcoin", btc_price, btc_change, portfolio)
print(f"\n🤖 AI Analysis for BTC:")
print(analysis)
The 90-Day Paper Trading Challenge
Here's the challenge I set for myself — and the one I recommend to every beginner:
Trade paper only for 90 days. Track everything. Analyze your results.
Week 1-4: Learn the mechanics
- Set up your tracking system
- Make at least 2-3 paper trades per week
- Log your reasoning for every trade
Week 5-8: Test a strategy
- Pick ONE simple strategy (e.g., buy when 7-day MA crosses above 30-day MA)
- Apply it consistently for 4 weeks
- Don't deviate based on emotion
Week 9-12: Measure and refine
- Calculate your actual P&L
- What was your win rate?
- What was your average gain vs average loss?
- Where did you make mistakes?
If your strategy is profitable after 90 days: congratulations, you have edge.
If it's not: you just saved yourself real money finding that out with fake money.
Common Beginner Mistakes (Avoid These)
1. Skipping paper trading entirely
I know. It feels slow. Do it anyway.
2. Not tracking your reasoning
Always log WHY you made a trade. "It looked like it was going up" teaches you nothing.
3. Paper trading too carefully
Be realistic. If you'd feel FOMO with real money, practice managing that emotion with fake money.
4. Setting an unrealistic timeframe
90 days minimum. Markets cycle. You need to see bull runs AND corrections.
5. Moving to live trading before you're profitable in paper
This seems obvious. People still do it.
Getting the Full System
I documented the complete paper trading + AI analysis setup in the CryptoClaw guide — including:
- Full Python scripts for portfolio tracking
- AI signal scanning with Ollama
- Automated logging and reporting
- The exact strategy I paper traded for 90 days before going live
👉 CryptoClaw Guide — Local AI Crypto Trading
Free skills for OpenClaw users:
Paper trading is boring. Losing real money is worse.
Take the 90-day challenge. You'll thank yourself later.
All code examples for educational purposes. Paper trading only. Not financial advice. Crypto is highly speculative.
Top comments (0)