@@ -49,8 +49,43 @@ optimal_weights = model.predict(returns)
4949print (" Optimal portfolio weights:" , optimal_weights)
5050```
5151
52+
5253## Available Models and Features
5354
55+ ### Automated Trading
56+
57+ DeepFolio now supports automated trading through integration with the Alpaca API. This feature allows users to:
58+
59+ Place Trades: Automatically place buy/sell orders based on portfolio optimization results.
60+ Execution Logic: Execute trades with customizable order parameters.
61+ Example usage:
62+ ``` python
63+ from deepfolio.models.automated_trading import AutomatedTrading
64+
65+ api_key = ' APCA-API-KEY-ID'
66+ secret_key = ' APCA-API-SECRET-KEY'
67+ base_url = ' https://paper-api.alpaca.markets'
68+
69+ trader = AutomatedTrading(api_key, secret_key, base_url)
70+ trader.place_trade(' AAPL' , 10 , ' buy' )
71+ ```
72+
73+ ### Real-Time Data Integration
74+ DeepFolio now includes real-time data integration using WebSocket. This feature enables:
75+
76+ Real-Time Market Data: Receive and process streaming market data for dynamic portfolio adjustments.
77+ Data Feeds: Integration with IEX Cloud for real-time data streaming.
78+ Example usage:
79+
80+ ``` python
81+ from deepfolio.data.real_time_data import RealTimeData
82+
83+ socket_url = " wss://cloud-sse.iexapis.com/stable/stocksUSNoUTP?token=YOUR_IEX_CLOUD_TOKEN"
84+ real_time_data = RealTimeData(socket_url)
85+ real_time_data.run()
86+
87+ ```
88+
5489### Portfolio Optimization
5590- Naive: Equal-Weighted, Random (Dirichlet)
5691- Convex: Mean-Risk, Distributionally Robust CVaR
0 commit comments