All Projects → AI4Finance-Foundation → Machine-Learning-for-Stock-Recommendation-IEEE-2018

AI4Finance-Foundation / Machine-Learning-for-Stock-Recommendation-IEEE-2018

Licence: other
A Practical Machine Learning Approach for Dynamic Stock Recommendation. IEEE TrustCom 2018.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language
r
7636 projects

Projects that are alternatives of or similar to Machine-Learning-for-Stock-Recommendation-IEEE-2018

Zvt
modular quant framework.
Stars: ✭ 1,801 (+6570.37%)
Mutual labels:  fundamental-analysis
Tensorflow-2-Reinforcement-Learning-Cookbook
Tensorflow 2 Reinforcement Learning Cookbook, published by Packt
Stars: ✭ 125 (+362.96%)
Mutual labels:  stock-trading
Deep-Reinforcement-Learning-for-Automated-Stock-Trading-Ensemble-Strategy-ICAIF-2020
Live Trading. Please star.
Stars: ✭ 1,251 (+4533.33%)
Mutual labels:  stock-trading
FinRL
FinRL: The first open-source project for financial reinforcement learning. Please star. 🔥
Stars: ✭ 3,497 (+12851.85%)
Mutual labels:  stock-trading
Forex-and-Stock-Python-Pattern-Recognizer
A machine learning program that is able to recognize patterns inside Forex or stock data
Stars: ✭ 134 (+396.3%)
Mutual labels:  stock-trading
Automated-Fundamental-Analysis
Python program that rates stocks out of 100 based on valuation, profitability, growth, and price performance metrics, relative to the company's sector.
Stars: ✭ 82 (+203.7%)
Mutual labels:  fundamental-analysis
FundamentalsQuantifier
A tool that allows you to visually compare the fundamentals of over 6,000 companies.
Stars: ✭ 195 (+622.22%)
Mutual labels:  fundamental-analysis
TradeAlgo
Stock trading algorithm written in Python for TD Ameritrade.
Stars: ✭ 147 (+444.44%)
Mutual labels:  stock-trading
MarketCycles.jl
Digital Signal Processing Indicators For Market Data.
Stars: ✭ 26 (-3.7%)
Mutual labels:  stock-trading
insomnia-workspace
An Insomnia Workspace for Alpaca API
Stars: ✭ 34 (+25.93%)
Mutual labels:  stock-trading
robinhood.tools
📈🤑💰 Advanced trading tools and resources for Robinhood Web.
Stars: ✭ 27 (+0%)
Mutual labels:  stock-trading
TradeTheEvent
Implementation of "Trade the Event: Corporate Events Detection for News-Based Event-Driven Trading." In Findings of ACL2021
Stars: ✭ 64 (+137.04%)
Mutual labels:  stock-trading
stockbot
Alpaca algo stock trading bot
Stars: ✭ 105 (+288.89%)
Mutual labels:  stock-trading
Ta
Technical Analysis Library using Pandas and Numpy
Stars: ✭ 2,649 (+9711.11%)
Mutual labels:  fundamental-analysis
alpha-vantage-cli
Command line tool and API for retrieving stock market data from Alpha Vantage
Stars: ✭ 33 (+22.22%)
Mutual labels:  stock-trading
crypto-database
Database for crypto data, supporting several exchanges. Can be used for TA, bots, backtest, realtime trading, etc.
Stars: ✭ 72 (+166.67%)
Mutual labels:  fundamental-analysis
siachart
stock trading chart - 可编程,可定制,跨平台,通用的金融图表。
Stars: ✭ 32 (+18.52%)
Mutual labels:  stock-trading
investopedia simulator api
A simple Python API for Investopedia's stock simulator games. This programmatically logs into Investopedia and can retrieve portfolio summary, get stock quotes & option chain lookups, execute trades - buy & sell shares, puts, calls, sell short, etc.
Stars: ✭ 22 (-18.52%)
Mutual labels:  stock-trading
StockScreener
A handy tool for screening stocks based on certain criteria from several markets around the world. The list can then be delivered to your email address (one-off or regularly via crontab).
Stars: ✭ 51 (+88.89%)
Mutual labels:  stock-trading
Stocky
Machine Learning Stock Trading Risk Analysis (Spring 2017)
Stars: ✭ 27 (+0%)
Mutual labels:  stock-trading

