A Python Module That Uses ANN To Predict A Stocks Price And Also Provides Accurate Technical Analysis With Many High Potential Implementations!

Overview

Stox

A Module to predict the "close price" for the next day and give "technical analysis". It uses a Neural Network and the LSTM algorithm to predict the price. It uses a technical indicator algorithm developed by the Stox team for technical analysis. Check out how it works here.

Installation

Get it from PyPi:

pip3 install stox

Clone it from github:

git clone https://github.com/dopevog/stox.git
cd stox
python3 setup.py

Usage

Arguments:

    stock (str): stock ticker symbol
    output (str): 'list' or 'message' (Format Of Output)
    years (int or float): years of data to be considered
    chart (bool): generate performance plot

Returns:

List:

[company name, current price, predicted price, technical analysis, date (For)]

Message:

company name
current price
predicted price
technical analysis
data (for)

Examples:

Basic

import stox

script = input("Stock Ticker Symbol: ")
data = stox.stox.exec(script,'list')

print(data)
$ stox> python3 main.py
$ Stock Ticker Symbol: AAPL
$ ['Apple Inc.', 125.43000030517578, 124.91, 'Bearish (Already)', '2021-05-24']

Intermediate

= data[1] * 0.02: if data[3] == "Bullish (Starting)": df['Signal'] = "Buy" elif data[3] == "Bullish (Already)": df['Signal'] = "Up" elif data[2] - data[1] <= data[1] * -0.02: if data[3] == "Bearish (Starting)": df['Signal'] = "Sell" elif data[3] == "Bearish (Already)": df['Signal'] = "Down" else: df['Signal'] = "None" x = x+1 df.to_csv("output.csv") print("Done") ">
import stox
import pandas as pd

stock_list = pd.read_csv("SPX500.csv") 
df = stock_list 
number_of_stocks = 505 
x = 0
while x < number_of_stocks:
    ticker = stock_list.iloc[x]["Symbols"]
    data = stox.stox.exec(ticker,'list')
    df['Price'] = data[1] 
    df['Prediction'] = data[2]
    df['Analysis'] = data[3]
    df['DateFor'] = data[4]
    if data[2] - data[1]  >= data[1]  * 0.02:
        if data[3] == "Bullish (Starting)":
            df['Signal'] = "Buy"
        elif data[3] == "Bullish (Already)":
            df['Signal'] = "Up"
    elif data[2] - data[1]  <= data[1]  * -0.02:
        if data[3] == "Bearish (Starting)":
            df['Signal'] = "Sell"
        elif data[3] == "Bearish (Already)":
            df['Signal'] = "Down"
    else:
        df['Signal'] = "None"
    x = x+1
df.to_csv("output.csv") 
print("Done") 
$ stox> python3 main.py
$ Done

More Examples Including These Ones Can Be Found Here

Possible Implentations

  • Algorithmic Trading
  • Single Stock Analysis
  • Multistock Analysis
  • And Much More!

Credits

License

This Project Has Been MIT Licensed

You might also like...
 Warren - Stock Price Predictor
Warren - Stock Price Predictor

Web app to predict closing stock prices in real time using Facebook's Prophet time series algorithm with a multi-variate, single-step time series forecasting strategy.

A machine learning project that predicts the price of used cars in the UK
A machine learning project that predicts the price of used cars in the UK

Car Price Prediction Image Credit: AA Cars Project Overview Scraped 3000 used cars data from AA Cars website using Python and BeautifulSoup. Cleaned t

A linear regression model for house price prediction

Linear_Regression_Model A linear regression model for house price prediction. This code is using these packages, so please make sure your have install

learn python in 100 days, a simple step could be follow from beginner to master of every aspect of python programming and project also include side project which you can use as demo project for your personal portfolio
learn python in 100 days, a simple step could be follow from beginner to master of every aspect of python programming and project also include side project which you can use as demo project for your personal portfolio

learn python in 100 days, a simple step could be follow from beginner to master of every aspect of python programming and project also include side project which you can use as demo project for your personal portfolio

Python-based implementations of algorithms for learning on imbalanced data.

ND DIAL: Imbalanced Algorithms Minimalist Python-based implementations of algorithms for imbalanced learning. Includes deep and representational learn

Houseprices - Predict sales prices and practice feature engineering, RFs, and gradient boosting
Houseprices - Predict sales prices and practice feature engineering, RFs, and gradient boosting

