Hello there👋 It's a minimalistic repository with machine learning and deep learning algorithms for stock market trading. For examples and code snippets, please, see the examples directory.
- Clone the repo and cd into it:
git clone https://github.com/Khaymon/trading-algorithms.git
cd trading-algorithms- Install required packages:
pip install -r requirements.txt
Data is loaded by yahoo-finance module. You can use the yf_download_data.py file to get the TOP-100 US liquidity stocks market data.
python yf_download_data.pyScrapping is our everything. Data is collected by selenium package. You need to install ChromeDriver in order to scrape investingview.com website. In the file investing_view_scrape.py you can change URL in order to receive either political or finance news. In order to get news data, just call
python yf_download_data.pyContainers are classes, which collect some data in it. Main class for stocks market data is StocksData. StocksTarget class is used to save a target for a concrete task.
Features are some functions from market data. Important thing to understand before constructing your own Feature is that function shouldn't look forward in time. FeaturesList is used to aggregate many of Features in one place.
TargetFunction is a class, which defines a function creating a target data. It can be either regression or classification target.
Model preprocessors takes stocks data and target to prepare it for being placed in a model.
Of course, there are models, which take the input produced by specific model preprocessor and make predictions.
Please, check results in results.md file.
- Write backtesting class
- Experiment with only news headers embeddings