← Prev Sketch Next Sketch →

Stock Prediction app (In-Progress):
This app uses daytrade data downloaded (for free) from 'https://stooq.com/db/h/'to locate specific prices for specific stocks on specific days.
It uses the Pandas library in Python to sort through large packages of data.
The original goal was to map out the growing and shrinking economic sectors of various publically-trading countries worldwide,
(i.e. to answer the question, "what years was biotech / consumer products / whatever industry experiencing its most explosive growth in America, India, China, etc?") Stock Industry labels are not free, though, so more research is required.
Since parsing the database, I've gotten an idea for a more exciting program, one that would take less time to develop.

Enjoy this daytrade simulator, or scroll past it to see my stock-prediction calculator idea.




The program I envision will calculate a future stock price using this model:
Take a single stock, and make a set of polynomial regressions from randomized points along the graph, then use that data to attempt to predict future values of stocks, and recommend buys, sells, etc.
To slow it down, picture this:

  1. Take 10 random points.
  2. Create a polynomial regression of the stock price using those 5 points.
  3. Do this for 100 random sets of points along this stock. (x axis is time, y axis is price)
  4. Take a future date
  5. Estimate the future price using the average of all 100 polynomial regressions.
  6. Future iterations could find percent earning instead of dollar amount, or compare a stock's growth to the overall DOW Jones to filter out the stock's performance from the market's performance.
  7. Future iterations could then create characters with different portfolios and behaviors, (like "Sammy Quick-Sales" and "Lexie Long-Term Investor") and see who performs best.
  8. You can really run this simulation using 1990 - 2010 data to train, then simulating growth along 2010 - 2020 data. All of the data is downloadable from this link. I have downloaded the database and created functions for reading it quickly.
  9. Open this pdf to see the stock prediction functions described in greater detail.


Of course, stock market estimating is an enormous field, and if it was so easy, we would all be millionaires.
However, I would like to create this program, and then use data science to tweak a model that demonstrates earnings over time.
If I just keep running simulations with different stock price models, maybe I can find one that seems to earn money over time.
Play the stock simulation above if you haven't already.