Project Description
Project: Algo Trading Platform
Document Purpose:
This file summarizes the current software features, the enhancements already added during recent development, missing capabilities, and recommended add-on improvements to complete the application into a more polished trading platform.
1. Current Core Features
- Modular Python trading architecture with separate modules for broker integration, data fetching, backtesting, portfolio management, and strategy execution.
- Dhan broker support via `src/broker/dhan_broker.py` and optional yfinance fallback in `src/data/data_fetcher.py`.
- Multiple strategy implementations including moving average crossover, RSI, Bollinger Bands, and various option strategies.
- Portfolio manager and risk manager modules for tracking positions and enforcing risk rules.
- Backtesting engine in `src/backtesting/backtester.py` with commissions and slippage.
- Web dashboard UI served by `dashboard/templates/index.html` and `run_dashboard.py`.
- Dashboard tabs for strategy control, configuration, credential management, risk, order management, market sections, and trade views.
2. Recent Enhancements Added
- Updated dashboard to include a dedicated `Dashboard` page that shows summary cards, market pulse, top performing strategy, and recent trades.
- Added trade listing with open/closed position filters and date range filtering in the dashboard.
- Implemented client-side filtering logic for recent trades using `setDashboardTradeFilter()` and `filterDashboardTrades()`.
- Improved dashboard spacing with additional horizontal page padding and refined spacing around modules.
- Simplified dashboard styling for a cleaner, more basic appearance.
- Added visible trade Date column to the recent trades table for meaningful date-range filtering.
3. Existing Documented Features
- Strategy toggling and parameter editing from the web dashboard.
- Backtest runner and equity-chart visualization from the UI.
- Credential storage in `dashboard/data/credentials.json` and config viewer in the dashboard.
- Support for a paper trading mode via configuration.
4. Missing / Incomplete Capabilities
- Full live order execution workflow is not yet confirmed or integrated.
- Persistent trade history backend and database storage are missing.
- User authentication and authorization are not implemented.
- Deployment-ready packaging and Docker/container support are absent.
- Error handling and user feedback for failed API calls, invalid credentials, and network issues need strengthening.
- Complete strategy management persistence across browser sessions and server restarts is not present.
- Market data caching, refresh throttling, and historical trade data handling are not fully implemented.
- Responsive mobile layout and cross-browser UI polish require improvement.
- A proper API-level route list and backend route documentation are not yet finalized.
5. Recommended Add-On Points to Complete the Application
- Add backend storage: use SQLite/PostgreSQL for trade history, positions, strategy configurations, and user settings.
- Implement authentication: session-based login or token-based API auth for secure dashboard access.
- Complete live trading flow: connect order placement from UI to Dhan API, with paper/live toggle and status tracking.
- Add user roles: admin, trader, and observer permissions for a multi-user environment.
- Enhance dashboard analytics: add P&L charts, daily summary, win/loss ratios, and risk exposure gauges.
- Add alerting: price alerts, margin call warnings, strategy signal notifications, and email/SMS alerts.
- Improve UI/UX: responsive layout, consistent card spacing, dark/light theme toggle, and clear mobile experience.
- Add configuration management: allow saving strategy presets, risk presets, and option trade templates.
- Add testing and validation: unit tests for dashboard logic, API endpoints, and strategy signal generation.
- Add deployment docs: include Dockerfile, deployment scripts, and a README section for production launch.
6. Suggested Priority Roadmap
1. Stabilize backend: add persistence, API routes, and error handling.
2. Secure the platform: credential management, authentication, and access control.
3. Complete trading workflow: wire live order execution and position updates.
4. Polish the UI: responsive design, clean layout, and dashboard usability.
5. Add analytics: trade history, P&L reporting, and risk dashboards.
6. Document the project: create a complete developer and user manual.
7. Notes for Project Route
- This file is saved at the repository root for easy access.
- Use this document as a reference when planning the next development sprint.
- Update it regularly as new features are added or requirements change.