StratBase.aiStratBase.ai
DashboardCreate BacktestMy BacktestsCatalogBlogNewsToolsHelp

Products

  • Researcher Dashboard
  • Create Backtest
  • My Backtests
  • Catalog
  • Blog
  • News

Alerts

  • Calendar
  • OI Screener
  • Funding Rate
  • REKT
  • Pump/Dump

Company

  • About Us
  • Pricing
  • Affiliate
  • AI Widget
  • Contact

Legal

  • Privacy
  • Terms
  • Refund Policy

Support

  • Help Center
  • Reviews
StratBase.aiStratBase.ai

Think it. Test it.

StratBase.ai does not provide financial advice or trading recommendations. AI only formalizes user ideas into testable strategy configurations for research purposes. Past backtesting performance does not guarantee future results. All trading decisions and associated risks are the sole responsibility of the user. This platform is not a broker and does not facilitate real trading.

© 2026 StratBase.ai · AI-powered strategy research and backtesting platform

support@stratbase.ai
Help Center/Markets/Crypto Spot Trading

Crypto Spot Trading

📋Markets
📌

Crypto Spot Trading

Test strategies on cryptocurrency spot markets using historical data from Binance and Bybit.

📋

What is Spot Trading?

Spot trading involves buying and selling the actual cryptocurrency asset. When you buy BTC/USDT on spot, you own the BTC. Key characteristics:

  • No leverage — you trade with your own capital only (1×)
  • Long only — you buy to open, sell to close
  • No liquidation risk — your position can't be forcibly closed
  • No funding rates — no periodic payments
📌

How Spot Trading Works: Step-by-Step

Understanding the mechanics of spot trading is essential for backtesting effectively. Here's how a spot trade unfolds from start to finish:

Step 1: Identifying a Trading Opportunity

Your strategy analyzes historical price data and identifies when to enter a position. For example, your algorithm might detect that Bitcoin has pulled back 10% from its moving average and generates a BUY signal.

Step 2: Placing a Buy Order

When your strategy triggers a buy signal, you place a market order to purchase the cryptocurrency. The order executes at the current market price (plus slippage in real trading). In backtest mode, StratBase.ai simulates this execution using historical price data at the timestamp of your signal.

Example: Your strategy sends a buy signal at 2024-01-15 10:00 UTC when BTC/USDT is trading at $42,500. You specify buying $5,000 worth of Bitcoin, which equals approximately 0.1176 BTC ($5,000 ÷ $42,500 = 0.11765 BTC).

Step 3: Holding the Position

After your buy order executes, you now own the actual Bitcoin. You hold this position in your portfolio while waiting for your exit signal. During this holding period:

  • Your position value fluctuates with the market price
  • You don't pay any funding rates (unlike futures)
  • Your position cannot be liquidated, no matter how far the price moves against you
  • You accumulate the cryptocurrency in your account

Step 4: Executing the Exit

Your strategy identifies an exit condition—perhaps the price reaches your profit target, or a sell signal triggers based on technical indicators. You place a sell order to convert your Bitcoin back into USDT (or your base currency).

Continuing the example: Five days later on 2024-01-20, Bitcoin rises to $44,200. Your strategy's profit-taking rule triggers a SELL signal. You sell your 0.1176 BTC at $44,200, receiving $5,200.64.

Step 5: Calculating Results

The backtest calculates your trade outcome:

  • Entry: 0.1176 BTC at $42,500 = $5,000 cost
  • Exit: 0.1176 BTC at $44,200 = $5,200.64 proceeds
  • Gross profit: $200.64
  • Commission cost: $5,000 × 0.10% (maker) + $5,200.64 × 0.10% (taker) = $10.20
  • Net profit: $200.64 - $10.20 = $190.44
  • Return: 3.81% on the $5,000 risked
📌

Available Exchanges & Instruments

