Skip to content

apurvwajage/ai-paper-trading-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ˆ AI-Based Paper Trading System 🚧 (Work in Progress)

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.


πŸ“‘ Table of Contents


πŸ“Œ Introduction

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.


✨ Key Features

Implemented / In Progress

  • Modular Node.js + Express backend
  • MVC-based project structure
  • Centralized configuration & utilities
  • Live market data ingestion
  • Dashboard integration (future scope)
  • Trade evaluation logic (WIP)

Planned

  • News-based sentiment analysis
  • AI-assisted trade journal evaluation
  • Risk labeling: Good / Risky / Bad trades
  • Explainable AI (XAI) for trade decisions

πŸ— Project Architecture

.
β”œβ”€β”€ 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.


πŸ›  Tech Stack

  • 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

βœ… Prerequisites

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)

βš™οΈInstallation Guide

Step 1: Install Node.js

Download and install Node.js (LTS version recommended):

πŸ‘‰ https://nodejs.org/

Verify installation:

node -v
npm -v

Step 2: Clone the Repository

git clone https://github.com/apurvwajage/ai-paper-trading-system.git
cd ai-paper-trading-system

Step 3: Install Project Dependencies

npm install

This installs all required packages defined in package.json.


Step 4: Configure Environment Variables

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 .env files to GitHub.


Step 5: Start the Server

nodemon app.js

or (for development):

node app.js

πŸ”— External Dependencies

πŸ“Œ Upstox Account (Mandatory)

This project depends on Upstox for:

  • Instrument master data
  • Market-related inputs (planned)

You must:

  1. Create an Upstox account
  2. Generate API credentials
  3. Access official documentation

πŸ‘‰ https://upstox.com/developer/api-documentation/


πŸ—„ Database Setup (Stock Master Data)

To support trading logic, the system requires stock master data.

Step 1: Download NSE Instrument File

From Upstox official documentation:

  • Download nse.json (instrument master file)

Step 2: Insert Data into Database

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.


πŸ” Environment Variables

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

🚧 Project Status & Roadmap

Current Status: 🚧 Under active development (Work in Progress)

Roadmap

  • Complete market data ingestion
  • Add NSE stock master insertion script
  • Integrate sentiment analysis
  • Implement trade risk classification
  • Add explainable AI layer
  • Deploy backend service

⚠️ Disclaimer

This project is intended only for educational and research purposes.

  • No real money trading
  • No financial advice
  • Paper trading only

πŸ‘€ Author

Apurva Wajage

Jayesh Varunkar

Srushti Waghmare

Final Year Project – AI-Based Paper Trading System


⭐ If you like this project

Feel free to star the repository and follow for updates.


About

AI-based paper trading backend using Node.js and Express

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors