1Installation

Install the PRIME trading system using pip:

pip install prime-trading

# Or install from source
git clone https://github.com/algocookbook/prime
cd prime
pip install -e .
Requirements: Python 3.9+, 8GB RAM minimum, stable internet connection

2Configuration

Create a configuration file with your API credentials:

# config.yaml
trading:
  mode: paper  # Start with paper trading
  api_key: YOUR_ALPACA_KEY
  api_secret: YOUR_ALPACA_SECRET
  
risk:
  level: moderate
  max_position_size: 0.05
  stop_loss: 0.02
  take_profit: 0.04
  
strategies:
  - momentum
  - mean_reversion
  - ml_ensemble

3First Script

Create your first PRIME trading script:

from prime import PrimeTrader

# Initialize the trading system
trader = PrimeTrader(config='config.yaml')

# Set up risk parameters
trader.set_risk_params(
    max_drawdown=0.15,
    position_sizing='kelly'
)

# Start paper trading
trader.start()

# Monitor performance
print(f"System Status: {trader.status}")
print(f"Active Positions: {len(trader.get_positions())}")
print(f"Current P&L: ${trader.get_pnl():,.2f}")

4Paper Trading

Always start with paper trading to test your configuration:

⚠️ Important: Never skip paper trading. PRIME needs time to adapt to your risk profile and market conditions.

5Going Live

When you're ready for live trading:

# Update your config
trading:
  mode: live  # Switch to live mode
  
# Add safety checks
safety:
  require_confirmation: true
  max_daily_loss: 0.02
  circuit_breaker: true
  
# Initialize with safety
trader = PrimeTrader(
    config='config.yaml',
    safe_mode=True  # Extra safety for live trading
)

📚 Next Steps

🆘 Need Help?

Get support through these channels: