alphabench
(opens in a new tab)
(opens in a new tab)
(opens in a new tab)
(opens in a new tab)
The future of quantitative trading is conversational.
alphabench transforms natural language into production-ready trading strategies. No more weeks of backtesting infrastructure. No more copying boilerplate code. Just describe your strategy, and trade.
import alphabench
# That's it. Your idea → Backtested strategy in seconds.
result, _ = alphabench.chat("momentum strategy on nifty50 stocks, RSI < 30 entry")Why alphabench Exists
The problem: Quantitative trading has a massive execution gap. You have an idea at 2 AM. By the time you've set up data pipelines, written backtesting infrastructure, debugged edge cases, and validated results—the opportunity is gone. Or worse, you never start.
The insight: 90% of strategy research is undifferentiated heavy lifting. Data fetching, portfolio management, order execution simulation, performance metrics—this should be infrastructure, not your job.
The vision: What if testing a trading hypothesis was as fast as having the idea? What if you could iterate on 50 strategy variations in an afternoon instead of spending 50 days building the framework to test one?
alphabench makes quantitative trading immediate. The barrier between insight and validation collapses. This is where quant is moving—and the future is now.
Quickstart
Natural Language Strategy Research
import alphabench
# 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."
)
if error:
print(f"Error: {error}")
else:
print(f"Strategy ID: {result['strategy_id']}")
print(f"Total Return: {result['metadata']['backtest_results']['total_return']}")
print(f"Sharpe Ratio: {result['metadata']['backtest_results']['sharpe_ratio']}")
print(f"\nGenerated Code:\n{result['code']}")Programmatic Backtesting
import alphabench
# 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"
},
{
"identifier": "NSE:RELIANCE:738561",
"action": "SELL",
"quantity": 100,
"order_type": "MARKET",
"price": 2650.75,
"timestamp": "2025-01-20T14:30:00Z"
}
],
configuration={
"initial_capital": 1000000.00,
"commission_per_trade": 10.00,
"commission_pct": 0.001
}
)
print(f"Total P&L: ₹{result['portfolio']['total_pnl']}")
print(f"Win Rate: {result['metrics']['win_rate']}")Retrieve Results
# Get backtest status
status = alphabench.get_backtest_status("momentum_reliance_001")
# Get complete results with metrics
results = alphabench.get_backtest_results("momentum_reliance_001")Getting Started
- Installation - Install alphabench and set up your API key
- Quickstart - Try your first natural language strategy
- Features - Explore what's possible
- Advanced Usage - Error handling and custom configurations
Visit alphabench.in (opens in a new tab) to get your API key and start building strategies.
Features
🧠 AI-Powered Strategy Generation
- Natural language → Working strategy code
- Automatic indicator selection and parameter tuning
- Risk management built-in
⚡ Instant Backtesting
- Sub-minute strategy validation
- Real Indian market data (NSE/BSE)
- Realistic transaction costs and slippage
📊 Institutional-Grade Metrics
- Returns, Sharpe ratio, max drawdown
- Win rate, profit factor, trade analysis
- Portfolio attribution and risk decomposition
🔧 Full Control
- Use AI suggestions or write your own signals
- Customize every parameter
- Export strategies as production-ready code
🚀 Built for Speed
- Async processing for complex strategies
- API-first architecture
- Scales from idea validation to production