TL;DR

  • Paper trading uses real market data with simulated order execution — zero financial risk.
  • slmaj connects to IBKR's paper trading port (7497) by default. No config changes needed to start.
  • Track your performance for 2-4 weeks before considering live trading.
  • Paper fills are idealized — expect slightly worse results when you go live.
  • Switching to live requires changing one config value and restarting.

What Is Paper Trading?

Paper trading is simulated trading that uses real-time market data but executes orders in a virtual environment. No actual money changes hands. You get the full experience of watching positions open and close, seeing profit and loss fluctuate, and receiving trade signals — all without financial consequences.

Interactive Brokers provides one of the best paper trading environments in the industry. When you open an IBKR account, you automatically get a paper trading account that mirrors the live platform. It receives the same real-time quotes, supports the same order types, and runs on the same infrastructure. The only difference is that fills are simulated rather than routed to an exchange.

slmaj connects to this IBKR paper environment through port 7497 (compared to port 7496 for live trading). Every component of the bot functions identically in paper mode: the ML ensemble generates signals, data sources feed in market information, and risk controls evaluate every trade. The trade journal logs everything as if it were a real session. The only thing that changes is where orders go — to a simulator instead of a real exchange.

This is not a backtesting tool. Backtesting replays historical data and tells you what would have happened. Paper trading runs forward in real time and tells you what is happening, right now, with live market conditions. It is the closest you can get to live trading without putting capital at risk.

Getting Started with Paper Mode

If you have already completed the IBKR setup guide, paper trading is ready to go. The setup wizard defaults to paper mode, so unless you explicitly changed it, your installation is already configured for simulated trading.

Step 1: Run the setup wizard. If you have not done this yet, start here. The wizard asks about your experience level, risk tolerance, and preferred asset classes, then writes a complete config file.

$ python setup_wizard.py

Welcome to slmaj Trading Bot Setup

? Experience level: Beginner
? Risk tolerance: Conservative
? Asset classes: Stocks, Forex
? Trading mode: Paper (simulated)

✓ Config written to config.yaml
✓ Ready to start paper trading

Step 2: Verify your config. Open config.yaml and confirm the trading mode and port are set for paper trading:

trading:
  mode: paper       # "paper" for simulated, "live" for real money
  port: 7497        # 7497 = paper trading port
  host: 127.0.0.1   # localhost — IBKR TWS or Gateway

risk:
  max_position_size: 10000
  max_positions: 5
  daily_loss_limit: 2000
  stop_loss_pct: 0.02
  take_profit_pct: 0.04

The two critical values are mode: paper and port: 7497. When both are set, slmaj will connect to the IBKR paper trading environment.

Step 3: Start IBKR Trader Workstation (TWS) or IB Gateway. Log into TWS with your paper trading credentials. IBKR provides separate login credentials for paper accounts — check your IBKR account management page if you do not have them. Make sure the API port is enabled under TWS settings (Edit > Global Configuration > API > Settings) and set to 7497.

Step 4: Launch slmaj.

$ python live_trading_bot.py

[2026-02-27 09:30:01] INFO  Connecting to IBKR paper account on port 7497...
[2026-02-27 09:30:02] INFO  Connected. Account: DU1234567 (Paper)
[2026-02-27 09:30:02] INFO  Loading ML models...
[2026-02-27 09:30:04] INFO  Models loaded. Fetching market data...
[2026-02-27 09:30:05] INFO  Paper trading session started. Dashboard: http://localhost:5555

On first launch, the bot connects to IBKR, loads the ML models, and begins collecting market data. It may take a few minutes before the first signal fires — the models need enough data to generate a confident prediction. The web dashboard at localhost:5555 shows the bot status in real time.

Step 5: Let it run. Leave the bot running during market hours. It will generate signals, evaluate risk, and execute paper trades automatically. Check the dashboard periodically to see what it is doing. There is no need to intervene unless you want to stop the session.

Understanding Your Paper Results

Every trade the bot makes is logged in the trade journal, both as a log file on disk and in the web dashboard. Understanding these results is essential before you consider live trading.

Key metrics to track:

  • Win rate — The percentage of trades that closed in profit. A win rate above 50% is good; above 55% is strong. But win rate alone means little without understanding average gain vs average loss.
  • Average P&L per trade — The mean dollar profit or loss across all closed trades. This should be positive. If your win rate is 45% but your average win is twice your average loss, you are still profitable.
  • Max drawdown — The largest peak-to-trough decline in account value during the test period. This tells you the worst-case pain you need to endure. A max drawdown of 8% means at one point your account dropped 8% from its high.
  • Sharpe ratio — Risk-adjusted return. A Sharpe ratio above 1.0 is acceptable; above 1.5 is good; above 2.0 is excellent. Below 0.5 means the returns are not justifying the risk taken.
  • Profit factor — Gross profits divided by gross losses. Above 1.0 means you are making more than you lose. Above 1.5 is solid.
  • Number of trades — You need a statistically meaningful sample. Fewer than 30 trades is not enough to draw conclusions. Aim for 50+ before evaluating performance.

Reading the trade journal. The journal logs every decision the bot makes. Here is an example of what a typical session looks like in the logs:

[2026-02-27 10:15:32] SIGNAL  BUY NVDA  | Confidence: 0.78 | Sources: RSI, Sentiment, Flow
[2026-02-27 10:15:32] RISK    Position size: $4,200 (Kelly: 0.42 * $10,000 cap)
[2026-02-27 10:15:32] RISK    Daily loss remaining: $1,650 of $2,000
[2026-02-27 10:15:32] RISK    Open positions: 3 of 5 max
[2026-02-27 10:15:33] TRADE   BUY 48 NVDA @ $87.52 | Stop: $85.77 | Target: $91.02
[2026-02-27 10:15:33] FILL    Paper fill: 48 NVDA @ $87.52

[2026-02-27 14:42:18] SIGNAL  Take profit triggered: NVDA @ $91.15
[2026-02-27 14:42:18] TRADE   SELL 48 NVDA @ $91.15 | P&L: +$174.24 (+4.1%)
[2026-02-27 14:42:18] FILL    Paper fill: 48 NVDA @ $91.15

Each log entry tells you exactly what happened and why. The SIGNAL line shows which ML models agreed and what data sources contributed. The RISK lines show every risk check the trade passed. The TRADE and FILL lines show execution details. This level of transparency is identical in paper and live mode.

The web dashboard at localhost:5555 displays these same metrics in a visual format with charts showing equity curve, drawdown over time, and trade distribution. Use it for a quick overview; use the log files for detailed analysis.

Paper Trading vs Real Trading

Paper trading is valuable, but it is not a perfect simulation of live markets. Understanding the differences will help you set realistic expectations.

Order fills are idealized. In paper mode, IBKR fills your orders at or very near the quoted price at the time of submission. In live trading, your order enters a real order book and competes with other participants. Market orders may experience slippage — you might get filled at a slightly worse price than what you saw. Limit orders might not fill at all if the market moves away from your price. Paper trading typically overstates fill quality.

Liquidity is unlimited in paper mode. If you send a paper order to buy 10,000 shares of a small-cap stock, it fills instantly at the quoted price. In reality, that order might move the price significantly, or it might take minutes to fill in pieces. For the liquid, large-cap stocks slmaj primarily trades (AAPL, NVDA, SPY, etc.), this difference is minimal. For smaller positions under $10,000, the impact is negligible even in live trading.

Slippage is absent. Slippage is the difference between the expected price and the actual execution price. It is caused by market movement between signal generation and order execution. In paper mode, slippage is effectively zero. In live trading, expect 0.01% to 0.05% slippage on liquid stocks and up to 0.1% on less liquid instruments. This adds up over many trades.

Emotional impact is different. Watching a paper position drop 2% and hit your stop loss feels very different from watching real money disappear. Many traders who perform well in paper mode underperform live because they override their system — closing winning trades too early, holding losing trades too long, or turning off the bot during a drawdown. The bot eliminates emotional decision-making, but only if you let it run.

Market impact does not exist in paper mode. Your paper orders do not interact with the real market. In live trading, particularly with larger position sizes, your orders are part of the market and can influence price. For the position sizes slmaj typically uses ($1,000 to $25,000), market impact is negligible on liquid instruments.

A practical rule of thumb: expect your live results to be 10-20% worse than your paper results. If you are profitable in paper mode with a comfortable margin, you have a reasonable basis for live trading. If your paper performance is barely breakeven, live trading will likely be unprofitable after accounting for these real-world frictions.

