Skip to content

ArunavD/market_strategy_tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

market_strategy_tester

strategy_tester

market_strategy_tester logo

Contents

What is strategy tester?

The Strategy Tester allows you to test and optimize trading strategies (Expert Advisors) before using them for live trading. One can test his strategies or algorithms in historical data of any stock or crypto using this project.

Libraries

  • backtrader - It is an open-source framework that allows for strategy testing on historical data.
  • DateTime - This module supplies classes for manipulating dates and times.
  • matplotlib - It is a comprehensive library for creating static, animated, and interactive visualizations in Python.

Description of each file

1.tester.py - This is the main method of the project where strategy is being executed.

2.strategies.py - Here I have created a strategy to implement as an example. The idea I have used is:

  • If not in position then, if two consicutive dip happens from a given date, buy a fixed about of stock.
  • Hold it for 5 days and sell it.

Datasets

I have tested this with 4 datasets, 2 of them are from stock market and two of them are from crypto market. Adding them here. Other stocks historical data also can be downloaded from yahoo finance.

  1. AAPL.csv - APPLE.
  2. ADANIGREEN.csv - Adani Green Energy Limited.
  3. DOGE.csv - DOGE coin.
  4. YFI.csv - YEARNFINANCE coin.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages