An AI-driven paper trading platform built using Node.js and Express, designed to simulate real-world trading decisions using market data, sentiment analysis, and rule-based trade evaluation β without risking real money.
This project focuses on backend architecture, data pipelines, and AI-assisted trade analysis, and is being actively developed as an academic + research-oriented system.
- Introduction
- Key Features
- Project Architecture
- Tech Stack
- Prerequisites
- Installation Guide
- External Dependencies
- Database Setup (Stock Master Data)
- Environment Variables
- Project Status & Roadmap
- Disclaimer
- Author
The AI-Based Paper Trading System is a backend-focused trading simulation platform that evaluates trades using:
- Market data
- News & sentiment signals (planned)
- Rule-based and AI-assisted trade evaluation logic
Unlike real trading platforms, this system operates entirely in paper mode, making it ideal for:
- Strategy testing
- Trade journaling
- Risk classification
- Academic and research use cases
The project follows real-world backend development practices, including modular architecture, version control, and incremental feature development.
- Modular Node.js + Express backend
- MVC-based project structure
- Centralized configuration & utilities
- Live market data ingestion
- Dashboard integration (future scope)
- Trade evaluation logic (WIP)
- News-based sentiment analysis
- AI-assisted trade journal evaluation
- Risk labeling: Good / Risky / Bad trades
- Explainable AI (XAI) for trade decisions
.
βββ config/ # App & DB configuration
βββ controllers/ # Request handling logic
βββ middlewares/ # Custom middleware
βββ models/ # Database models
βββ routes/ # API routes
βββ utils/ # Utility & helper functions
βββ public/ # Static assets
βββ views/ # Server-rendered views (if used)
βββ scripts/ # (Planned) Data insertion scripts
βββ app.js # Application entry point
βββ package.json
βββ README.md
The architecture is designed to be scalable and extensible, allowing easy integration of AI/ML components.
- Backend: Node.js, Express.js
- Database: MongoDB / SQL (based on implementation)
- APIs: Upstox API (Market data), News API(News data)
- AI/ML (Planned): Sentiment Analysis, Trade Evaluation Models
- Version Control: Git & GitHub
Before installing the project, ensure you have:
- Basic knowledge of JavaScript & Node.js
- A working internet connection
- An Upstox trading account (required for market data)
Download and install Node.js (LTS version recommended):
π https://nodejs.org/
Verify installation:
node -v
npm -vgit clone https://github.com/apurvwajage/ai-paper-trading-system.git
cd ai-paper-trading-systemnpm installThis installs all required packages defined in package.json.
Create a .env file in the root directory (not included in repo):
PORT=3000
DB_URI=your_database_connection_string
UPSTOX_API_KEY=your_api_key
UPSTOX_API_SECRET=your_api_secret
UPSTOX_REDIRECT_URI=your_redirect_uri
β οΈ Never commit.envfiles to GitHub.
nodemon app.jsor (for development):
node app.jsThis project depends on Upstox for:
- Instrument master data
- Market-related inputs (planned)
You must:
- Create an Upstox account
- Generate API credentials
- Access official documentation
π https://upstox.com/developer/api-documentation/
To support trading logic, the system requires stock master data.
From Upstox official documentation:
- Download
nse.json(instrument master file)
A script will be added soon to:
- Read
nse.json - Insert all stock entries into the database
π Planned location:
scripts/insertNSEStocks.js
Once available, usage will be documented here.
The following environment variables are required:
| Variable | Description |
|---|---|
| PORT | Server port |
| DB_URI | Database connection string |
| UPSTOX_API_KEY | Upstox API key |
| UPSTOX_API_SECRET | Upstox API secret |
| UPSTOX_API_URI | Upstox API URI |
Current Status: π§ Under active development (Work in Progress)
- Complete market data ingestion
- Add NSE stock master insertion script
- Integrate sentiment analysis
- Implement trade risk classification
- Add explainable AI layer
- Deploy backend service
This project is intended only for educational and research purposes.
- No real money trading
- No financial advice
- Paper trading only
Apurva Wajage
Jayesh Varunkar
Srushti Waghmare
Final Year Project β AI-Based Paper Trading System
Feel free to star the repository and follow for updates.