Be yourself; Everyone else is already taken.
— Oscar Wilde.
This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
Be yourself; Everyone else is already taken.
— Oscar Wilde.
This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
The average outstanding college loan balance is $37,172 according to wikipedia.
The past couple years I’ve ran across a couple videos on YouTube that pretty much sum up to: “College dropout becomes a Millionaire by day trading”. Now I don’t have any intention of dropping out, but being a millionaire sounds nice.
I looked into day trading and it seems like a lot of work. You need to pattern match, take some gambles, and 90% of day traders end up losing money. So that seemed like too much work and too risky for me. But maybe it wouldn’t be too risky for a machine learning algorithm to tackle.
The goal of the machine learning algorithm is to get to the magic number of $37,172. Generally college students don’t have a lot of money, so let’s start off with a $50 investment. The machine learning algorithm will start investing when you start college, and you’ll be able to take out the money when you graduate. So approximately 4 years.
A lot of day trading machine learning implementations go off of the days news. That’s still too risky for my heart. So I will be basing my trades on quarterly earning reports. There are on average 3-7 quarterly reports made every day.
Day Trading on Earnings Report Background:
Investment funds give publicly traded companies estimates on what their earnings per share (EPS) is going to be for a specific quarter. Generally if the companies EPS beats estimates, the stock goes up and vise versa.
There are other factors that affect the stock price as well. For example, if the companies stock price has been doing really well for the past month and they beat their estimates by 10%, the stock price might not go up much because it has already gone up for the past month.
DATA EXTRACTION
Step 1: Extract Estimate Data:
https://www.nasdaq.com/market-activity/earnings
The nasdaq website does a great job at aggregating the data we need. They have the estimates for EPS and the day in which the company will be releasing their reports
Step 2: Extract Quarterly Report Data:
We will have to write a script that scrapes data from Globe News Wire or alternatively the companies investment page in their respective website
https://www.globenewswire.com/Index
Step 3: Extract Stock Price Data:
We want to know the historical data for the stock prices. This way we can see what effect the earnings report had on the stock price
https://dataondemand.nasdaq.com/docs/
MACHINE LEARNING
STEP 1 : Training set
Once the data extraction is complete, we can train our machine learning algorithm on the data. You want to do this on 60-80% of your data
STEP 2: Testing set
After we’ve trained our machine learning algorithm we will want to run the remaining 40-20% of the data through the algorithm as a testing set.
We are aiming for an accuracy score of 90% or better.
Results
I ran out of time but here is a linear regression machine learning algorithm on 20 companies earnings report

The x component in the graph shows by what percentage company Z beat the EPS estimates. The y-component in the graph shows the percentage increase the company had as a result of its earnings report.
For the testing data we will feed the algorithm the percentage difference between estimates and actual EPS. The algorithm will then predict how much it expects the stock price to go up or down by. We compare against the actual stock price shift to get the accuracy of the algorithm
This is the most basic machine learning algorithm you can write. It only takes into account two data points. Our final implementation will contain many more data points.
Verdict
In order to get to our magic number we are aiming for a 1% increase of our funds every day our algorithm trades. That is 166 times a year (out of the 250 trading days) for 4 years.
$50*1.01^665 = %37,383
In the next blog we will complete the implementation of the algorithm and run it against the last 4 years to see if it is indeed possible to pay off our student loans with a machine learning algorithm.
This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.
You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.
Why do this?
The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.
To help you get started, here are a few questions:
You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.
Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.
When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.