
This project implements a mean reversion trading strategy using historical stock data. The strategy focuses on the idea that a security will revert to its average price over time.
Features
- Data Fetching: Retrieves historical stock data from Yahoo Finance.
- Indicator Calculation: Computes moving averages, standard deviations, and Z-scores.
- Signal Generation: Generates buy and sell signals based on Z-score thresholds.
- Visualization: Plots stock prices, moving averages, and trading signals.
Prerequisites
Install the necessary Python libraries:
bash
pip install pandas pandas_datareader numpy matplotlib seaborn
Usage
Set Up: Configure start and end dates, and stock symbol.
Run the Code: Execute the script to fetch data, calculate indicators, generate signals, and visualize results.
This project implements a mean reversion trading strategy using historical stock data. The strategy focuses on the idea that a security will revert to its average price over time.
Features
Prerequisites
Install the necessary Python libraries:
bash
pip install pandas pandas_datareader numpy matplotlib seaborn
Usage
Set Up: Configure start and end dates, and stock symbol.
Run the Code: Execute the script to fetch data, calculate indicators, generate signals, and visualize results.