Giter VIP home page Giter VIP logo

stock-market-patterns's Introduction

stock-market-patterns

Researching trading patterns with AI, Machine Learning, and Data Science

Initialize PostgreSQL Database

  • Install PostgreSQL on local machine:
 brew install postgresql
 brew services start postgresql@14
  • Create database with user and grant all privileges on database:
CREATE DATABASE your_dbname;
CREATE USER your_username WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE your_dbname TO your_username;
\c your_dbname your_admin_user
-- You are now connected to database "your_dbname" as user "your_admin_user".
GRANT ALL ON SCHEMA public TO your_username;
  • run get_data.py to create tables and populate database.

Stock Database Diagram

Data gathering

Packages

stock-market-patterns's People

Contributors

seanbearden avatar

Watchers

 avatar

stock-market-patterns's Issues

Handle delisted tickers

SGEN does not trade any longer, but the ticker remains in the ticker table. Need to add boolean field for delisted stock.

Explore tree models

Models:

  • Random Forrest
  • AdaBoost
  • Gradient Boost
  • Stochastic Gradient Boost
  • XGBoost

Evaluation:

  • asymmetric loss
  • simple backtest

Create PostgreSQL database

  • install postgresql with homebrew on local machine
  • Create reference table for identifying ticker symbols
  • populate reference table
  • create table for daily stock quotes
  • populate daily stock quotes table
  • create tables for chart events: earnings, dividends, and splits
  • populate chart events tables
  • update README.md to outline how to setup PostgreSQL

Ichimoku Cloud EDA

Given an Ichimoku Cloud signal, the target variable has a time-dependence that relates to the maximum length of the trade (position open to close). Determination of the time horizon is crucial for option trading.

Targets to explore:

  • max/min close in N days
  • The Ichimoku cloud projects into the future. Perhaps a classification problem could be of use to determine the likelihood the price will close above, within, or below the cloud, knowing where the cloud will be in N days.

Plots:

  • t-SNE
  • pairplot
  • correlation plot

Study for Ichimoku Cloud bounce

When overlaying Ichimoku clouds on price candles, there is an observed "cloud bounce" where the price enters the cloud, then retreats within the same day. I want to study the cloud bounce as a signal for option contract entry (put/call).

Setup:

  • Collect data from S&P 500. Use alphavantage.
  • Create Ichimoku cloud signals.

Basic:

Advanced:

  • Determine when the daily candle enters the cloud but closes outside of the cloud. Do not include instances where the price breaks through the cloud.
  • What is the correlation of high - close or close - low with price movement within N days.
  • When a cloud bounce occurs, what is the correlation of price movement with recent extremes? For example, if the bounce occurs far from a recent high/low, is the bounce likely to have a high price movement percentage?

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.