Monday, February 27, 2017

Buy or Sell? Stock Market Daily Tracker

With my life getting busier and busier, adding another item to the daily morning routine, no matter how short in the amount of time it takes, is to be avoided.  So as I have been observing the recent increases in the stock market and deciding that I should be paying attention more, I have been pondering about how I might do this in a more automated fashion.

Consequently, I decided to write a simple Python program that pulls some daily stock market information (e.g., today's opening, yearly high, yearly low), runs some calculations (e.g., opening / yearly high), and then after some simple conditional logic, tells me whether I should buy. This code runs on a daily schedule and opens up in a pop-up window automatically.

It is rather simplistic, but a quick glance at this every day is a simple way to keep an eye on the market and to be informed of action I should take in response.



The code is posted to GitHub if you are interested.

1 comment:

  1. Nice, you have the scrapper to get the data and your personal daily calc, you could add a database class, store that information and use any AI algorithm/library (FANN, or PyBrain) to predict variance on the data. There is a lot of stock market tools already developed (unfortunelly most of them propietary code ), but I always wanna know whatever is behind the user interface. A customized and modifiable tool is a good thing.
    Instead of write the code for predictions you could store the data in any database engine and then use Weka to perform the analysis. If you choose a based neural network algorithm you only gonna need the training data to calibrate the model and then you gonna have a more accurate advice for investment.

    ReplyDelete