Aries is a sophisticated Reinforcement Learning-based trading agent designed for the Colombian wholesale energy market (XM). The system combines probabilistic forecasting with risk-averse decision-making to optimize energy trading strategies.
- Probabilistic Forecasting: LSTM/Transformer-based models for price prediction with uncertainty quantification
- Risk-Averse RL Agent: PPO/SAC algorithms with CVaR-based risk management
- Market Simulation: Realistic trading environment using historical data
- Real-time Integration: XM API integration for live market data
- San Andrés Focus: Specialized for San Andrés and Providencia energy market dynamics
- Web Interface: Streamlit-based dashboard for monitoring and control
- Historical energy price data from XM API
- Weather and external factors
- San Andrés specific data integration
- LSTM/Transformer models for price prediction
- Quantile regression for uncertainty bounds
- Mixture Density Networks for distribution modeling
- State representation with forecast distributions
- Action space: buy/sell/hold decisions
- Reward function: Profit - λ × CVaR
- Real-time market simulation
- Backtesting framework
- Performance monitoring dashboard
# Clone the repository
git clone https://github.com/your-repo/aries.git
cd aries
# Install dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your configurationfrom aries.agent import RiskAverseTradingAgent
from aries.environment import EnergyMarketEnv
from aries.forecaster import ProbabilisticForecaster
# Initialize components
forecaster = ProbabilisticForecaster()
env = EnergyMarketEnv()
agent = RiskAverseTradingAgent(env, forecaster)
# Train the agent
agent.train(episodes=10000)
# Run backtesting
results = agent.backtest(test_data)streamlit run app.pypython -m aries.cli train --episodes 10000 --risk-aversion 0.5
python -m aries.cli backtest --model-path models/best_model.zipThe system can be configured through environment variables or config files:
RISK_AVERSION_LAMBDA: Risk aversion coefficient (default: 0.5)FORECAST_HORIZON: Prediction horizon in hours (default: 24)TRADING_FREQUENCY: Trading frequency in minutes (default: 60)MAX_POSITION_SIZE: Maximum position size (default: 1000)
- Financial: Total return, Sharpe ratio, Maximum drawdown
- Risk: CVaR, Value at Risk (VaR)
- Forecasting: CRPS, MAE, RMSE
- Trading: Win rate, Average trade duration
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details