This project is an autonomous trading agent designed to execute trades based on a combination of technical analysis strategies. It features a modular architecture and a user interface built with Streamlit for easy monitoring and control.
AionVanguard is a Python-based autonomous trading agent. It uses a combination of strategies to identify trading opportunities and includes modules for risk management, broker integration, and dynamic adaptation to market conditions.
- Core Strategy: Combines PVG (Price-Volume-Gradient), SMC (Smart Money Concepts), and TPR (Trend-Pullback-Reversal) analysis.
- Risk Management: Implements position sizing, stop loss, take profit, and daily risk limits.
- Broker Flexibility: Modular design allows for integration with brokers like Alpaca, Binance, etc.
- Live Dashboard: A Streamlit-based UI for real-time monitoring, control, and performance tracking.
The easiest way to deploy this application is using Streamlit Cloud, which integrates directly with your GitHub repository.
- Click the Deploy Button: Click the "Deploy to Streamlit Cloud" button at the top of this README.
- Connect Your Account: If you haven't already, you'll be prompted to connect your GitHub account to Streamlit Cloud.
- Deploy: Follow the on-screen instructions. Streamlit Cloud will automatically detect the repository and the
streamlit_app.pyfile and deploy the application. - Add Secrets: Once deployed, you will need to add your broker API keys as secrets in the Streamlit Cloud settings for your app. Go to your app's settings (
...->Settings->Secrets) and add your keys (e.g.,ALPACA_API_KEY_ID,ALPACA_API_SECRET_KEY).
-
Clone the repository:
git clone https://github.com/Hali-creater/AionVanguard.git cd AionVanguard -
Install dependencies:
pip install -r requirements.txt
-
Launch the Dashboard:
streamlit run streamlit_app.py
The agent is configured using environment variables. For local development, you can create a .env file in the project root. For Streamlit Cloud deployment, use the built-in Secrets management.
Example .env file:
# --- Broker Configuration ---
BROKER=Alpaca
ALPACA_API_KEY_ID=YOUR_ALPACA_API_KEY_ID
ALPACA_API_SECRET_KEY=YOUR_ALPACA_API_SECRET_KEY
ALPACA_BASE_URL=https://paper-api.alpaca.markets.
├── README.md
├── requirements.txt
├── .env.example
├── streamlit_app.py
└── autonomous_trading_agent/
├── __init__.py
├── adaptability/
├── broker_integration/
├── data_fetching/
├── execution/
├── risk_management/
├── strategy/
└── tests/
The project includes a tests/ directory with unit tests. Run tests using pytest from the project root:
pytest