A web application that analyzes stocks using a mean reversion strategy optimized for day trading. The application provides buy/sell signals based on price deviations from moving averages.
- Real-time stock analysis using mean reversion strategy
- Support for multiple markets (NSE, BSE, US)
- Interactive charts and visualizations
- Detailed trading signals and recommendations
- Risk management indicators (Stop Loss, Take Profit)
- Frontend: React.js with Material-UI and Recharts
- Backend: FastAPI (Python)
- Data Analysis: Pandas, NumPy
- Stock Data: Yahoo Finance API
mean-reversion-analyzer/
├── frontend/ # React frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ └── App.js # Main application
│ └── package.json # Frontend dependencies
├── backend/ # FastAPI backend
│ ├── api.py # API endpoints
│ └── requirements.txt # Backend dependencies
└── README.md # Project documentation
-
Clone the repository:
git clone https://github.com/yourusername/mean-reversion-analyzer.git cd mean-reversion-analyzer -
Set up the backend:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Set up the frontend:
cd frontend npm install
-
Start the backend server:
cd backend uvicorn api:app --reload --port 8000 -
Start the frontend development server:
cd frontend npm start -
Open your browser and navigate to
http://localhost:3000
- Select your market (NSE, BSE, or US)
- Enter stock symbols (one per line)
- Adjust the lookback period (10-60 days recommended)
- Set your investment amount per stock
- Click "Analyze Stocks" to get results
The application can be deployed to Vercel (frontend) and any Python hosting service (backend). Make sure to set up the appropriate environment variables and CORS settings.
MIT License