Real estate is an imperishable asset, ever increasing in value. It is the most solid security that human ingenuity has devised. It is the basis of all security and about the only indestructible security.

— Russell Sage

Photo by Sieuwert Otterloo on Unsplash

Buy and hold real estate investing can be very satisfying and, oftentimes, very lucrative. In his book, One Up on Wall Street, even legendary stock picker Peter Lynch recommends buying a home before picking individual stocks in the stock market due to its investment potential (although some of his message comes off slightly sarcastic). Unlike with stocks and bonds purchasing real estate allows…


Photo by Mae Mu on Unsplash

The wheel is a loss-limited option selling strategy that is very effective at generating income in a portfolio. Typically when trading the wheel, stocks with weekly options are preferred since they fetch higher premiums (percentage-wise) than monthly options or LEAPS. However, due to the high number of stocks on US stock exchanges offering weekly options and the differences in volatility and price, it’s challenging to find an optimal set of stocks to sell puts against that will maximize your collateral usage and income while minimizing the risk taken due to volatility.

Optimization problems like this, wherein some variables are maximized…


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…


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. …


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.

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…


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…


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…


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. …

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