Monday, May 24, 2021

NepseWatcher

 I've been investing in stocks recently. It has been an alien subject to me for most of my life. I only got into it owing to a few chats with a childhood friend of mine. I had zero understanding of the stock market before that. But about a month back, that changed. Because of the supposedly free time that I have right now since quitting my job just over a month back and due to the lockdown imposed against the second wave of Covid19, the topic of shares and stocks had my mostly undivided attention (putting aside the ticking time bomb that is my Masters thesis). So, in researching this vast subject, I thought it could prove useful to have a program that could scan the listed companies for possible trading opportunities. I just could not find anything for NEPSE for this purpose. 

Some of the relevant websites I visited did have various screener parameters but not much towards my expectation. So, I embarked upon a journey to create a program that would analyse stocks the way I wanted. Starting around the beginning of this month (May, 2021), I began in earnest. As I hammered out one feature, I went on to add another - all along also continuing research regarding technical analysis. YouTube was a great resource as always. I watched a bunch of technical analysis and swing trading strategies among which an hour long video by Bhanushali is something I have to mention here owing to how much of an influence it had on my take on stock trading. Also, the reddit sub r/nepalstock was a huge resource and a guiding hand to me as a newbie in the field. I also discovered a lecture series by Rachana Ranade on technical analysis which I found was really good. (I'm yet to finish the series.) 

The first feature I wrote was to sort the companies with respect to their Moving Average slopes of closing prices. I then added Candlestick pattern recognition with six different patterns. The most recent one I did was a Return On Investment (ROI) analyser. I also thought a watchlist would be a great addition to the program since I find myself going to Meroshare and my portfolio spreadsheet constantly to check how the companies are doing. So, a couple of days ago I also added a watchlist capability that calculates the net profit, average ROI, etc. all incorporating the hidden costs such as the brokerage commmision, taxes, etc (thanks to sharesansar's share calculator).

Perhaps this could have been a monetisable product were it not for the fact that I do not have access to the prohibitively expensive NEPSE API. All data used by the program are either extracted via web-scraping or reverse engineering third party websites' APIs. As a result, things can break at any given moment. Nevertheless, the program works just fine as of this writing. [Except for the candlestick chart URL used in the browser window. I previously used nepsealpha.com/trading/chart which started blocking any Selenium-driven browser soon enough. I've since switched to systemxlite.com's chart which uses a token-based approach to enforce a time-limit for session validity. So, you have to login to your account on systemxlite.com and go to the technical analysis chart for a functional URL which then you can paste on to the URL bar of the Selenium-driven browser window spawned by the program]

The details of this 3 weeks+ long adventure have been documented in my MDD.txt file @ GitHub

Download here

Screenshots:





No comments:

Post a Comment