All Projects → obokaman-com → stock-forecast

obokaman-com / stock-forecast

Licence: MIT license
Simple stock & cryptocurrency price forecasting console application, using PHP Machine Learning library (https://github.com/php-ai/php-ml)

Programming Languages

PHP
23972 projects - #3 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to stock-forecast

Base-On-Relation-Method-Extract-News-DA-RNN-Model-For-Stock-Prediction--Pytorch
基於關聯式新聞提取方法之雙階段注意力機制模型用於股票預測
Stars: ✭ 33 (-56.58%)
Mutual labels:  prediction, stock, stock-prediction
algorithmic-market-prediction
Implementation of Algorthmic Prediction of Candle Patterns
Stars: ✭ 21 (-72.37%)
Mutual labels:  prediction, stock
Daily Stock Forecast
Daily Stock Forecasts using Machine Learning & Python
Stars: ✭ 341 (+348.68%)
Mutual labels:  stock, forecast
chaos
Singular Spectrum Analysis methods implementation in Python
Stars: ✭ 22 (-71.05%)
Mutual labels:  prediction, forecast
cart
Simple Symfony 4 shopping cart application. App boilerplate
Stars: ✭ 18 (-76.32%)
Mutual labels:  symfony4, symfony-flex
foot
foot是一个集足球数据采集器,简单分析的项目.AI足球球探为程序全自动处理,全程无人为参与干预足球分析足球预测程序.程序根据各大指数多维度数据,结合作者多年足球分析经验,精雕细琢,集天地之灵气,汲日月之精华,历时七七四十九天,经Bug九九八十一个,编码而成.有兴趣的朋友,可以关注一下公众号AI球探(微信号ai00268).
Stars: ✭ 96 (+26.32%)
Mutual labels:  prediction, forecast
Rnn Time Series Anomaly Detection
RNN based Time-series Anomaly detector model implemented in Pytorch.
Stars: ✭ 718 (+844.74%)
Mutual labels:  prediction, forecast
Tennis Crystal Ball
Ultimate Tennis Statistics and Tennis Crystal Ball - Tennis Big Data Analysis and Prediction
Stars: ✭ 107 (+40.79%)
Mutual labels:  prediction, forecast
Btctrading
Time Series Forecast with Bitcoin value, to detect upward/down trends with Machine Learning Algorithms
Stars: ✭ 99 (+30.26%)
Mutual labels:  prediction, forecast
Neural prophet
NeuralProphet - A simple forecasting model based on Neural Networks in PyTorch
Stars: ✭ 1,125 (+1380.26%)
Mutual labels:  prediction, forecast
Sweep
Extending broom for time series forecasting
Stars: ✭ 143 (+88.16%)
Mutual labels:  prediction, forecast
Bulbea
🐗 🐻 Deep Learning based Python Library for Stock Market Prediction and Modelling
Stars: ✭ 1,585 (+1985.53%)
Mutual labels:  prediction, stock-prediction
STOCK-RETURN-PREDICTION-USING-KNN-SVM-GUASSIAN-PROCESS-ADABOOST-TREE-REGRESSION-AND-QDA
Forecast stock prices using machine learning approach. A time series analysis. Employ the Use of Predictive Modeling in Machine Learning to Forecast Stock Return. Approach Used by Hedge Funds to Select Tradeable Stocks
Stars: ✭ 94 (+23.68%)
Mutual labels:  prediction, stock
PyDREAM
Python Implementation of Decay Replay Mining (DREAM)
Stars: ✭ 22 (-71.05%)
Mutual labels:  prediction
Wharton Stat 422 722
The official class webpage for Statistics 422/722 taught at Wharton in the Spring of 2017
Stars: ✭ 14 (-81.58%)
Mutual labels:  prediction
Sales-Prediction
In depth analysis and forecasting of product sales based on the items, stores, transaction and other dependent variables like holidays and oil prices.
Stars: ✭ 56 (-26.32%)
Mutual labels:  prediction
SwiftYFinance
The best Yahoo Finance library with the power of Swift
Stars: ✭ 30 (-60.53%)
Mutual labels:  stock
smooth
The set of smoothing functions used for time series analysis and in forecasting.
Stars: ✭ 78 (+2.63%)
Mutual labels:  forecast
pystockfilter
Financial technical and fundamental analysis indicator library for pystockdb.
Stars: ✭ 26 (-65.79%)
Mutual labels:  stock
jobeet
Symfony 4.2 Jobeet Project
Stars: ✭ 28 (-63.16%)
Mutual labels:  symfony4

Stock & crypto value prediction app

This is a very simple initial version of the app.

At this moment it only can use some linear algorithms, SquareLevels, Support Vector Regression and a basic linear regression based on Cumulative Moving Averages.

Next steps:

  • apply something more sophisticated as prediction algorithm, being able to make a complete technical analysis of the stock historical values.
  • gather information about the stock from Twitter and financial news, to build a sentiment graph around the stock, to affect the predictions.
  • apply some ML to find patterns between the stock value evolution and other stocks in the same segment, to affect the predictions.
  • ...¿?

Installation

Install PHP 7.2 and Git in your local machine (Example for Mac)

Install Homebrew (package manager) if you don't have it yet, and install Git + PHP 7.2 + Composer:

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)`
$ brew install git php composer

Download app and install all dependencies

$ git clone https://github.com/obokaman-com/stock-forecast
$ cd stock-forecast
$ composer install

Examples

Forecast

You can try it with bin/console forecast:stock <base_currency> <stock/crypto code> <date_interval_magnitude (minutes/hours/days)>

$ bin/console forecast:stock USD BTC days

This will generate a table with the historical price information and a prevision for the next period based in the historical data, giving you three estimations, based on short-term, medium-term and long-term.

Output:

===== BUILDING FORECAST FOR BTC - USD USING DATA FROM LAST 30 days =====

Last real measurements:
+------------------+----------+----------+----------+------------+----------+----------+------------+---------------+
| Date             | Open     | Close    | Change   | Change (%) | High     | Low      | Volatility | Volume        |
+------------------+----------+----------+----------+------------+----------+----------+------------+---------------+
| 2017-11-15 00:00 | 6597.06  | 7283.22  | 686.16   | 10.4%      | 7330.06  | 6596.94  | 733.12     | 922828348.24  |
| 2017-11-16 00:00 | 7283.02  | 7853.68  | 570.66   | 7.84%      | 7964.64  | 7119.17  | 845.47     | 1009996825.41 |
| ------...------- | --...--- | --...--- | ---...-- | ----...--- | ---...-- | ---...-- | ----...--- | -----...----- |
| 2017-12-13 00:00 | 17083.9  | 16286.82 | -797.08  | -4.67%     | 17267.96 | 15669.86 | 1598.1     | 2575900534.34 |
| 2017-12-14 00:00 | 16286.82 | 16459.79 | 172.97   | 1.06%      | 16941.08 | 16023.64 | 917.44     | 1744832688.08 |
+------------------+----------+----------+----------+------------+----------+----------+------------+---------------+

Forecast for next days:
+---------------+----------+----------+---------+------------+----------+----------+------------+---------------+
| Date interval | Open     | Close    | Change  | Change (%) | High     | Low      | Volatility | Volume        |
+---------------+----------+----------+---------+------------+----------+----------+------------+---------------+
| Short term    | 16459.79 | 16014.7  | -445.09 | -2.7%      | 17645.78 | 17189.89 | 455.88     | 1708072344.68 |
| Medium term   | 16459.79 | 16648.77 | 188.98  | 1.15%      | 19085.95 | 16795.52 | 2290.42    | 3094114369.44 |
| Long term     | 16459.79 | 16886.1  | 426.31  | 2.59%      | 17608.83 | 15276.44 | 2332.38    | 2923450650.25 |
+---------------+----------+----------+---------+------------+----------+----------+------------+---------------+

Insights & signals

You can try it with bin/console forecast:signal <base_currency> <stock/crypto code> -t (optional for including forecast table)

$ bin/console forecast:signals EUR ETC

This will output some signals and score built based on last month / day / hour for given currency / crypto pair, or the default pairs if none are given.

Output:

===== SOME SIGNALS FOR EUR - ETC ON Jan 14th, 15:21h =====

Signals based on last hour (Score: 0):
 - Stable in this period.

Signals based on last day (Score: -1):
 - Loosing value in short term.

Signals based on last month (Score: 3):
 - Improving exponentially.
 - Recovering value in short term.
 - Having a noticeable improvement recently (6.62%).

There is a forecast:test command too that allow you to test different predicition strategies with sample sequences.

Telegram bot (@CryptoInsightsBot)

You can use this project to run a robo-advisor using Telegram. You'll find some commands and callbacks implemented under App/Controller/Telegram

If you want to test with your own bot, you should add an environment variable called TELEGRAM_BOT_TOKEN, with your assigned token. More information about creating your own Telegram bot on https://core.telegram.org/bots

An example Telegram bot is running as @CryptoInsightsBot. You can test it at https://t.me/CryptoInsightsBot

It implements two simple commands:

  • /insights: allow you to view signals for choosen currency - crypto pair
  • /subscribe: allow you to receive real-time alerts with relevant signals for choosen currency - crypto pair signal.

Telegram bot

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].