| Exchange | Instruments | Data Period | |----------|-------------|-------------| | Binance | 1,000+ pairs | Varies by pair (up to 5+ years) | | Bybit | 500+ pairs | Varies by pair |

Popular spot pairs: BTC/USDT, ETH/USDT, BNB/USDT, SOL/USDT, XRP/USDT, DOGE/USDT, ADA/USDT, AVAX/USDT.

📌

Commission Presets

| Preset | Maker Fee | Taker Fee | |--------|-----------|-----------| | Binance Spot | 0.10% | 0.10% | | Bybit Spot | 0.10% | 0.10% |

Commission is applied at both entry and exit. When backtesting, ensure you have the correct exchange preset selected, as it affects your profitability calculations. Real-world commissions may vary based on your account VIP level and volume, so the preset represents standard fees.

💡

Practical Example: Building and Testing a Spot Trading Strategy

Let's walk through a complete example of building and backtesting a simple spot trading strategy on StratBase.ai.

Strategy Setup

Strategy: Buy BTC/USDT when it closes above a 20-day moving average, and sell when it closes below the moving average.

Parameters:

  • Instrument: BTC/USDT (Binance Spot)
  • Timeframe: Daily candles
  • Initial Capital: $10,000
  • Position Size: 100% of available capital per trade
  • Date Range: January 1, 2023 to December 31, 2023

Backtest Simulation

Trade 1:

  • Date: February 14, 2023
  • Signal: Price closes above 20-day MA at $24,800
  • Entry: Buy $10,000 worth = 0.4032 BTC
  • Commission: $10,000 × 0.10% = $10
  • Effective cost: $10,010
  • Position held: 0.4032 BTC

Trade 2:

  • Date: March 8, 2023
  • Signal: Price closes below 20-day MA at $26,500
  • Exit: Sell 0.4032 BTC at $26,500 = $10,684.80
  • Commission: $10,684.80 × 0.10% = $10.68
  • Net proceeds: $10,674.12
  • Trade P&L: +$664.12 (6.6%)

The backtest continues through the entire year, compounding profits and losses. At the end of 2023, let's say the strategy shows:

  • Total trades: 8
  • Winning trades: 5
  • Losing trades: 3
  • Total return: 18.5%
  • Maximum drawdown: 8.2%
  • Sharpe ratio: 1.45
📌

Trading Scenarios Where Spot is Useful

Scenario 1: Dollar-Cost Averaging (DCA)

Use Case: You want to accumulate Bitcoin gradually over time regardless of price.

Strategy: Every week, invest $500 into BTC/USDT on the spot market. This strategy works perfectly with spot trading because:

  • You own the actual Bitcoin, not a leveraged position
  • No liquidation risk even if Bitcoin drops 50%
  • No funding rates eating into your returns
  • You can hold indefinitely with zero pressure

Example: Over 52 weeks, you buy $26,000 worth of Bitcoin at varying prices ($20,000 to $30,000). Even if the final price is $25,000, you still own the full amount of Bitcoin purchased. You haven't lost the underlying asset through liquidation.

Scenario 2: Trend-Following Strategy

Use Case: You identify strong uptrends in altcoins and want to ride the momentum.

Strategy: When a coin breaks above its 50-day moving average on 4-hour candles with above-average volume, buy. When momentum divergence appears, sell.

Why spot works:

  • Trend-following is long-only, so you don't need shorting capability
  • No leverage needed—you want steady, compounding gains
  • No liquidation anxiety during normal market pullbacks
  • Perfect for testing entry/exit logic without complexity

Backtest example:

  • Entry: SOL/USDT at $25 when it breaks above MA
  • Position: $5,000 = 200 SOL
  • Hold through the trend
  • Exit: $45 when divergence appears
  • Profit: $4,000 (80%), minus $10 commission = $3,990 net

Scenario 3: Mean Reversion on Stablecoins

Use Case: You notice that certain altcoins sometimes decouple from their moving averages.

