Skip to content

Welcome to the Quantitative Trading Strategies repository! This collection features a variety of Python-based trading strategies for analyzing financial markets. Each strategy is accompanied by thorough documentation and organized code, allowing for easy understanding, customization, and implementation.

License

Notifications You must be signed in to change notification settings

AnujRaskatla/Quant-Trade-Strategies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quant-Trade-Strategies

Welcome to the Quantitative Trading Strategies repository! This collection features a variety of Python-based trading strategies for analyzing financial markets. Each strategy is accompanied by thorough documentation and organized code, allowing for easy understanding, customization, and implementation.

Table of Contents

1. Overview

  • This repository aims to explore and implement quantitative trading strategies for financial markets.
  • Strategies are designed to leverage historical market data to make informed trading decisions.
  • Implemented in Python, the code is well-structured and documented for users to easily comprehend and adapt.

2. Getting Started

  • To get started, clone this repository to your local machine.

     git clone https://github.com/AnujRaskatla/Quant-Trade-Strategies.git
  • Install dependencies by running pip install -r requirements.txt.

  • Follow the instructions in the README files of individual strategy directories.

3. Directory Structure

  • data/: Contains sample datasets and instructions on obtaining market data.
  • strategies/: Each subdirectory represents a different trading strategy.
  • backtesting/: Includes scripts for evaluating strategy performance.

4. Usage

  1. Replace your_data.csv in the script with the actual file path or URL of your historical stock price data.
  2. The data should contain at least the following columns:
Date:                       Date of the stock price data.
Open, High, Low, Close:     Stock price details.
Volume:                     Trading volume.
Ensure that the 'Date' column is in datetime format. If not, convert it using pd.to_datetime().
  1. Run the script: your_strategy_script.py
  2. View the model evaluation results and visualization in the console and generated plot.

5. Strategies

  • MeanReversion/: Implements a mean-reversion trading strategy.

    • README.md: Detailed explanation of the strategy, parameters, and logic.
    • mean_reversion.py: Python script containing the strategy code.
  • TrendFollowing/: Implements a trend-following trading strategy.

    • README.md: Comprehensive overview of the strategy.
    • trend_following.py: Python script for the strategy.
  • SMA (Simple Moving Average): based on SMA crossovers, aiming to generate buy and sell signals.

  • Pair Trading/: based on z-score, aiming to generate buy and sell signals after threshold.

    • README.md: Comprehensive overview of the strategy.
    • pt.py: Python script containing the strategy.
  • MACD x RSI/: Used indicators - MACD and RSI to generate buy and sell signals.

    • README.md: Comprehensive overview of the strategy.
    • macd.py: Python script containing the strategy.

6. ML Prediction Models

  • Random Forest Regressor Strategy/: utilizes a Random Forest Regressor to predict stock prices based on historical data
    • README.md: Comprehensive overview of the strategy.
    • ML_script.py: Python script containing the strategy.

7. Options Strategies

  • Covered Call Strategy/: involves owning shares of a particular stock and selling call options against those shares.
    • README.md: Comprehensive overview of the strategy.
    • CC_script.py: Python script containing the strategy.

8. Backtesting

  • The backtesting/ directory contains scripts for evaluating the performance of each strategy.
  • Detailed instructions on running backtests are provided in the README.md.

9. Results

  • Visualizations and performance metrics for each strategy are available in this section.
  • Backtest results demonstrate the effectiveness of the implemented strategies.

10. Dependencies:

  • Key dependencies include pandas, numpy, and matplotlib.
pip install pandas numpy matplotlib
  • View the requirements.txt file for a complete list with version information.

11. Contributing:

  • Contributions are welcome! Please follow the guidelines outlined in the CONTRIBUTING.md file.
  • Submit issues, feature requests, or pull requests to contribute to the project's development.

12. License:

  • This project is licensed under the MIT License. See the LICENSE.md file for details.

13. Acknowledgments:

  • Gratitude to the open-source community and contributors.
  • Acknowledgments to external libraries and data sources used in the project.

About

Welcome to the Quantitative Trading Strategies repository! This collection features a variety of Python-based trading strategies for analyzing financial markets. Each strategy is accompanied by thorough documentation and organized code, allowing for easy understanding, customization, and implementation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages