Code Monkey home page Code Monkey logo

keithorange / patternpy Goto Github PK

View Code? Open in Web Editor NEW
129.0 8.0 28.0 414 KB

πŸ“ˆ PatternPy: A Python package revolutionizing trading analysis with high-speed pattern recognition, leveraging Pandas & Numpy. Effortlessly spot Head & Shoulders, Tops & Bottoms, Supports & Resistances. For experts & beginners. #TradingMadeEasy πŸ”₯

License: Other

Python 96.50% Shell 3.50%
algorithmic-trading data-processing financial-analysis investment numpy open-source pandas pattern-recognition python stock-market

patternpy's Introduction

PatternPy: The Premier Python Package for Trading Pattern Recognition πŸ”₯

PatternPy Logo

Description

PatternPy is a powerful Python package designed to transform the way you analyze financial markets. Our mission is to make complex trading pattern recognition accessible and efficient for all. With PatternPy, you can effortlessly identify intricate patterns like the head and shoulder, multiple tops and bottoms, horizontal support and resistance, and many more from OHLCV data.

Empowered by the elegance of Pandas and the efficiency of Numpy, PatternPy delivers high-speed performance without compromising on accuracy or user-friendliness. Whether you are a seasoned trader or a beginner, PatternPy is your go-to tool for bringing precision and speed to your market analysis.

Why PatternPy?

Our package stands out for several reasons:

  • Unique in the Market: There's nothing else like PatternPy. We provide an all-in-one solution for trading pattern identification, combining power, versatility, and simplicity.
  • High-Speed Performance: Designed with vectorization concepts, PatternPy processes large volumes of data with impressive speed, allowing you to get the information you need, when you need it.
  • Flexible and Customizable: You can easily adjust the window size to suit your preferences, offering a balance between sensitivity and false-positive control.
  • Potential for Wealth Creation: PatternPy is designed to help you recognize lucrative trading opportunities with greater efficiency and accuracy, potentially leading to increased wealth.

Installation

You can install PatternPy by cloning this repo and placing it in your working directory, then importing it like usual:

git clone https://github.com/keithorange/PatternPy

Usage

Once installed and imported, you use PatternPy as follows:

from patternpy.tradingpatterns import head_and_shoulders

# Have price data (OCHLV dataframe)
df = pd.Dataframe(stock_data)

# Apply pattern indicator screener
df = head_and_shoulders(df)

# New column `head_shoulder_pattern` is created with entries containing either: NaN, 'Head and Shoulder' or 'Inverse Head and Shoulder'
print(df)

See our usage guide for more detailed instructions and examples.

πŸ“ˆ Trading Patterns: The Gearhead's Guide to Chart Alchemy! πŸ”§

  • Head & Shoulders and its Mirror-Twin, Inverse Head & Shoulders: Think of this as the stock market's homage to a medieval warrior's stance. The head - the pinnacle of price prowess. The shoulders - slightly lower, but they pack a punch. When it goes inverse, that’s the stock market moonwalking! Keep an eye, because something's about to give. βš”οΈ

  • Multiple Tops & Bottoms - The Horizontal Tango: When stock prices are doing the cha-cha on the charts, swinging back and forth without breaking out – that’s the Horizontal Tango for you! Put on your dancing shoes because reading this pattern needs finesse and perfect timing. πŸ’ƒ

  • Horizontal Support & Resistance - The Price Bouncers: These levels are like the elite bouncers at an exclusive club. Prices need VIP access to get past them! They’ve been rejected entry before, so will they turn around or sweet-talk their way through this time? πŸ•ΆοΈ

  • Ascending & Descending Triangles - Tension Rising: These triangles are like a rubber band stretching – the suspense is nerve-wracking. Is it going to snap upwards or fizzle out downwards? This pattern is the market's own thriller genre. 🍿

  • Wedges: Converging Destiny: Think of wedges as two trendlines playing a high-stakes game of chicken – speeding towards each other to see who veers off first. When they collide, prices could catapult in any direction. Buckle up! πŸš€

  • Channel Up & Down - The Stock Superhighway: If stocks were cars, channels would be their autobahns. Unfettered, high-octane movement within defined lanes. Just watch out for those exits - detours might lead to whole new landscapes! 🏎️

  • Double Top & Bottom - The Market's Deja Vu: When prices hit a level, recoil, and then - BOOM - they're back again, it’s like the market is trying to perfect a stunt it couldn't nail the first time. A daring double-attempt before the grand finale! 🎯

  • Trend Line Support & Resistance - The Market’s Elders: These lines are like the wise old sages of stock lore. They've seen things, they know things. Their wisdom? A roadmap of where prices found refuge or faced their nemesis. Respect the elders! πŸ§™

  • Higher-High & Lower-Low- The Chart Adventurer's Quest: Grab your explorer hat because this pattern is an expedition to uncharted territories. New highs or new lows - they’re the breadcrumbs that lead to the heart of market trends. πŸ—ΊοΈ

    PatternPy in action

