Skip to content

Financial-Reinforcement-Learning-Lab/Nostradamus

Repository files navigation

Nostradamus - WIP

ubuntu OS windows

Tested on Ubuntu 16.04

Codacy Badge

Trainable deep reinforcement learning agents to operate in the cryptocurrency market

ltcusdt

7 % profit in 1 month trading LTC/USDT


multimodel

10 % profit trading BTC/USDT ETH/USDT and LTC/USDT at the same time (wip)

Prerequisites

Setup

Ubuntu

# make sure you have these installed
sudo apt-get install gcc g++ build-essential python-dev python3-dev htop
# create env
conda env create -f UBUNTU_CPU.yml
# activate it
conda activate crypto_prediction

Mac

# create env
conda env create -f MAC_CPU.yml
# activate it
conda activate crypto_prediction

Algotrading

You can use one of these algorithms

Train

Go to /configs/vars.py and custumize it:

SYMBOL_1, SYMBOL_2, SYMBOL_3 = 'LTC', 'ETH', 'OMG'
TRADE_INTRUMENT = 'USDT'
LIMIT = 1500
HISTO = 'minute'
...
# multi model
python train_multi_model.py

# single pair
python train.py \
        --algo PPO \
        --pair XRP/USDT \

algorithms

Monitoring

# to keep monitoring while the algo is trainning
tensorboard --logdir=./tensorflow
# or
gpustat -i
# or
htop

Evaluate

It will automatically use a different time period to evaluate

# multi model
python rollout_multi_model.py ./tensorboard/path_to_checkpoint-100 \
        --run PPO \
        --env TradingEnv-v0

# single pair
python rollout.py /path_to_checkpoint/file \
        --run PPO \
        --env TradingEnv-v0 \
        --pair XRP/BTC \
        --histo day \
        --limit 180

Customizing

Edit the commision and initial balance values in /configs/vars.py


Credits

About

✨ Crypto Tradng Environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages