Skip to content

Evaluation of trading strategies using Python and Kaggle data

Notifications You must be signed in to change notification settings

aramian-wasielak/trading-strategies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evaluation of Trading Strategies Using Python

The following basic trading strategies are implemented and evaluated as part of this analysis:

  • Bollinger Bands
  • Simple Moving Average Cross Over
  • Buy and Hold

Market-Data-EDA.ipynb

We start by analysing the dataset downloaded from Kaggle that contains stock and ETF OHLC (Open, High, Low, Close) prices. This dataset consists of a large number of individual files with each containing market data for one ticker. We first develop a market data API that abstracts away access to ticker files before proceeding with an EDA. We also showcase usage of Dask given that the market data is spread across a number of files and all of the data cannot fit into memory on my laptop.

Basic-Strategies.ipynb

We then implement a simple backtester for running trading strategies. As part of it we develop a number of Python classes: Strategy, Backtest, ConfigSearch, etc. The backtester allows us to search for the best perforing ticker & strategy combinations. We run a backtest for all 3 strategies using 5 year's worth of market data.

Getting Started

Install prerequisites:

$ conda env create -f environment.yml 

Jupyter notebooks are located under notebooks directory:

Acknowledgements

Potential Future Improvements

References

About

Evaluation of trading strategies using Python and Kaggle data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published