00:00This video is part of the Algo Traders Toolkit series wherein I share with you various
00:05practical and useful tools that you would need to have in your toolkit in case you want to make an efficient algorithm.
00:10I'm going to be talking about one of my favorite tools, the Charter.
00:15If you are an Algo Trader and you're not currently using this powerful tool,
00:20then you may be missing out on all the fun. In this video, I'm going to be introducing...
00:25...you to a small Python utility that can automatically scrape and extract charting results.
00:30I'm going to demonstrate a practical example of how I use...
00:35...this utility in one of my own trading strategies.
00:37And finally, talk about how charting...
00:40...can be of immense help to you in speeding up the process of building and deploying strategies.
00:44I'll be sharing the link...
00:45...to our community website fabtrader.in and you can download this Python utility for free from this.
00:50...location. So, let's get started.
00:54If this is your first...
00:55...time here, welcome.
00:56My name is Vivek and I'm a financially independent Algo Trader.
00:58This channel is all about building our community...
01:00...of Algo Traders.
01:01We discuss everything about Algo trading using Python...
01:03...building and backlisting trading strategies.
01:04Mark it up.
01:05...and updates and much more.
01:06Please do visit our community website fabtrader.in.
01:08Also, do check out my other...
01:10...in YouTube channel fabwealth...
01:11...where I talk about my own financial independence journey...
01:13...and shared tools, methods and strategies.
01:15...that helped me achieve my financial freedom.
01:20So, chatting screener doesn't need a lot of introduction.
01:22The fact that you have clicked on this link...
01:24...tells me that you're all...
01:25...are already aware of what charting is and how it works.
01:27So, we're not going to spend a lot of time trying...
01:30...to explain how this tool works.
01:32And we will directly jump into the Python utility...
01:34...and see how that works.
01:35At the outset, a charting screener...
01:38...you typically design...
01:40...or input your screen and then when you run scan...
01:43...you get the results here.
01:45Python utility in question...
01:46...is going to directly scrape this particular screen...
01:48...and then download the output from...
01:50...on this screen into a data frame.
01:52And this is the Python utility that I'm talking about.
01:55You would need to install these dependencies...
01:57...which are requests, pandas and beautiful soup 4.
02:00...and the utility takes primarily two inputs.
02:03One is the...
02:05...the URL of the screen...
02:07...which is...
02:08...which is this typically.
02:10...and then the number two is the scan clause.
02:12To find out the scan clause...
02:14...for your respect...
02:15...of screens...
02:16...all you need to do...
02:17...is just right-click on your web page...
02:18...go into inspect.
02:19I'm going to network...
02:21...and then try...
02:23...running...
02:24...and scan...
02:25...you would see a process...
02:26...one of these process comes up...
02:27...and then click on it...
02:28...and then go into payload.
02:29...and the scan clause is right at the top.
02:32So all you need to do is just...
02:34...copy this part...
02:35...and then...
02:37...input that...
02:39...as part of your...
02:41...input into the function here.
02:44So as I said...
02:45...it takes two inputs.
02:46One is the...
02:47...the URL...
02:48...that we looked at...
02:49...and then...
02:49...in the scan clause.
02:50And then once...
02:51...you provide this...
02:52...and then run.
02:54...you would get the exact...
02:56...same results...
02:57...as you see...
02:58...on the scanner itself.
02:59...and this is in a data frame...
03:02...so now you can go ahead...
03:03...and use this...
03:04...directly...
03:05...in your algo...
03:06...and then...
03:07...apply various strategy rules...
03:08...on top of it.
03:09So this is...
03:09...how simple it is.
03:11This utility...
03:12...is available for free...
03:13...for download...
03:14...and this is...
03:14...available in our...
03:15...community website...
03:16...which is...
03:17...fapreader.in.
03:18And then I'll...
03:19...provide the link...
03:20...in the description.
03:19Now that you know...
03:20...how the utility works...
03:21...let me just give you...
03:22...an example of...
03:23...how I use it...
03:24...for my strategy.
03:24In fact I use...
03:25...charting screener...
03:26...for multiple strategies...
03:27...of mine.
03:28Here's one example...
03:29...of how I do it.
03:29This particular strategy...
03:30...is called...
03:31...tridevi.
03:32The...
03:33...logic of the strategy...
03:34...is pretty simple.
03:35You have the...
03:36...5, 20, 50, 100...
03:37...and 200...
03:38...SMAs.
03:39So whenever these...
03:40...SMAs...
03:41...come together...
03:42...into a very tight...
03:43...rage...
03:44...often within 3%...
03:45...of the current...
03:46...closing price.
03:47The chances of it...
03:48...break...
03:49...walking out...
03:50...is pretty high.
03:51So you typically look...
03:52...for these tight ranges...
03:53...and scan...
03:54...for those stocks...
03:55...and then wait...
03:56...for the breakout...
03:57...and then trade on those.
03:58That's the overall idea.
03:59For example...
04:00...in the scan that we just ran...
04:01...HDFC came up as...
04:02...one of those...
04:03...eligible stocks.
04:04So you see there is a...
04:05...a tightening of all the...
04:06...SMAs happening here.
04:07The...
04:08...SMAs are all...
04:09...squeezed up in a very...
04:10...tight spot...
04:11...within the 3% range...
04:12...of the last closing price.
04:14And then...
04:15...whenever this happens...
04:16...for example...
04:17...in the previous...
04:18...time this happened...
04:19...you see this huge...
04:19...breakout rally happening.
04:20And this is what...
04:21...we are actually looking for.
04:22And this is my...
04:23...algody...
04:24...dashport...
04:25...that I built...
04:26...as part of my...
04:27...algo trading platform.
04:28And Tridevi...
04:29...I've been running this...
04:30...on one of my...
04:29...smaller accounts.
04:30And...
04:31...the brown part...
04:32...is the...
04:33...the equity...
04:34...the equity curve...
04:35...of the strategy.
04:36And the white part...
04:37...is the nifty 50.
04:38So...
04:39...you see the...
04:39...the equity curve...
04:40...looks pretty good.
04:41The drawdown...
04:42...the underwater plot...
04:43...is also like...
04:44...less than 3%.
04:45This is actually...
04:44...0% because this...
04:45...particular strategy...
04:46...does not have...
04:47...stop loss.
04:48I'd...
04:49...made a couple of...
04:49...mistakes due to which...
04:50...I had to close...
04:51...two of the trades...
04:52...because of which...
04:53...you see this.
04:54Otherwise...
04:55...you don't close...
04:54...any trades...
04:55...you just keep it open...
04:56...until your targets are hit.
04:57And...
04:58...even if you look at...
04:59...the benchmark...
04:59...the strategy...
05:00...there's almost...
05:01...a 3 multiplier...
05:02...difference...
05:03...it...
05:04...this...
05:04...the strategy beats...
05:05...the benchmark.
05:06So it's a very simple strategy...
05:07...and yet...
05:08...at the same time...
05:09...very effective.
05:09...the reason why I love this...
05:10...particular utility...
05:11...and charting...
05:12...specifically is that...
05:13...this particular logic...
05:14...if I had...
05:14...to build it within my...
05:15...python algo...
05:16...it's going to take...
05:17...quite a bit of coding...
05:18...I won't say it's very...
05:19...complex...
05:20...but at the same time...
05:21...it's not simple either...
05:22...so it's going to...
05:23...require some serious...
05:24...amount of...
05:24...of coding...
05:25...to get this logic...
05:26...built...
05:27...but in this case...
05:28...since charting...
05:29...does most...
05:29...of the work...
05:30...all I have to do...
05:31...is just download the...
05:32...results...
05:33...pick up the top one...
05:34...and...
05:34...apply it to my...
05:35...strategies...
05:36...and make...
05:37...buy or sell decisions...
05:38...based on that...
05:39...so that's how...
05:39...simple...
05:40...and effective charting...
05:41...can be...
05:42...if you combine charting...
05:43...and the...
05:44...python utility...
05:44...that I just...
05:45...talked about...
05:46...so the successful combination...
05:47...of charting...
05:48...and the...
05:49...identity that I just...
05:50...talked about...
05:51...can drastically cut down...
05:52...the time it would take...
05:53...for you to automate...
05:54...your...
05:54...strategies...
05:55...if you found some value...
05:56...in this video...
05:57...please consider subscribing...
05:58...and liking the video...
05:59...and I will see you soon...
05:59...another video...
06:00...until then...
06:01...take care...
06:02...bye...
Comments