Dynamic-Stock-Recommendation-Machine_Learning

An IEEE TrustCom 2018 Paper (http://www.cloud-conf.net/trustcom18/)

Hongyang Yang, Xiao-Yang Liu, and Qingwei Wu. 2018. A practical machine learn-ing approach for dynamic stock recommendation. In IEEE TrustCom/BiDataSE,2018.1693–1697. Download from (https://ieeexplore.ieee.org/abstract/document/8456121) and (https://ssrn.com/abstract=3302088)

Abstract:

Stock recommendation is vital to investment companies and investors. However, no single stock selection strategy will always win while analysts may not have enough time to check all S&P 500 stocks (the Standard & Poor’s 500). In this paper, we propose a practical scheme that recommends stocks from S&P 500 using machine learning. Our basic idea is to buy and hold the top 20% stocks dynamically. First, we select representative stock indicators with good explanatory power. Secondly, we take five frequently used machine learning methods, including linear regression, ridge regression, stepwise regression, random forest and generalized boosted regression, to model stock indicators and quarterly log-return in a rolling window. Thirdly, we choose the model with the lowest Mean Square Error in each period to rank stocks. Finally, we test the selected stocks by conducting portfolio allocation methods such as equally weighted, mean- variance, and minimum-variance. Our empirical results show that the proposed scheme outperforms the long-only strategy on the S&P 500 index in terms of Sharpe ratio and cumulative returns.

Index Term:

Stock recommendation, fundamental value investing, machine learning, model selection, risk management

Project summary:

  • We developed a practical approach to using machine-learning methods selecting S&P 500 stocks based on financial ratios (e.g., EPS, ROA, ROE, etc). Outperformed the S&P 500 index on out of sample data, achieved a Sharpe ratio of 0.5 (0.19 on SPX).
  • We performed feature selection by 11 GICS sectors based on a rolling window to choose the lowest MSE model among Linear Regression, Stepwise Regression, Regression with Ridge, Random Forest, and GBM. Applied a model ensemble method.

Data:

Retrieved from WRDS (Wharton Research Data Services), Compustat Industrial [27 years daily and quarterly Data]

  • S&P 500 Fundamental Quarterly Data (fundamental_final_table.xlsx)

    • Database: Compustat North America (Fundamentals Quarterly) and (Index Constituents)
    • Timeline: 27 years (1990-2017)
    • Tickers: 1193 stock (all historical S&P 500 component stocks)
    • Value: 20 financial ratios calculated from raw accouting report data
  • S&P 500 Historical Component Stocks Adjusted Daily Price (1-sp500_adj_price.csv.zip)

    • Database: Compustat North America (Security Daily)
    • Timeline: 27 years (1990-2017)
    • Tickers: 1193 stock (all historical S&P 500 component stocks)
    • Value: Adjusted Daily Close Price
  • S&P 500 Index Daily Price (1-spx_price.xlsx)

    • Database: Yahoo Finance
    • Timeline: 27 years (1990-2017)
    • Tickers: SPX
    • Value: Adjusted Daily Close Price

Code:

Focasting Model:

  • Input: 11 Excel files of cleaned data about fundamental financial ratios (sector 10-Energy, sector 15-Materials, sector 20-Industrials, sector 25-Consumer Discretionary, sector 30-Consumer Staples, sector 35-Health Care, sector 40-Financials, sector 45-Information Technology, sector 50-Telecommunication Services, sector 55-Utilities, sector 60-Real Estate)
  • Python Script: 2 Scripts
python3 fundamental_run_model.py \
  -sector_name sector10 \
  -fundamental Data/fundamental_final_table.xlsx \
  -sector Data/1-focasting_data/sector10_clean.xlsx 
  • Old R Script: 3 R Scripts
  • Output: a CSV file includes tic: the stock name, predicted_return: predicted return of next quarter by our model, trade_date: the date to execute the trades

Portfolio Allocation:

Back-testing Model:

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].