Strategy: When LUNA/USDT drops 15% in a day, buy the dip. When it recovers to normal levels, sell for a quick profit.

Why spot is ideal:

  • Quick turnarounds mean you need fast execution
  • No liquidation pressure if the dip continues
  • Commission is your only risk metric (not leverage and liquidation)
  • Simple, repeatable logic easy to backtest

Example backtests:

  • Trade 1: Buy LUNA at $10 (after 15% drop), sell at $11.50 (+15% gross, 13% net)
  • Trade 2: Buy at $9, sell at $10.80 (+12% gross, 10% net)
  • Trade 3: Buy at $8, sell at $7.50 (-6.25% + commissions = -6.35% net)
💡

Pro Tips for Spot Trading Strategy Backtesting

Tip 1: Always Account for Commission in Your Targets

Your profit target must exceed the round-trip commission cost. If you're trading on Binance spot (0.10% maker + 0.10% taker = 0.20% total), a trade that makes 0.15% is actually a loser.

Example:

  • Buy $10,000 worth at $100 = 100 units
  • Commission: $10 (entry)
  • You need to sell at $100.30 just to break even
  • ($10,030 proceeds - $10.03 exit commission = $10,019.97 final)

Tip 2: Be Realistic About Order Fills in Backtests

In reality, the price you see when your signal triggers might not be the exact fill price. Set reasonable slippage assumptions:

  • Liquid pairs (BTC, ETH): assume 0.05% slippage
  • Medium pairs (BNB, SOL): assume 0.10% slippage
  • Lower liquidity pairs: assume 0.20% slippage

Apply this slippage on top of commissions to get realistic backtest results.

Tip 3: Test Different Position Sizing

Don't always use 100% of capital per trade. Compare results with:

  • Full capital per trade (aggressive)
  • 50% per trade (allows pyramiding)
  • Fixed dollar amounts ($1,000 per trade)
  • Kelly Criterion formula (risk-based sizing)

Example: A strategy that trades 50% per entry instead of 100% might have lower individual trade returns but higher consistency and lower max drawdown.

Tip 4: Include Slippage and Realistic Conditions

Spot market liquidity varies by pair and exchange. When backtesting:

  • Use limit orders when possible (maker fees are cheaper)
  • Add slippage to market orders
  • Account for spreads during low-volume periods
  • Test on the exchange you actually plan to use

Tip 5: Monitor Your Drawdown Carefully

Even though spot trading has no liquidation risk, significant drawdowns can tempt you to abandon your strategy. Monitor:

  • Maximum drawdown (worst peak-to-trough decline)
  • Drawdown duration (how long to recover)
  • Average drawdown (typical underwater period)

A strategy with -15% max drawdown but 40% annual return is better than one with -5% drawdown and 5% return—but only if you can emotionally handle it.

Tip 6: Backtest Across Different Market Regimes

Test your strategy on:

  • Bull markets: January 2021 (explosive growth)
  • Bear markets: 2022 (extended declines)
  • Sideways markets: Mid-2023 (range-bound)
  • Volatile periods: Major events and crashes

A strategy that works in bull markets might fail in bear markets. The best strategies are robust across multiple conditions.

📌

Common Mistakes to Avoid

Mistake 1: Ignoring Commissions

Beginning traders often backtest without factoring in commission costs. A strategy that looks profitable at 3% returns becomes unprofitable when 0.20% commission erodes margins.

Solution: Always enable commission settings in StratBase.ai. The presets default to real-world values, so don't disable them. If you're planning to use VIP discounts, account for those in your settings.

Mistake 2: Overfitting to Historical Data

Your strategy might perform spectacularly on 2023 data but fail miserably in 2024 if you've optimized too heavily for historical patterns.

Solution: Always backtest out-of-sample. If you optimize parameters on 2023, validate on 2024. Use walk-forward analysis where you re-optimize periodically. A simpler strategy that works consistently is better than a complex one that fits perfectly.

