Skip to content

Genius-apple/open-alpha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


πŸš€ Open Alpha

The Enterprise-Grade Quantitative Research Platform

From Hypothesis to Alpha β€” Build, Backtest, and Deploy Institutional-Quality Strategies.

Features β€’ Quick Start β€’ Documentation β€’ Contributing

Status Python React FastAPI License


Open Alpha is a high-performance, open-source quantitative research platform designed for serious algorithmic traders and researchers. Built on a robust FastAPI backend and a modern React frontend, it bridges the gap between ad-hoc analysis scripts and institutional-grade factor libraries. Whether you are mining new alpha signals, analyzing factor decay, or constructing multi-factor portfolios, Open Alpha provides the rigorously tested tools you need.

✨ Why Open Alpha?

  • ⚑ Velocity: Go from idea to statistically valid factor in seconds, not hours.
  • πŸ›‘οΈ Robustness: Industry-standard metrics (IC, ICIR, Turnover) prevent overfitting and false discoveries.
  • 🧠 Intelligence: Advanced expression engine supports complex time-series logic (ts_rank, ts_corr, winsorize).
  • πŸ”Œ Extensibility: Clean architecture allows easy integration of custom data sources and execution engines.

πŸ’Ž Features

🧠 Strategy Builder (New!)

  • Multi-Factor Combination: Combine alpha signals with adjustable weights.
  • Smart Normalization: Automatic Z-score standardization ensures apples-to-apples factor combination.
  • Strategy Persistence: Save and load your winning strategies; build a library of proven alphas.

πŸ§ͺ Factor Laboratory

  • Expression Engine: Powerful Python-like syntax for factor construction (e.g., rank(close) / ts_delay(open, 5)).
  • Institutional Metrics:
    • Alpha Quality: IC Mean, ICIR (Information Ratio), t-statistic.
    • Stability: Factor Autocorrelation, turnover analysis.
    • Risk: Sharpe, Sortino, Max Drawdown.
  • Deep Visualization: Interactive charts for Cumulative IC, Equity Curves, and Layered Quantile Returns.

πŸ“Š Data Explorer

  • Professional Charting: TradingView-style interactive charts (Lightweight Charts) with multi-timeframe support.
  • Instant Analysis: Browse terabytes of market data with zero latency.

πŸ† Factor Ranking

  • Leaderboard: Automatically score and rank factors based on a proprietary quality model (0-100).
  • Validity Checks: Automatic detection of "fake alpha" via monotonicity and statistical significance tests.

πŸš€ Quick Start

Prerequisites

  • Python 3.9+
  • Node.js 18+
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/yourusername/open-alpha.git
cd open-alpha

# Setup backend
pip install -r backend/requirements.txt

# Setup frontend
cd frontend
npm install
cd ..

# Copy environment template
cp .env.example .env

Running

Option 1: Separate terminals

# Terminal 1 - Backend
python -m backend.main

# Terminal 2 - Frontend
cd frontend && npm run dev

Option 2: Windows batch script

start_platform.bat

Access


πŸ“– Documentation

Factor Expression Syntax

# Basic price data
close, open, high, low, volume

# Time-series functions
ts_delay(x, n)      # Lag n periods
ts_mean(x, n)       # Rolling mean
ts_std(x, n)        # Rolling std
ts_max(x, n)        # Rolling max
ts_min(x, n)        # Rolling min
ts_rank(x, n)       # Rolling percentile rank
ts_corr(x, y, n)    # Rolling correlation

# Preprocessing
winsorize(x)        # Remove outliers
standardize(x)      # Z-score normalization

Example Factors

Factor Expression Description
Momentum close / ts_delay(close, 20) - 1 20-day price momentum
Volatility ts_std(close / ts_delay(close, 1) - 1, 20) 20-day return volatility
Mean Reversion (close - ts_mean(close, 20)) / ts_mean(close, 20) Deviation from MA
Volume-Price ts_corr(close, volume, 20) Price-volume correlation

πŸ“Š Backtest Metrics

Metric Description
IC Mean Average Information Coefficient
ICIR IC Information Ratio (IC/IC_std)
t-statistic Statistical significance of IC
Sharpe Ratio Risk-adjusted return
Sortino Ratio Downside risk-adjusted return
Win Rate Percentage of positive returns
Max Drawdown Maximum peak-to-trough decline

πŸ—οΈ Project Structure

open-alpha/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py           # FastAPI application
β”‚   β”œβ”€β”€ api/routes.py     # API endpoints
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ backtester.py     # Backtest engine
β”‚   β”‚   β”œβ”€β”€ factor_engine.py  # Factor evaluation
β”‚   β”‚   β”œβ”€β”€ data_loader.py    # Data loading
β”‚   β”‚   └── config.py         # Configuration
β”‚   └── reports/          # Saved reports
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ DataExplorer.jsx    # Data visualization
β”‚   β”‚   β”‚   β”œβ”€β”€ FactorLab.jsx       # Factor research
β”‚   β”‚   β”‚   └── BacktestReport.jsx  # Report ranking
β”‚   β”‚   β”œβ”€β”€ components/     # Reusable components
β”‚   β”‚   └── services/       # API service layer
β”‚   └── ...
β”‚
└── data/                 # Market data (feather format)

πŸ”§ Configuration

Environment Variables

Variable Description Default
DATA_DIR Path to market data ./data
REPORTS_DIR Path to saved reports ./backend/reports
LOG_LEVEL Logging level INFO
VITE_API_BASE_URL Backend API URL http://localhost:8000/api

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


Made with ❀️ for Quantitative Research

⭐ Star this repo if you find it helpful!

About

Open Alpha is a high-performance, open-source quantitative research platform designed for serious algorithmic traders and researchers. Built on a robust FastAPI backend and a modern React frontend, it bridges the gap between ad-hoc analysis scripts and institutional-grade factor libraries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors