This project is set up with common data analysis and visualization libraries:
- pandas: For data manipulation and analysis
- numpy: For numerical computing
- matplotlib: For data visualization
- yfinance: For fetching financial data from Yahoo Finance
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate- Install dependencies:
pip install -r requirements.txtsrc/: Contains the main Python scriptsma_trading_strategy.py: Example script demonstrating stock data analysis
data/: Directory for storing data filesnotebooks/: Jupyter notebooks for analysisrequirements.txt: Project dependencies
Check out the example script in src/ma_trading_strategy.py for a demonstration of how to use these libraries together.
To run the updated code:
python src/ma_trading_strategy.pyThe script will:
- Create timestamped files in each directory
- Print the location of each saved file
- Show the plot
- Display statistics
Each file is timestamped to:
- Keep historical data
- Prevent overwriting
- Track when the analysis was run
Would you like me to:
- Show you how to read and analyze these saved files?
- Add more types of data or calculations?
- Modify the file formats or naming conventions?