In Marcos Lopez de Prado’s 2018 book, Advances in Financial Machine Learning, the author proposes a system for calculating labels for financial events based on the precipitation of events followings a list of event dates. These labels are typically members of the set {-1, 0, 1}, and are ideal for fitting machine learning classification models. […]
Calculating Financial Performance Metrics in Pandas
I just finished writing my latest book, Algorithmic Trading with Python. When writing the chapter on performance metrics, I was consistently surprised with the simplicity of the pandas code. If you, as a developer, resolve to only work with datetime-indexed pd.Series objects, the resulting code is really clean and easy. Simulating Data For those unfamiliar […]
The Best Language for XYZ: Answered Empirically
One of the biggest jobs of CTOs and Technical Project Managers is to answer: What is the best software stack for building XYZ? On the web… Internet forums like Quora and Stack Overflow are littered with these kinds of questions. This is understandable, because committing to the wrong software stack can be deadly in the […]
Download Historical Stock Data with R and Python
Update #2: Track this Issue Here Updates to this post are more about which API’s are still supported than how to access them with R, Python, or any other language. Follow the hilarious change history of EOD stock data API’s at my other post: https://chrisconlan.com/download-daily-data-every-sp-500-stock-r/. Update: Using Quandl’s API Because everything I write about breaks, […]
Procedurally Generating a Maze in Blender Python
Everyone knows I am a fan of Blender Python. It’s really fun. This post will discuss a brief script for procedurally generating a maze in Blender Python. This may be the boilerplate code for a larger routine that produces massive randomly-generated landscapes. In this brief code, we will run into some fairly advanced concepts in […]