Web App for Trading Setups using Vector Databases
Budget: ₹12,500 – ₹37,500 INR
Create an web app to read the technical analysis Spot your Favourite Trading Setups using Vector Databases
After release of the ChatGPT, everyone is talking about Generative AI and LLM in 2023. However, the tech associated with LLM is kinda cool if you pay close attention (pun intended) to it!
Let’s talk about Vector Databases and How we can use them to get profitable trades!
Why look for similar chart patterns?
While novice traders burn their accounts by spending most of their time experimenting with various strategies and chart patterns, few of them understand their own mindset and are able to find the edge they need to make them consistently profitable over a longer period of time.
Now even though they know what patterns to look for, screening the stocks that fit in their criteria and picking up the gems out of it is a cumbersome task to do!
If you are one of the traders who are constantly searching for your own trading setups, Understanding and using Vector Database can make your life much easier.
Vector Databases store a series (array) of numbers as compared to conventional databases that store Tables or JSONs. As each of the numerical arrays is treated as Vectors, It is possible to place all of them into a higher-dimensional vector space and search for the patterns you’re looking for in that vector space using similarity search pre-built into v-db.

Trippin’ into the Mathematical world of Higher Dimensional Vectors
Implementation
For a quick implementation and testing of this concept, we will go ahead with the following python dependencies:
chromadb
yfinance
pandas
numpy
Our initial task is to pull some stock data from APIs. So we will quickly pull some NSE data using Yahoo finance API for free! This also involves data preprocessing and feature selection.
The patterns in any time series data are formed due to percentage change with respect to previous values and not due to the absolute values
You can observe that only OHLC data is taken and the % change from the previous day is considered to make the time-series data stationary and then flatten multi-dimensional arrays into a single dimension to push it easily into the vector database.
ProTip: Try experimenting with features like Technical Indicators, OHLC price ratios, Volumes, and other preprocessing techniques like data normalization. You may get enhanced results with a few combinations!
Get Pranjal Joshi’s stories in your inbox
Join Medium for free to get updates from this writer.
Subscribe
Now, Quickly download the data for all stocks listed on NSE using the following code (It also includes a dropping mechanism so all of your vectors are of the same size while pushing them
For example, I found myself being profitable and comfortable while riding bullish rallies in stocks like Zomato. Then I will just query the same into the vector database and will get the charts that are largely identical to this chart pattern to identify more opportunities even though they belong to totally different sectors.
Similarity Search along with Geeky distances between these vector data points!
Charts forming relatively the same patterns in last 100 days
P.S. I have already integrated this as a feature in my open-source Python-based Breakout stock screener that you would love to try!
Screeni-py: Python based Breakout Stock Screener for NSE India
Visit the GitHub repo to get this screener on your local system!
GitHub - pranjal-joshi/Screeni-py: A Python-based stock screener to find stocks with potential…
A Python-based stock screener to find stocks with potential breakout probability from NSE India. - GitHub …
github.com
Or read more about what Screeni-py is and what it can do by visiting this article
A Free Python-based Stock Breakout Screener with AI features for NSE
Screenipy is a Free, Ready-to-Use Stock Breakout Screener for NSE India powered by AI to find your Favourite Chart…
medium.com
After release of the ChatGPT, everyone is talking about Generative AI and LLM in 2023. However, the tech associated with LLM is kinda cool if you pay close attention (pun intended) to it!
Let’s talk about Vector Databases and How we can use them to get profitable trades!
Why look for similar chart patterns?
While novice traders burn their accounts by spending most of their time experimenting with various strategies and chart patterns, few of them understand their own mindset and are able to find the edge they need to make them consistently profitable over a longer period of time.
Now even though they know what patterns to look for, screening the stocks that fit in their criteria and picking up the gems out of it is a cumbersome task to do!
If you are one of the traders who are constantly searching for your own trading setups, Understanding and using Vector Database can make your life much easier.
Vector Databases store a series (array) of numbers as compared to conventional databases that store Tables or JSONs. As each of the numerical arrays is treated as Vectors, It is possible to place all of them into a higher-dimensional vector space and search for the patterns you’re looking for in that vector space using similarity search pre-built into v-db.

Trippin’ into the Mathematical world of Higher Dimensional Vectors
Implementation
For a quick implementation and testing of this concept, we will go ahead with the following python dependencies:
chromadb
yfinance
pandas
numpy
Our initial task is to pull some stock data from APIs. So we will quickly pull some NSE data using Yahoo finance API for free! This also involves data preprocessing and feature selection.
The patterns in any time series data are formed due to percentage change with respect to previous values and not due to the absolute values
You can observe that only OHLC data is taken and the % change from the previous day is considered to make the time-series data stationary and then flatten multi-dimensional arrays into a single dimension to push it easily into the vector database.
ProTip: Try experimenting with features like Technical Indicators, OHLC price ratios, Volumes, and other preprocessing techniques like data normalization. You may get enhanced results with a few combinations!
Get Pranjal Joshi’s stories in your inbox
Join Medium for free to get updates from this writer.
Subscribe
Now, Quickly download the data for all stocks listed on NSE using the following code (It also includes a dropping mechanism so all of your vectors are of the same size while pushing them
For example, I found myself being profitable and comfortable while riding bullish rallies in stocks like Zomato. Then I will just query the same into the vector database and will get the charts that are largely identical to this chart pattern to identify more opportunities even though they belong to totally different sectors.
Similarity Search along with Geeky distances between these vector data points!
Charts forming relatively the same patterns in last 100 days
P.S. I have already integrated this as a feature in my open-source Python-based Breakout stock screener that you would love to try!
Screeni-py: Python based Breakout Stock Screener for NSE India
Visit the GitHub repo to get this screener on your local system!
GitHub - pranjal-joshi/Screeni-py: A Python-based stock screener to find stocks with potential…
A Python-based stock screener to find stocks with potential breakout probability from NSE India. - GitHub …
github.com
Or read more about what Screeni-py is and what it can do by visiting this article
A Free Python-based Stock Breakout Screener with AI features for NSE
Screenipy is a Free, Ready-to-Use Stock Breakout Screener for NSE India powered by AI to find your Favourite Chart…
medium.com