GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - remingm/Cryptocurrency-Price-Forecaster

BranchesTags
Open more actions menu

Latest commit

 

History

328 Commits
328 Commits

Folders and files

NameName
Last commit message
Last commit date
dashboard
dashboard
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
R&D.ipynb
R&D.ipynb
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
coin.py
coin.py
 
 
config.py
config.py
 
 
docker-compose.yml
docker-compose.yml
 
 
generate_factors.py
generate_factors.py
 
 
get_data.py
get_data.py
 
 
ml_backend_conda.yml
ml_backend_conda.yml
 
 
ml_pipeline.py
ml_pipeline.py
 
 
output.py
output.py
 
 
requirements.txt
requirements.txt
 
 
training.py
training.py
 
 

Repository files navigation

ML Backend Server

Temporal convolutional network that uses 90+ features and technical indicators to forecast smoothed price.

  1. Get data: get_data.py
  2. Generate factors/features: generate_factors.py
  3. Train models: training.py
  4. Forecast: training.py
  5. Format and write to mongo:output.py

There are two installation options: Docker or Conda.

Required environment variables

MONGODB_URI
DB_USERNAME
DB_PASSWORD

See docker-compose.yml for examples. If these are not provided MONGODB_URI will default to localhost.

Docker Compose

This starts the ML backend and Mongo at port 27017. The ML backend will continuously populate the Mongo DB with forecasts. Run all commands from this directory.

Start with verbose output:
docker-compose up
Or run in background:
docker-compose up -d

When done, stop and remove containers:
docker-compose down

Extra commands:

Stop but keep containers (saves build time):
docker-compose stop
Stop and remove containers and db data:
docker-compose down --volumes

Optional:

  • Change database name in config.py.
  • Customize the Mongo port and db data directory in docker-compose.yml
  • If you don't need a Mongo container then comment out the entire mongo block in docker-compose.yml and update MONGO_HOST (probably to an AWS host).
  • Customize coins and timeperiods in config.py.

MongoDB Info

After running docker-compose up, Mongo will be accessible at the default localhost:2017.

Change database name in config.py.

Here's how to inspect the database: ###Start shell in container docker exec -it ml_backend_mongo_1 bash

###Show the DB Run mongo to enter the mongo shell. Then, from within the mongo shell, run:

use db_name

then to print db results similar to as shown below, run:

db.forecasts.find({"symbol": "BCH-USD", "period": "1d"}).pretty()

DB Schema

{{
    "symbol": "BCH-USD",
    "past": [
        {
            "timestamp": 1638748800000,
            "close": 475.66
        },
        {
            "timestamp": 1638835200000,
            "close": 474.29
        },
        {
            "timestamp": 1638921600000,
            "close": 480.12
        },
        {
            "timestamp": 1639008000000,
            "close": 466.08
        }
    ],
    "prediction": [
        {
            "timestamp": 1639094400000,
            "close": 466.08
        },
        {
            "timestamp": 1639180800000,
            "close": 466.97
        },
        {
            "timestamp": 1639267200000,
            "close": 448.7
        },
        {
            "timestamp": 1639353600000,
            "close": 460.62
        }
    ],
    "period": "1d",
    "MAPE": -1
}

Conda

Install

# Download and install miniconda locally (Linux)
wget --prefer-family=IPv4 https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
bash miniconda.sh

# For Windows or Mac get the installer here: https://docs.conda.io/en/latest/miniconda.html

# Create conda environment
conda env create --file ml_backend_conda.yml

Run

python3 ml_pipeline.py

R&D notebook contains factor and model research and development.

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.