Stocks Programming

I don’t know about you, but I’m a stock analysis junkie, which has its pros and cons. I can never buy a stock without having at least used some of my mathematical and machine learning expertise. However, I can not do so without a proper environment. In this lecture, we talk about stocks programming. I am not so sure that term exists, so let’s give a proper definition:

Stocks Programming

The process of writing computer programs with the intention of extracting patterns, features, or other kind of information from stocks.

Now, that we laid down a “formal” definition, we can now address the lecture. Whether you are looking for that alpha \alpha signal, or trying to compute a smoothed (ex. Moving Average) on the stock price vs time curve, you need to start with an appropriate environment. For this, I chose Jupyter notebook, which runs smoothly on my Google Chrome. We first prepare Jupyter on Google Chrome, and install all relevant modules that you will be using, such as Pandas. We extract stock prices from different APIs, such as GOOGLE and YAHOO. We plot different stock price curves (such as those by Tesla, Ford, and GM) using Pythons Matplotlib. Many stock analysis terms are introduced, such as Market Cap, Volume traded, opening and closing prices, volatility, cumulative return, daily price return, etc.. We talk about different plots such as Japanese candlestick charts, scatter plots, line charts, box plots, etc.

The lecture’s timestamps are outlined below:

00:00 Intro
02:24 Pandas
03:24 Data Readers
03:51 Jupyter Notebook
04:36 Reading GOOGLE stocks
06:03 Stock Price Visualization
09:21 Tesla x Ford x GM stocks
12:32 Opening Prices
13:44 Volume Traded & Interpretations
17:37 Market Cap
22:15 Moving Average
26:04 Correlation and Scatter Matrix
34:56 Daily Percentage Change
37:47 Volatility
41:59 Box Plots
44:57 Cumulative Return
52:42 Summary

Ahmad Bazzi

Ahmad Bazzi is an Electrical Engineer and YouTuber. Ahmad Bazzi is a signal processing engineer at CEVA DSP. He holds a PhD in Electrical Engineering from EURECOM. Ahmad Bazzi is a EURECOM alumni. Ahmad Bazzi obtained his Master studies (Summa Cum Laude) in Electrical Engineering at SUPELEC, Paris. Ahmad Bazzi has many publications in well-known IEEE conferences, including a nomination award and is a co-inventor in several patents. Ahmad Bazzi dedicates time to publish high level lectures on Mathematics (including convex optimization) and Programming. Ahmad Bazzi also focuses on Machine Learning, Convex Optimization, Linear Algebra, Python, SymPy, NumPy, Pandas, CVXOPT, MATLAB, C++ for firmware systems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Next Post

CVXOPT Programming

Sun Nov 8 , 2020
Before I talk about CVXOPT programming, I’m assuming that you know what a convex optimization (or at least an optimization) problem is. If you don’t, it’s okay. I’ll do my best to introduce it in this post. Consider the following problem     So, what you’re seeing above is an […]