All Projects → parrondo → Deeptrading

parrondo / Deeptrading

Licence: mit
Deep Neural Network Trading collection of Tensorflow Jupyter notebooks

Projects that are alternatives of or similar to Deeptrading

Quantitative Notebooks
Educational notebooks on quantitative finance, algorithmic trading, financial modelling and investment strategy
Stars: ✭ 356 (+768.29%)
Mutual labels:  jupyter-notebook, algorithmic-trading, algotrading
Peregrine
Detects arbitrage opportunities across 131 cryptocurrency exchanges in 50 countries
Stars: ✭ 638 (+1456.1%)
Mutual labels:  algorithmic-trading, algotrading
Machine Learning Book
《机器学习宝典》包含:谷歌机器学习速成课程(招式)+机器学习术语表(口诀)+机器学习规则(心得)+机器学习中的常识性问题 (内功)。该资源适用于机器学习、深度学习研究人员和爱好者参考!
Stars: ✭ 616 (+1402.44%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Tensorflow 2.x Tutorials
TensorFlow 2.x version's Tutorials and Examples, including CNN, RNN, GAN, Auto-Encoders, FasterRCNN, GPT, BERT examples, etc. TF 2.0版入门实例代码,实战教程。
Stars: ✭ 6,088 (+14748.78%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Docs
TensorFlow documentation
Stars: ✭ 4,999 (+12092.68%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Generative Adversarial Networks
Introduction to generative adversarial networks, with code to accompany the O'Reilly tutorial on GANs
Stars: ✭ 505 (+1131.71%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Research
Notebooks based on financial machine learning.
Stars: ✭ 714 (+1641.46%)
Mutual labels:  jupyter-notebook, algorithmic-trading
Tensorflow learning notes
tensorflow学习笔记,来源于电子书:《Tensorflow实战Google深度学习框架》
Stars: ✭ 403 (+882.93%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Quantstats
Portfolio analytics for quants, written in Python
Stars: ✭ 823 (+1907.32%)
Mutual labels:  algorithmic-trading, algotrading
Seq2seq Signal Prediction
Signal forecasting with a Sequence-to-Sequence (seq2seq) Recurrent Neural Network (RNN) model in TensorFlow - Guillaume Chevalier
Stars: ✭ 890 (+2070.73%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Tensorflow Tutorial
Some interesting TensorFlow tutorials for beginners.
Stars: ✭ 893 (+2078.05%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Introtodeeplearning
Lab Materials for MIT 6.S191: Introduction to Deep Learning
Stars: ✭ 4,955 (+11985.37%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Fastquant
fastquant — Backtest and optimize your trading strategies with only 3 lines of code!
Stars: ✭ 457 (+1014.63%)
Mutual labels:  jupyter-notebook, algotrading
Stock Analysis Engine
Backtest 1000s of minute-by-minute trading algorithms for training AI with automated pricing data from: IEX, Tradier and FinViz. Datasets and trading performance automatically published to S3 for building AI training datasets for teaching DNNs how to trade. Runs on Kubernetes and docker-compose. >150 million trading history rows generated from +5000 algorithms. Heads up: Yahoo's Finance API was disabled on 2019-01-03 https://developer.yahoo.com/yql/
Stars: ✭ 605 (+1375.61%)
Mutual labels:  jupyter-notebook, algorithmic-trading
Quantdom
Python-based framework for backtesting trading strategies & analyzing financial markets [GUI ]
Stars: ✭ 449 (+995.12%)
Mutual labels:  algorithmic-trading, algotrading
Machine Learning
머신러닝 입문자 혹은 스터디를 준비하시는 분들에게 도움이 되고자 만든 repository입니다. (This repository is intented for helping whom are interested in machine learning study)
Stars: ✭ 705 (+1619.51%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Tensorflow In Practice Specialization
DeepLearning.AI TensorFlow Developer Professional Certificate Specialization
Stars: ✭ 29 (-29.27%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Qtrader
Reinforcement Learning for Portfolio Management
Stars: ✭ 363 (+785.37%)
Mutual labels:  jupyter-notebook, algorithmic-trading
Daily Deeplearning
🔥机器学习/深度学习/Python/算法面试/自然语言处理教程/剑指offer/machine learning/deeplearning/Python/Algorithm interview/NLP Tutorial
Stars: ✭ 381 (+829.27%)
Mutual labels:  jupyter-notebook, tensorflow-tutorials
Sgx Full Orderbook Tick Data Trading Strategy
Providing the solutions for high-frequency trading (HFT) strategies using data science approaches (Machine Learning) on Full Orderbook Tick Data.
Stars: ✭ 733 (+1687.8%)
Mutual labels:  jupyter-notebook, algorithmic-trading

DeepTrading

DeepTrading is a collection of Jupyter notebooks. The objective is to organize in a systematic but flexible way all the necessary steps to calculate and conceive trading systems based on the Tensorflow software.

For more info see: TodoTrader DeepTrading Tensorflow serie

Installation

If you are Black Belt (BB) then "Quick Way" is your way of installation, else use "Detailed Way".

What!, wait...Am I a Black Belt?

Well, if you can use these Jupyter notebooks with "Quick Way" instructions then sure, you are a BB.

Quick Way (Black Belt)

It is highly recommended to run DeepTrading in designated Conda virtual environment. To install Conda you can be guided by any of the many tutorials that are disseminated throughout the Web.

git clone https://github.com/parrondo/deeptrading.git

cd deeptrading

conda env create --file environment.yml

conda activate deeptrading

It's likely you want to have a .env file. It is a configuration text file that is used to define some variables you want to pass into your application's environment.

Example of .env file:

PROJ_DIR=.

DATA_DIR=../data/

RAW_DIR=../data/raw/

INTERIM_DIR=../data/interim/

PROCESSED_DIR=../data/processed/

FIGURES_DIR=../reports/figures/

MODEL_DIR=../models/

EXTERNAL_DIR=../data/external/

PRODUCTION_DIR=/home/PRODUCTION/

Detailed Way (Brown Belt)

Set Up Your Anaconda Python Environment

Here, you will learn how to install a conda environment designed specifically for deeptrading posts called DeepTrading with Tensorflow from a .yaml file.

Objectives

At the end of these instructions, you should be able to:

  • Install a new environment in Anaconda
  • View a list of the available environments in Anaconda

What You Need

You should have Bash, Git (Git Bash for Windows users) and the Anaconda distribution of Python 3.x setup on your computer and an deeptrading working directory. Installation of Git Bash (Windows users) and Anaconda is out of the scope of these instructions. Here you can find the hyperlink and below, how to test your set-up. So, Be sure you have:

Information below is adapted from materials developed by the Conda documentation for installing conda and managing packages.

Test your set-up of Bash, Git and Anaconda

Windows

  1. Search for and open the Git Bash program. In this Terminal window, type bash and hit enter. If you do not get a message back, then Bash is available for use.
  2. Next, type git and hit enter. If you see a list of commands that you can execute, then Git has been installed correctly.
  3. Next, type conda and hit enter. Again, if you see a list of commands that you can execute, then Anaconda Python has been installed correctly.
  4. Close the Terminal by typing exit.

Mac

  1. Search for and open the Terminal program (found in /Applications/Utilities). In this Terminal window, type bash and hit enter. If you do not get a message back, then Bash is available for use.
  2. Next, type git and hit enter. If you see a list of commands that you can execute, then Git has been installed correctly.
  3. Next, type conda and hit enter. Again, if you see a list of commands that you can execute, then Anaconda Python has been installed correctly.
  4. Close the Terminal by typing exit.

Linux

  1. Search for and open the Terminal program. In this Terminal window, type bash and hit enter. If you do not get a message back, then Bash is available for use.
  2. Next, type git and hit enter. If you see a list of commands that you can execute, then Git has been installed correctly.
  3. Next, type conda and hit enter. Again, if you see a list of commands that you can execute, then Anaconda Python has been installed correctly.
  4. Close the Terminal by typing exit.

Set up a Conda Python Environment

Install the deeptrading Conda Environment

Anaconda allows you to have different environments installed on your computer to access different versions of Python and different libraries. Sometimes libraries conflict which causes errors and packages not to work.

To avoid conflicts, we created an environment specifically for deeptrading posts that contains all of the python libraries that you will need.

Tip: For more information about conda environments check out the conda documentation.

To install the deeptrading environment, you will need to follow these steps:

  1. Fork and clone a Github repository from https://github.com/parrondo/deeptrading to your deeptrading directory. This repository contains a file called yaml that is needed for the installation. (For instructions on forking/cloning repositories, see the section below on Fork and Clone Github Repository ).
  2. Be sure you have the yaml file into your deeptrading parent directory using your file manager.
  3. Open the Terminal on your computer (e.g. Git Bash for Windows or Terminal on a Mac/Linux).
  4. In the Terminal, navigate to the deeptrading directory (e.g. cd ~, then cd deeptrading).
  5. Then, type in the Terminal: conda env create -f environment.yml

Note that it takes a bit of time to run this setup, as it needs to download and install each library, and that you need to have internet access for this to run!

Tip: The instructions above will only work if you run them in the directory where you placed the environment.yml file.

Once the environment is installed, always make sure that the deeptrading environment is activated before doing work for this class.

See the instructions further down on this page to Activate a Conda Environment. Once the environment is activated, the name of the activated environment will appear in parentheses on the left side of your terminal.

Fork and Clone Github Repository

This section provides the basic steps for forking a Github repository (i.e. copying an existing repository to your Github account) and for cloning a forked repository (i.e. downloading your forked repository locally to your computer).

Also you could see my post:

https://todotrader.com/robust-git-workflow-for-research-projects/

Fork a Repository on Github.com

You can fork an existing Github repository from the main Github.com page of the repository that you want to copy (example: https://github.com/parrondo/deeptrading).

On the main Github.com page of the repository, you will see a button on the top right that says Fork.

Click on the Fork button and select your Github.com account as the home of the forked repository.

Clone a Repository to Local Computer

To download your forked copy of the deeptrading repository to your computer, open the Terminal and change directories to your deeptrading directory (e.g. cd ~, then cd deeptrading).

Then, run the command git clone followed by the URL to your fork on Github (e.g. https://github.com/your-username/deeptrading). Be sure to change your-username to your Github account username.

cd ~

cd deeptrading

git clone https://github.com/your-username/deeptrading

About the Conda Environment

The .yaml File

When you work with Anaconda, you can create custom lists that tell Anaconda where to install libraries from, and in what order. You can even specify a particular version. You write this list using yaml(Yet Another Markup Language). This is an alternative to using pip to install Python packages.

In previous steps, you used a custom .yaml list to install all of the Python libraries that you will need to complete the lessons in this course. This .yaml list is customized to install libraries from the repositories and in an order that minimizes conflicts.

The .yaml file looks like:

# run: conda env create --file environment.yml
name: deeptrading
dependencies:
- python=3.5
- pip:
- tensorflow==1.5.0
- numpy==1.15.0
- scipy==1.1.0
- scikit-learn==0.19.2
- jupyter==1.0.0
- matplotlib==2.2.2
- requests==2.18.4
- Pillow==5.1.0
- GitPython==2.1.11
- backtrader==1.9.65.122
- pandas==0.23.4
- python-dotenv==0.9.1
- seaborn==0.9.0

Notice at the top of the file there is the environment name. This file has a few key parts:

  1. NAME: the name of the environment that you will call when you wish to activate the environment. The name deeptrading is defined in the environment.yml file.
  2. Channels (optional): this lists where packages will be installed from. There are many options including conda, conda-forge and pip. You will be predominately using conda-forge.
  3. Dependencies: Dependencies are all of the things that you need installed in order for the environment to be complete. In the example, python version 3.5 is specified . The order in which the libraries should be installed is also specified.

Manage Your Conda Environment

You can have different Python environments on your computer. Anaconda allows you to easily jump between environments using a set of commands that you run in your terminal.

View a List of All Installed Conda Environments

You can see a list of all installed conda environments by typing:

conda info --envs

If you want to Jupyter Notebook to use a particular environment that you have setup on your computer, you need to activate it.

For example, if a Python package such as tensorflow is only installed in the deeptrading environment, and not the default anaconda environment, you will not be able to import it to Jupyter Notebook, unless you have the deeptrading environment activated.

Activate a Conda Environment

To activate an environment , use the Terminal to navigate to your deeptrading directory (e.g. cd to the directory). Then, type the following command to activate the environment (e.g. deeptrading):

conda activate deeptrading

For older installations of Anaconda (versions prior to 4.6) on Mac, Linux, and Git Bash for Windows, type:

source activate deeptrading

Windows Users: We assume that Windows users are using Git Bash as their primary terminal. If you need to activate a conda environment using the Command Prompt, you will need to use the following command: activate deeptrading

Once the environment is activated, the name of the activated environment will appear in parentheses on the left side of your terminal.

Tip: Note that after you restart the Terminal, the deeptrading environment is no longer active. You will need to activate the deeptrading environment each time you start the Terminal by running the appropriate command provided above for your operating system.

Deactivate a Conda Environment

If needed, you can deactivate a conda environment. Deactivating the environment switches you back to the default environment in your computer.

Mac and Linux Instructions:

Source deactivate deeptrading

Windows Instructions

deactivate deeptrading

Delete a Conda Environment

If you ever want to delete an environment, you must first deactivate that environment and then type:

conda env remove --name myenv

and replace myenv with the name of the environment that you want to remove.

Remember to never delete your working environment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].