Mistake 3: Ignoring Liquidity Constraints

You can't actually fill a $10 million order for a micro-cap coin at the price shown on a 1-minute candle.

Solution: Before backtesting, verify that your target instruments have sufficient liquidity. Stick to the top 100-200 cryptocurrencies by volume. For altcoins, reduce your position size to realistic amounts.

Mistake 4: Not Accounting for Gaps and Slippage

Historical data is smooth, but real markets gap overnight. A strategy based on precise closing prices might fail when gaps occur.

Solution: Add 0.05-0.20% slippage to all entries and exits depending on liquidity. Account for market opens after news events. Test with slightly wider stop-losses than expected.

Mistake 5: Confusing Gross Returns with Net Returns

Your backtest might show +20% gross, but after commissions, slippage, and spreads, actual returns could be +12%.

Solution: Always focus on net returns (after all costs). Enable slippage and commission settings. Write down all assumptions and review them regularly.

Mistake 6: Testing Without Considering Market Conditions

Bitcoin in 2021 behaved very differently from Bitcoin in 2022. A strategy that assumes crypto only goes up will fail during bear markets.

Solution: Test your strategy across multiple years and market conditions. Look at performance metrics during:

  • The strongest months (how much did you capture?)
  • The weakest months (how much did you lose?)
  • Volatile periods (can your strategy handle swings?)

Mistake 7: Neglecting Drawdown Psychology

A strategy with 50% max drawdown might be mathematically profitable but emotionally unbearable.

Solution: Review drawdown metrics in your backtest results:

  • If max drawdown exceeds your emotional tolerance, reduce position size
  • Look for strategies with slower, less volatile equity curves
  • Consider adding take-profit targets to lock in gains earlier
📌

Spot vs Futures

Choose Spot when:

  • You don't need leverage or short selling
  • You want lower risk (no liquidation)
  • Your strategy is long-only (buy dips, hold, sell)
  • You want to own the actual cryptocurrency
  • You prefer simpler position management
  • You're testing a new strategy concept

Choose Futures when:

  • You need leverage to amplify returns
  • Your strategy goes short (profit from price drops)
  • You want to use futures-specific indicators (Open Interest, Funding Rate)
  • You have experience with leverage trading
  • You want to hedge existing spot positions
  • You need to test bearish strategies

Comparison Table:

| Feature | Spot | Futures | |---------|------|---------| | Leverage | 1× (no leverage) | 2-10× (configurable) | | Liquidation Risk | None | Yes, if underwater | | Funding Rates | None | Yes, pay/receive | | Short Selling | Not possible | Possible | | Actual Asset | Yes, you own it | No, perpetual contract | | Complexity | Simple | Moderate-High | | Commission | ~0.10% | ~0.05-0.10% |

Tip: Start with spot to validate your strategy logic, then move to futures if you need leverage. Spot results are easier to interpret because there's no leverage distortion. A strategy that consistently wins on spot with 1× leverage will perform even better on futures with 2× leverage (if it maintains discipline).

❓

FAQ

Q: Can I short on spot? A: No. Spot trading is long-only. Use Futures for short positions.

Q: Are Binance and Bybit data the same? A: Similar but not identical. Different exchanges have slightly different prices and volumes. Test on the exchange you plan to trade on. Binance generally has tighter spreads and deeper liquidity, while Bybit offers different fee structures and altcoin pairs.

Q: What's the difference between a "taker" and "maker" fee? A: A maker fee applies when you place an order that sits in the order book (you're making liquidity). A taker fee applies when your order immediately fills against an existing order (you're taking liquidity). Market orders are takers. Limit orders might be makers if they don't fill immediately. Both are typically 0.10% on Binance and Bybit spot, but makers sometimes get discounts.

Q: How much historical data should I use for backtesting? A: At minimum, 1-2 years of data. Ideally, 3-5