Built for HackNYU 2025 | FinTech Track
A multi-agent AI system that converts natural language trading strategies into backtested results, analyzes trading guru performance, and mints strategy NFTs on Solana.
- Aristotle AI Agent Challenge: Multi-agent system with specialized agents for parsing, backtesting, and analysis
- OpenRouter Challenge: Multi-model routing across GPT-4, Claude, and Llama
- Solana Best Use: Strategy NFT minting with on-chain metadata
- Visa Agent Marketplace: Autonomous buyer/seller agent negotiations
- MLH .Tech Domain: neXaQuant.tech
- Describe trading strategies in plain English
- AI parses and generates executable trading signals
- Comprehensive backtesting with real market data
- Performance metrics: Sharpe, CAGR, drawdown, volatility
- Extract trading calls from transcripts or generate samples
- Backtest each guru call individually
- Aggregate performance scoring with badge system
- Transparent accountability for trading influencers
- Real-time OHLC data via Yahoo Finance
- Interactive charting and visualization
- Support for stocks, ETFs, and crypto
- Mint successful strategies as Solana NFTs
- On-chain metadata includes code and metrics
- Future: Agent-to-agent strategy trading
Backend:
- FastAPI (Python)
- SQLAlchemy + SQLite
- OpenRouter (multi-model AI routing)
- yfinance (market data)
- Pandas (backtesting engine)
Frontend:
- React + Vite
- Tailwind CSS
- Recharts (visualization)
- Lucide Icons
Blockchain:
- Solana (devnet)
- SPL Token standard
- Metaplex metadata
- Python 3.9+
- Node.js 18+
- pip and npm/yarn
# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env and add your OPENROUTER_API_KEY (optional)
# Initialize database
python scripts/seed_data.py
# Start backend server
bash scripts/start_dev.sh
# Or directly: uvicorn src.app.main:app --reload --port 8000Backend will be available at http://localhost:8000
# In a new terminal, navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm run devFrontend will be available at http://localhost:5173
- Navigate to Strategy Builder tab
- Enter a natural language strategy:
Buy SPY when 50-day SMA crosses above 200-day SMA. Sell when it crosses below. - Click Run Backtest
- View performance metrics
- (Optional) Click Mint as NFT to create Solana NFT
- Navigate to Guru Analyzer tab
- Choose Generate Sample Calls or Paste Transcript
- For generation: Set number of days to simulate
- For transcript: Paste trading guru's content
- Click Analyze Guru Performance
- View aggregated score and badge tier
- Navigate to Market Data tab
- Enter ticker symbol (e.g., SPY, AAPL, BTC-USD)
- Click Load Market Data
- View historical price chart and statistics
- After running a backtest, go to NFT Minting tab
- Review how NFT minting works
- Mint directly from Strategy Builder results
- View mint address and network (devnet)
- ParsingAgent: Converts NL โ structured strategy JSON
- BacktestAgent: Executes strategy against historical data
- RiskAgent: Computes risk metrics (Sharpe, drawdown, VaR)
- ScoringAgent: Normalizes metrics to 0-100 score
- GuruCallExtractionAgent: Extracts discrete trading calls
- MarketplaceAgents: Buyer/seller negotiation (planned)
The system uses OpenRouter for multi-model AI routing:
- GPT-4o-mini: Strategy parsing and guru extraction
- Fallback Mode: If no API key, uses mock responses for demo
POST /api/v1/backtest/run
GET /api/v1/backtest/{id}/status
POST /api/v1/guru/analyze
POST /api/v1/market/ohlc
POST /api/v1/mint/strategy
GET /api/v1/healthz
# Required
DATABASE_URL=sqlite:///./nexaquant.db
BACKEND_CORS_ORIGINS=["http://localhost:5173"]
# Optional (system works without these)
OPENROUTER_API_KEY=your_key_here
SOLANA_WALLET_PRIVATE_KEY=your_key_hereNote: The app works fully in demo mode without API keys using mock responses!
- Backtest engine uses simple daily signals (no intraday)
- Mock Solana minting (devnet addresses are fake for demo)
- No user authentication (single-user demo)
- Limited strategy complexity (basic indicators only)
- Guru analysis uses simplified metrics
- Real Solana NFT minting with Metaplex
- Agent marketplace with real negotiations
- More sophisticated backtesting (intraday, options)
- User authentication and strategy library
- Monte Carlo simulations
- Live paper trading
- Social features (share strategies, follow gurus)
nexaquant/
โโโ backend/
โ โโโ src/app/
โ โ โโโ agents/ # AI agent implementations
โ โ โโโ api/v1/ # API routes
โ โ โโโ db/ # Database models & CRUD
โ โ โโโ models/ # SQLAlchemy models
โ โ โโโ schemas/ # Pydantic schemas
โ โ โโโ services/ # Business logic
โ โ โโโ config.py # Configuration
โ โ โโโ main.py # FastAPI app
โ โโโ scripts/ # Utility scripts
โ โโโ requirements.txt
โโโ frontend/
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ App.jsx # Main app
โ โโโ package.json
โโโ README.md
This is a hackathon project, but suggestions are welcome!
MIT License - Built for educational purposes at HackNYU 2025
[Your Team Name]
- [Team Member 1]
- [Team Member 2]
- [Team Member 3]
- HackNYU 2025 organizers
- Aristotle for the AI Agent Challenge
- OpenRouter for multi-model API access
- Visa for the Agent Marketplace Challenge
- MLH and Solana for blockchain infrastructure
Built with โค๏ธ at HackNYU 2025