Giter VIP home page Giter VIP logo

robo_advisor's Introduction

ML Powered Robo Advisor

A robo advisor that is trained on ML to predict user preference in order to assign and execute trading strategy accordingly

|-- cfg
|   |-- config.yml
|   |-- strategy_template.yaml
|-- data
|   |-- processed
|       |-- df_trimmed.csv
|   |-- raw
|       |-- synthetic_data.csv
|-- logs
|-- mlruns
|-- notebooks
|   |-- test_api.ipynb
|-- src
|   |-- util
|       |-- data_schema.py
|       |-- general_util_functions.py
|       |-- strategic_conditions.py
|       |-- synthetic_data_generator.py
|   |-- interface.py
|   |-- data_processing.py
|   |-- fastapi_serving.py
|   |-- gcp_deployment.py
|   |-- main.py
|   |-- mlflow_tuning.py
|   |-- model_pipeline.[y]
|-- tests
|-- .env
|-- .gitignore
|-- .pre-commit-config.yaml
|-- dockerfile
|-- poetry.lock
|-- pyproject.toml
|-- README.md
|-- requirements.txt

Part 1: ML Prediction to find the suitable investment strategy based on user profile features

Part 2: Recommend and execute trading algorithm based on the results from Part 1

Configuring environment:

We will be using Pyenv + Poetry for environment & dependency management in this project. Conda is a decent enough alternative but I personally don't find it lightweight enough.

(1) Managing Python versions using Pyenv:

  • Version manager that helps you to manage different versions of Python based on project needs
  • Unfortunately, it doesn't work with windows. You will need WSL (a subsystem of Ubuntu within Windows) if you want to use Pyenv
# if you are using mac
brew install pyenv 

# if you are using linux
curl https://pyenv.run | bash 

# Or you can do it through the git clone way
git clone https://github.com/pyenv/pyenv.git ~/.pyenv

Adding Pyenv's path to .bashrc (linux) or .zshrc (mac)

# Run the following in terminal to add the path to .bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc

# Run the following in terminal to add the path to .zshrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc

(2) Use Poetry to ensure that this codebase is reproducible:

  • poetry can be installed using the following command in terminal if you are using mac/linux curl -sSL https://install.python-poetry.org | python3 -
  • For windows(powersell): (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -
  • Assume you already have a root folder of the project created
  • Call poetry init in terminal to instantiate a pyproject.toml, running poetry add [package] will create another poetry.lock file.
  • Having these 2 files together and run poetry install after cloning the repository will ensure that someone else would be able to reproduce the environment and dependency of this project.

(3) Activating the environment:

  • run poetry shell in the terminal

robo_advisor's People

Contributors

whanyu1212 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.