Predict profitability of trades based on indicator buy / sell signals

Overview

Predict profitability of trades based on indicator buy / sell signals

Trade profitability analysis for trades based on various indicators signals:

  • MACD
  • Simple Moving Average
  • Exponential Moving Average

  • Trading assumptions:
    1. Trade is profitable if, profit >0
    2. Buy / sell happen the following day of the signal
    3. Buy / sell are taken 10% from the open price towards close price

    Machine learning assumptions:
    • Binary classification: 1 - profit, 0 - loss
    • A separate model for each company / ticker
    • Model is trained vs optimal precision

    Machine learning models used:
    1. Linear Support Vector Classifier
    2. Decision Tree Classifier
    3. Random Forest Classifier
    4. Gradient Boosting Classifier
    5. XGBoost Classifier
    6. Keras classifier

    Trade analysis intermediate results:
    30-40% of trades based on indicator signals are profitable
    In general trades on SMA signals are more often profitable than the ones based on EMA signals

    Trade profitability predictions intermediate results (based on test data)/
    The precision of the predictions is oscilating around 70%, which is pretty good, considering that the analysts estimate other signals accuracy as 30 to 50% (double top, shoulder & arms, etc). This means, there is ~70% chance that predicted trade will be profitable (Reminder: profitable -> profit > 0)
    However, the recall is only around 15%, which means that very the model pick-up very few of the actually profitable trades.

    #Detailed analysis tbc

    Owner
    Tomasz Porzycki
    Tomasz Porzycki
    CinnaMon is a Python library which offers a number of tools to detect, explain, and correct data drift in a machine learning system

    CinnaMon is a Python library which offers a number of tools to detect, explain, and correct data drift in a machine learning system

    Zelros 67 Dec 28, 2022
    The project's goal is to show a real world application of image segmentation using k means algorithm

    The project's goal is to show a real world application of image segmentation using k means algorithm

    2 Jan 22, 2022
    BASTA: The BAyesian STellar Algorithm

    BASTA: BAyesian STellar Algorithm Current stable version: v1.0 Important note: BASTA is developed for Python 3.8, but Python 3.7 should work as well.

    BASTA team 16 Nov 15, 2022
    NCVX (NonConVeX): A User-Friendly and Scalable Package for Nonconvex Optimization in Machine Learning.

    NCVX (NonConVeX): A User-Friendly and Scalable Package for Nonconvex Optimization in Machine Learning.

    SUN Group @ UMN 28 Aug 03, 2022
    pure-predict: Machine learning prediction in pure Python

    pure-predict speeds up and slims down machine learning prediction applications. It is a foundational tool for serverless inference or small batch prediction with popular machine learning frameworks l

    Ibotta 84 Dec 29, 2022
    onelearn: Online learning in Python

    onelearn: Online learning in Python Documentation | Reproduce experiments | onelearn stands for ONE-shot LEARNning. It is a small python package for o

    15 Nov 06, 2022
    Time Series Prediction with tf.contrib.timeseries

    TensorFlow-Time-Series-Examples Additional examples for TensorFlow Time Series(TFTS). Read a Time Series with TFTS From a Numpy Array: See "test_input

    Zhiyuan He 476 Nov 17, 2022
    A simple application that calculates the probability distribution of a normal distribution

    probability-density-function General info An application that calculates the probability density and cumulative distribution of a normal distribution

    1 Oct 25, 2022
    A data preprocessing and feature engineering script for a machine learning pipeline is prepared.

    FEATURE ENGINEERING Business Problem: A data preprocessing and feature engineering script for a machine learning pipeline needs to be prepared. It is

    Pinar Oner 7 Dec 18, 2021
    Microsoft 5.6k Jan 07, 2023
    OptaPy is an AI constraint solver for Python to optimize planning and scheduling problems.

    OptaPy is an AI constraint solver for Python to optimize the Vehicle Routing Problem, Employee Rostering, Maintenance Scheduling, Task Assignment, School Timetabling, Cloud Optimization, Conference S

    OptaPy 208 Dec 27, 2022
    scikit-fem is a lightweight Python 3.7+ library for performing finite element assembly.

    scikit-fem is a lightweight Python 3.7+ library for performing finite element assembly. Its main purpose is the transformation of bilinear forms into sparse matrices and linear forms into vectors.

    Tom Gustafsson 297 Dec 13, 2022
    Projeto: Machine Learning: Linguagens de Programacao 2004-2001

    Projeto: Machine Learning: Linguagens de Programacao 2004-2001 Projeto de Data Science e Machine Learning de análise de linguagens de programação de 2

    Victor Hugo Negrisoli 0 Jun 29, 2021
    Simple linear model implementations from scratch.

    Hand Crafted Models Simple linear model implementations from scratch. Table of contents Overview Project Structure Getting started Citing this project

    Jonathan Sadighian 2 Sep 13, 2021
    Painless Machine Learning for python based on scikit-learn

    PlainML Painless Machine Learning Library for python based on scikit-learn. Install pip install plainml Example from plainml import KnnModel, load_ir

    1 Aug 06, 2022
    A toolkit for making real world machine learning and data analysis applications in C++

    dlib C++ library Dlib is a modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++ to solve real worl

    Davis E. King 11.6k Jan 02, 2023
    Python Machine Learning Jupyter Notebooks (ML website)

    Python Machine Learning Jupyter Notebooks (ML website) Dr. Tirthajyoti Sarkar, Fremont, California (Please feel free to connect on LinkedIn here) Also

    Tirthajyoti Sarkar 2.6k Jan 03, 2023
    Stats, linear algebra and einops for xarray

    xarray-einstats Stats, linear algebra and einops for xarray ⚠️ Caution: This project is still in a very early development stage Installation To instal

    ArviZ 30 Dec 28, 2022
    Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

    Microsoft contributing libraries, tools, recipes, sample codes and workshop contents for machine learning & deep learning.

    Microsoft 366 Jan 03, 2023
    A simple example of ML classification, cross validation, and visualization of feature importances

    Simple-Classifier This is a basic example of how to use several different libraries for classification and ensembling, mostly with sklearn. Example as

    Rob 2 Aug 25, 2022