When to Go Live

Switching from paper to live is a significant decision. There is no single number that tells you "now is the time." Instead, use the following checklist to evaluate your readiness:

  • At least 2-4 weeks of paper trading completed. This gives you enough market conditions — trending days, choppy days, news events — to see how the bot performs across different regimes. A few good days is not enough data.
  • 50+ paper trades executed. Statistical significance matters. Fewer than 50 trades is too small a sample to draw reliable conclusions about the strategy's edge.
  • Positive Sharpe ratio above 1.0. This means the returns justify the risk taken. If the Sharpe is below 1.0, the strategy may not have a reliable edge, or the risk parameters need adjustment.
  • Max drawdown is within your tolerance. Look at the worst drawdown during paper testing. Can you stomach that happening with real money? If the paper max drawdown was 6% and you would panic at a 4% live drawdown, the answer is no.
  • You understand every risk parameter. Open your config file and explain what each risk setting does. If you cannot, read the risk controls documentation before going live.
  • You have defined a personal risk budget. Decide in advance: what is the maximum amount you are willing to lose before stopping? Write this number down. If the bot hits it, you stop. No exceptions.
  • You have reviewed the trade journal. Look at losing trades specifically. Were they stopped out properly? Did the risk controls work as expected? Are there patterns in the losses you want to address?
  • Your IBKR live account is funded and configured. Follow the IBKR setup guide to ensure your live account API settings are correct, including the live trading port (7496).

If you cannot check every item on this list, continue paper trading. There is no cost to running paper mode longer, and the information you gain is valuable.

Switching from Paper to Live

When you are ready, the switch is straightforward. Open your config.yaml and change two values:

# Before (paper trading)
trading:
  mode: paper
  port: 7497

# After (live trading)
trading:
  mode: live
  port: 7496

That is the entire change. Every other setting — risk parameters, asset classes, ML model configuration — stays the same.

Important: start with minimum position sizes. Even if your paper testing used $10,000 positions, start live with smaller sizes. Consider cutting max_position_size in half for your first week of live trading. You can scale up after confirming that live fills and performance match your paper expectations.

# Conservative first-week live config
risk:
  max_position_size: 5000   # Half of paper test size
  max_positions: 3           # Fewer concurrent positions
  daily_loss_limit: 1000     # Tighter daily cap
  stop_loss_pct: 0.02
  take_profit_pct: 0.04

Monitor the first live session closely. Watch the dashboard and the logs for the first full trading day. Verify that:

  • The bot connects to the live account (you will see your live account number in the logs, not a "DU" paper account number).
  • Orders are submitting and filling at expected prices.
  • Slippage is within the 0.01-0.05% range discussed above.
  • Risk controls are functioning — stop losses trigger, position limits hold, daily loss cap is respected.

If anything looks unexpected, you can switch back to paper mode at any time by reversing the config change. See the IBKR setup guide for full details on port configuration and connection settings.

You can run paper and live simultaneously if you have both TWS instances open (one logged into paper, one into live). Use separate config files and separate bot instances. This lets you continue testing new configurations in paper while running a proven config in live.

Frequently Asked Questions

Does paper trading cost anything?

No. IBKR paper trading accounts are free and included with every IBKR account. There are no fees for simulated trades. slmaj does not charge differently for paper vs live mode — both are included in your license.

Can I paper trade outside market hours?

IBKR paper trading follows real market hours. US stock signals only generate during regular trading hours (9:30 AM - 4:00 PM ET). Forex markets are available nearly 24 hours on weekdays. Crypto markets on supported exchanges may be available 24/7. The bot will not generate signals for an asset class when its market is closed.

How accurate are paper trading results compared to live?

Paper results are typically 10-20% better than live results. The main differences are order fill quality (paper fills are idealized), slippage (absent in paper), and liquidity assumptions (unlimited in paper). For liquid large-cap stocks and major forex pairs with position sizes under $25,000, the gap is smaller.

Can I reset my paper account balance?

Yes. IBKR allows you to reset your paper trading account through the Account Management portal. This gives you a fresh simulated balance. Note that resetting erases all paper trading history — export your trade journal from slmaj before resetting if you want to keep the records.