Features

Features

alphabench transforms natural language into production-ready trading strategies. Here are the core capabilities that make this possible.

🧠 AI-Powered Strategy Generation

Transform plain English descriptions into working trading strategies:

  • Natural language → Working strategy code
  • Automatic indicator selection and parameter tuning
  • Risk management built-in
# Describe your strategy in plain English
result, error = alphabench.chat(
    "Create a mean reversion strategy for large-cap Indian stocks. "
    "Buy when price drops 10% below 50-day MA with RSI < 30. "
    "Exit at 5% profit or 3% loss. 10 lakh starting capital."
)

⚡ Instant Backtesting

Test strategies immediately with realistic market conditions:

  • Sub-minute strategy validation
  • Real Indian market data (NSE/BSE)
  • Realistic transaction costs and slippage
# Execute backtest with your own signals
result = alphabench.execute_backtest(
    backtest_id="momentum_reliance_001",
    identifiers=["NSE:RELIANCE:738561", "NSE:TCS:694273"],
    from_date="2025-01-01T09:15:00Z",
    to_date="2025-01-31T15:30:00Z",
    signals=[{
        "identifier": "NSE:RELIANCE:738561",
        "action": "BUY",
        "quantity": 100,
        "order_type": "MARKET",
        "price": 2450.50,
        "timestamp": "2025-01-02T10:30:00Z"
    }],
    configuration={
        "initial_capital": 1000000.00,
        "commission_per_trade": 10.00,
        "commission_pct": 0.001
    }
)

📊 Institutional-Grade Metrics

Get comprehensive performance analysis with professional metrics:

  • Returns, Sharpe ratio, max drawdown
  • Win rate, profit factor, trade analysis
  • Portfolio attribution and risk decomposition
# Get complete results with metrics
results = alphabench.get_backtest_results("momentum_reliance_001")
print(f"Total P&L: ₹{results['portfolio']['total_pnl']}")
print(f"Win Rate: {results['metrics']['win_rate']}")
print(f"Sharpe Ratio: {results['metrics']['sharpe_ratio']}")

🔧 Full Control

Use AI suggestions or build completely custom strategies:

  • Use AI suggestions or write your own signals
  • Customize every parameter
  • Export strategies as production-ready code
# Custom backtest with advanced settings
result = alphabench.execute_backtest(
    backtest_id="custom_strategy_001",
    identifiers=["NSE:HDFC:738560", "NSE:ICICI:738561"],
    from_date="2024-01-01T09:15:00Z",
    to_date="2024-12-31T15:30:00Z",
    signals=[{
        "identifier": "NSE:HDFC:738560",
        "action": "BUY",
        "quantity": 50,
        "order_type": "LIMIT",
        "price": 1600.00,
        "timestamp": "2024-01-02T10:00:00Z"
    }],
    configuration={
        "initial_capital": 500000.00,
        "commission_per_trade": 20.00,
        "commission_pct": 0.002,
        "slippage_pct": 0.001,
        "benchmark": "NSE:NIFTY50:INDEX",
        "risk_free_rate": 0.06
    }
)

🚀 Built for Speed

Designed for rapid iteration and scaling:

  • Async processing for complex strategies
  • API-first architecture
  • Scales from idea validation to production

Next Steps

Ready to explore alphabench features? Get started with:

  1. Installation - Install the package and set up your API key
  2. Quickstart - Try your first natural language strategy
  3. Advanced Usage - Error handling and custom configurations

Visit alphabench.in (opens in a new tab) to get your API key and start building strategies.