StackAccel

≡ Menu

Getstockinfo

GSI (getstockinfo) is a python script that performs basic analysis on a specified watch list of US equities, and can be used to better understand the performance of your positions within the context of daily market fluctuations, as well as accelerate your research.

This tool exists because I wanted a quick and easy way to automate some basic analysis steps on all of my positions, and I wanted to do so without necessarily having to individually evaluate each and every position or login to all of my accounts.  It’s one thing to look at your portfolio summary on Mint, or Yahoo Finance, and have some vague or general awareness of how your investments performed.  Seeing that your portfolio went up in value is nice, I suppose… but it’s not really actionable or particularly useful information by itself.  In fact, without context, it might even be more of a distraction… maybe a reminder of the homework that you know you should be doing.  Anyway, so what do I mean by context?  Well, if you’re looking at each of your investments every day… comparing them against some sort of benchmark, evaluating the volume, reviewing the charts in multiple time frames, etc. you start to develop an understanding of the context surround your positions, and the market.  Maybe you notice that your tech stocks keep hitting new 52-week highs when the market is just bouncing around, or maybe you notice that one of your industrials keeps showing up on the daily looser list, even though the market is going up.  Understanding the context in a meaningful manner and identifying actionable next-steps can help you create value.  So, basically I wanted something that could automate some of the daily work and filter down the list of things to pay attention to, and at the same time be something I could understand at a glance every day.

Doesn’t that sound like a pretty common problem that you’d think would have been solved by now?

It did to me too.  Over the years, I’ve used an assortment of tools to try to improve my homework.  Everything from various finance web sites, to smartphone apps, to brokerage alerts, to Excel spreadsheets that used VBA to pull in pricing, and eventually to charting software and trading platforms.  Using a combination of tools, at some trade-off between cost, complexity, and effort… my goals were mostly achievable.  Except for the quick and easy part.  So that’s why getstockinfo exists.  I think it’s is pretty easy to use… create watchlist, point the script at it, and let it go to work.  It does some basic analysis for you, and gets you pointed in the right direction for your homework.  Most important to me, is that it helps me understand a bit more about the context about my positions at a glance.

Next-Steps:

If you have some Python experience, just do a “pip install getstockinfo” from a command prompt, and you’ll be off and running.   Otherwise, you’ll need to get Python 2.7 installed, then download a copy of the script, and create or borrow a watchlist .  Then run the script against it.

Usage:

python getstockinfo-release.py –v –nl –wl –ll –ip –op –nh –f portfolio.txt

Which will produce output that looks something like the below…

getstockinfo output

How I use it:

I run getstockinfo as a cronjob from bash script with all of the arguments turned on… it runs through my watchlists, generates some output, and that then gets emailed to me after the close every day.  I turn around and use that output for further investigation.  Stocks that I own with unusual volume, or that repeatedly show up on the daily winner/looser list, that are outperforming the S&P 500, etc… are all things which merit further investigation.

Other:

Thing to keep in mind… make sure your ticker symbols are valid on Yahoo Finance.  On the last line of your watchlist, make sure you don’t add a carriage return.  Go ahead and give it a try, and let me know if you have any questions.

Get Free Email Updates!

If you liked this article, you’ll LOVE the newsletter

Sign-up for the newsletter, and we’ll send you useful and exclusive content that doesn’t get posted to the site. No spam. Ever. Unsubscribe at any time.

0 comments… add one

Leave a Comment

Visit Us On Twitter