House Prices - Advanced Regression Techniques Predicting House Prices with Machine Learning This project is build to enhance my knowledge about machin

Used Logistic Regression, Random Forest, and XGBoost to predict the outcome of Search & Destroy games from the Call of Duty World League for the 2018 and 2019 seasons.
Used Logistic Regression, Random Forest, and XGBoost to predict the outcome of Search & Destroy games from the Call of Duty World League for the 2018 and 2019 seasons.

Call of Duty World League: Search & Destroy Outcome Predictions Growing up as an avid Call of Duty player, I was always curious about what factors led

Implementations of Machine Learning models, Regularizers, Optimizers and different Cost functions.

Linear Models Implementations of LinearRegression, LassoRegression and RidgeRegression with appropriate Regularizers and Optimizers. Linear Regression

 pure-predict: Machine learning prediction in pure Python
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 like scikit-learn and fasttext. It implements the predict methods of these frameworks in pure Python.

Comments
  • new

    new

    My name is Luis, I'm a big-data machine-learning developer, I'm a fan of your work, and I usually check your updates.

    I was afraid that my savings would be eaten by inflation. I have created a powerful tool that based on past technical patterns (volatility, moving averages, statistics, trends, candlesticks, support and resistance, stock index indicators). All the ones you know (RSI, MACD, STOCH, Bolinger Bands, SMA, DEMARK, Japanese candlesticks, ichimoku, fibonacci, williansR, balance of power, murrey math, etc) and more than 200 others.

    The tool creates prediction models of correct trading points (buy signal and sell signal, every stock is good traded in time and direction). For this I have used big data tools like pandas python, stock market libraries like: tablib, TAcharts ,pandas_ta... For data collection and calculation. And powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM.

    With the models trained with the selection of the best technical indicators, the tool is able to predict trading points (where to buy, where to sell) and send real-time alerts to Telegram or Mail. The points are calculated based on the learning of the correct trading points of the last 2 years (including the change to bear market after the rate hike).

    I think it could be useful to you, to improve, I would like to share it with you, and if you are interested in improving and collaborating I am also willing, and if not file it in the box.

    opened by Leci37 0
Releases(0.5)
Owner
Stox
Making Apps & Modules For The Stockmarket & To Make Life Easier!
Stox
This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you ask it.

Crypto-Currency-Predictor This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you

Hazim Arafa 6 Dec 4, 2022
This repository contains the code to predict house price using Linear Regression Method

House-Price-Prediction-Using-Linear-Regression The dataset I used for this personal project is from Kaggle uploaded by aariyan panchal. Link of Datase

null 0 Jan 28, 2022
Avocado hass time series vs predict price

AVOCADO HASS TIME SERIES VÀ PREDICT PRICE Trước khi vào Heroku muốn giao diện đẹp mọi người chuyển giúp mình theo hình bên dưới https://avocado-hass.h

hieulmsc 3 Dec 18, 2021
Uses WiFi signals :signal_strength: and machine learning to predict where you are

Uses WiFi signals and machine learning (sklearn's RandomForest) to predict where you are. Even works for small distances like 2-10 meters.

Pascal van Kooten 5k Jan 9, 2023
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.

Light Gradient Boosting Machine LightGBM is a gradient boosting framework that uses tree based learning algorithms. It is designed to be distributed a

Microsoft 14.5k Jan 7, 2023
Dual Adaptive Sampling for Machine Learning Interatomic potential.

DAS Dual Adaptive Sampling for Machine Learning Interatomic potential. How to cite If you use this code in your research, please cite this using: Hong

null 6 Jul 6, 2022
Cryptocurrency price prediction and exceptions in python

Cryptocurrency price prediction and exceptions in python This is a coursework on foundations of computing module Through this coursework i worked on m

Panagiotis Sotirellos 1 Nov 7, 2021
Price forecasting of SGB and IRFC Bonds and comparing there returns

Project_Bonds Project Title : Price forecasting of SGB and IRFC Bonds and comparing there returns. Introduction of the Project The 2008-09 global fina

Tishya S 1 Oct 28, 2021
Stock Price Prediction Bank Jago Using Facebook Prophet Machine Learning & Python

Stock Price Prediction Bank Jago Using Facebook Prophet Machine Learning & Python Overview Bank Jago has attracted investors' attention since the end

Najibulloh Asror 3 Feb 10, 2022