The trading strategy utilizes two primary technical indicators: the Moving Average Convergence Divergence, or MACD, and the Relative Strength Index, or RSI. These indicators help us determine the optimal entry and exit points by signaling potential reversals and ongoing trends in the stock prices.
The system buys stocks when the MACD crosses above its signal line and the RSI indicates an oversold condition. Conversely, it sell stocks when the MACD crosses below its signal line and the RSI indicates an overbought condition.
- MATLAB
- IBMatlab (Interactive Brokers)
The GUI tracks open positions and calculates individual security P&L alongside overall portfolio P&L. It features an interactive table displaying current positions, entry prices, and current prices for each security. Additionally, a real-time line chart visualizes the profit and loss over time, providing a clear view of the performance of individual securities as well as the entire portfolio. The interface includes buttons for loading data and initiating trades, ensuring a user-friendly experience for backtesting trading strategies.
- Note: This is a backtest run using weekly 5-second ticker data (resulting in the negative P&L and trades ending on May 11). The screenshot is to verify the functionality of the GUI and strategy, and it does not reflect live data.