Contributed so kindly by Joe Wojniak It may seem obvious, but financial research requires data — and a lot of it. If financial research isn’t your day job, it can be surprisingly difficult to come by. Here are some suggestions for acquiring data to use in your financial research project. Data Sources Every project has […]
Calculating Triple Barrier Labels from Advances in Financial Machine Learning
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 […]
Moving from Single-Asset to Multi-Asset Algorithmic Trading
In my latest book, Algorithmic Trading with Python (2020), readers work through the process of developing a trading strategy, simulator, and optimizer against a portfolio of 100 assets. Each asset has 10 years of end-of-day data, creating about 2,500 data points per asset, totaling 250,000 data points. A lot of similar work in this field […]
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, […]