Future Plans

We're always looking to improve PatternPy. Some areas we're exploring include:

  • Adding more trading patterns based on user suggestions.
  • Enhancing visualization and plotting features for better pattern understanding.
  • Incorporating unit testing for code reliability.
  • We welcome your suggestions for new features and improvements!

Contribute

PatternPy is an open-source project, and we welcome contributions of all kinds: new features, bug fixes, documentation, and more. Please see our contribution guide for more information.

Join us on this exciting journey to revolutionize trading pattern recognition. Let's create wealth together with PatternPy!

patternpy's People

Contributors

keithorange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

patternpy's Issues

Copyright license

I am writing to inform you of a recent change in the license under which my GitHub repository, the TradingPatternScanner (https://github.com/white07S/TradingPatternScanner), is distributed.

The new license stipulates two important points that I wanted to make you aware of:

  1. ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. This ensures that others can continue to use and build upon the work in the same way that we have.

  2. Share: You are allowed to copy and redistribute the material in any medium or format, under the terms of the aforementioned ShareAlike clause.

This decision has been taken by the development authority of the project, and the changes to the license are now in effect.

I have noticed that your repository (https://github.com/keithorange/PatternPy) seems to be entirely based on the TradingPatternScanner repository. As per the newly applied license, we request you to either adjust your repository to comply with the new license terms, or remove it entirely.

If the necessary changes or removal aren't completed in a reasonable timeframe that is 3 days, we may be obliged to file a DMCA takedown notice.

We understand the inconvenience this may cause, and we appreciate your cooperation in this matter.

Add support for Candlestick patterns

Hello there,

this is such a nice library but when algo trading using price action, sometime we required candlestick patterns as well, it would be great to have both candlestick pattern and chart pattern also some other method to identify support resistance, pivot points and trend lines

Usage Guide

Hello

Thank you for sharing your work, I am very interested in trying this library.

The readme mentions a more detailed Usage Guide.
Would you kindly upload it or direct me to where I can find it?

Thank you

Error when run on linux mint 21.3

Hello,
I have made, as shown below:

$ git clone https://github.com/keithorange/PatternPy

Cloning into 'PatternPy'... remote: Enumerating objects: 53, done. remote: Counting objects: 100% (53/53), done. remote: compressing objects: 100% (47/47), done. remote: Total 53 (delta 16), reused 5 (delta 2), pack-reused 0 Receiving objects: 100% (53/53), 400.43 KiB | 775.00 KiB/s, done. Resolving deltas: 100% (16/16), done.

touch PatternPy.py
chmod +x PatternPy.py
nano PatternPy.py
Paste the usage code

When I hit the command:
./PatternPy.py

I see this error:

./PatternPy.py
./PatternPy.py: line 1: from: command not found
./PatternPy.py: line 4: syntax error near unexpected token (' ./PatternPy.py: line 4: df = pd.Dataframe(stock_data)'

Please help

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.