Image for post
Image for post
Photo by Vlado Paunovic on Unsplash

Deviating from my usual content, in this post I’m going to provide some necessary knowledge for working with a combinatorial object known as a Latin square. These objects were the centerpiece of my (IMO poorly written) undergraduate thesis and are one focal point of research that I continue to this day, development of this research can be seen on its GitHub page. This post can be considered a primer for understanding other posts pertaining to the research I’m doing with these objects which is largely computational and, at this time, includes developing more efficient algorithms and computing paradigms for generating…


Image for post
Image for post
Photo by Markus Winkler on Unsplash

Ensemble learning is a process used in deep learning wherein multiple models, or experts or classifiers, are combined in an ensemble to improve forecasting results. Each individual model in the ensemble, once trained, produces a prediction on an unseen data point. These predictions are then aggregated in some way. For regression problems, the aggregation is typically the arithmetic mean, while the mode of the predictions is usually used for classification problems, i.e. the most predicted class. The quintessential example of an ensemble model is the random forest. …


Image for post
Image for post
Photo by Austin Distel on Unsplash

For an investor making investment decisions based on the underlying fundamentals of a company, i.e. fundamental analysis, finding companies to buy can be a daunting task. With ~3,600 publically listed companies in the United States alone, it can be nearly impossible to get a shortlist of companies to begin doing fundamental analysis on. Thankfully, many brokerages offer stock screeners to help mitigate this issue but, even then, you can end up with way too many companies to look through and many stock screeners lack some important criteria.

In this post, I will introduce a simple way to pre-screen the market…


Every mission-critical system can use levels of redundancy to ensure everything is operating as expected. This post outlines one level of redundancy built into my stock data API. The ideas here can be expanded to any mission-critical system with similar hazards.

Image for post
Image for post
Photo by Lars Kienle on Unsplash

In a previous post, I wrote about an API I have created to retrieve data for stocks belonging to the Russell 2000 and S&P 500 indexes. One glaringly obvious issue with the data-gathering techniques discussed in that post is that the process relies on the system currently running the Python script to be running and connected to the internet…


Image for post
Image for post
Photo by Florian Krumm on Unsplash

For quite some time I’ve been wanting to build a home server to safely (and redundantly) store files, host video game servers, and handle various tasks I’ve written about in previous posts (e.g. host discord bots, run algorithmic P2P trading bots, and gather data for my stock information database). To handle these tasks I currently use my primary machine (which I use for work, writing, and programming) and a collection of Raspberry Pi 3’s and 4’s that I have accrued over time. This setup has worked fine so far, but, while adding another SSD to my system that I planned…


Image for post
Image for post
Photo by Markus Spiske on Unsplash

NOTE: because I live in Montana (and was too lazy to deal with time zones) the data stored in this database (therefore, the dates and times passed to the API endpoints) are recorded in Mountain Standard Time (Denver, CO’s time zone). I apologize in advance for forcing the conversion and inconvenience onto the user.

Typically it’s difficult to get high fidelity stock price and volume data via API. Most of the time the stock data services offer daily, weekly, monthly, and/or annual information for stocks. For example, in a previous post, I created a wrapper around the Yahoo Finance data…


Image for post
Image for post
Photo by Markus Winkler on Unsplash

In a recent post, I wrote about using Monte Carlo simulations to determine the likelihood of a stock option being profitable by generating multiple paths using Geometric Brownian Motion (GBM) and computing some statistics of these paths. This project can be found on my personal project website. Shortly after finishing that project, I was watching a YouTube video from The Plain Bagel, about volatility in the stock market. …


Historical stock data is useful for a variety of applications. Probably the most popular is the attempt to identify trends in the data and to profit off of exploiting them. Another good purpose for the data is to test complex time-series analysis prediction algorithms as the data is nonstationary, sometimes seasonal, and is subject to random shocks as new data is absorbed into the stock price. C++ is a popular programming language most known for its speed but often disliked for its complexity. …


Disclaimer: This project/post is for fun/education please don’t use the results of this project to make investment decisions. If you chose to ignore this disclaimer and do just that I am not responsible for the (very probable) large losses that may occur.

Image for post
Image for post
Photo by M. B. M. on Unsplash

A stochastic process, S, is said to follow Geometric Brownian Motion (GBM) if it satisfies the stochastic differential equation


This project’s GitHub can be found here.

Quick-Nav: Introduction, Implementation, Installation, Examples, Future Work

Image for post
Image for post
Photo by Mika Baumeister on Unsplash

Introduction

For statistical programming languages or languages with good statistics processing libraries, the DataFrame is an essential structure. Most features of these languages and libraries (e.g. the R programming language or the Pandas package for Python), revolve around the DataFrame object which provides useful functionality for working with datasets. There has been a big push to incorporate this type of structure in C++ with a few open-source libraries on GitHub, especially the xtensor project which works to imitate NumPy tensors.

Although I’m sure these libraries are great…

Anthony Morast

I am a professional software engineer and an amateur mathematician. My main interests are programming, machine learning, fluid dynamics, and a few others.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store