Better Model Selection for Evolving Models


For quite some time now I have been using R’s caret package to choose the model for forecasting time series data. The approach is satisfactory as long as the model is not an evolving model (i.e. is not re-trained), or if it evolves rarely. If the model is re-trained often – the approach has significant […]

Forecasting Opportunities

The previous post in this series, showed a way to identify trading opportunities. The approach I implemented used time series daily data to identify good entry points in terms of risk-reward. The natural next step is to try to make use of these opportunities using machine learning.
Read More

Thoughts on Trading

Is trading worth doing for living? Once in a while I am asked this question and, to me, going through this mental exercise makes sense. A lot of sense. So let me share my thoughts.
Read More

Labeling Opportunities in Price Series

One approach to trading which has been puzzling me lately, is to sit and wait for opportunities. 🙂 Sounds simplistic, but it is indeed different than, for instance, the asset allocation strategies. In order to be able to even attempt taking advantage of these opportunities, however, we must be able to identify them. Once the opportunities are identified – we can try to explain (forecast) them using historical data.
Read More

Loading Data with Pandas

On at least a couple of occasions lately, I realized that I may need Python in the near future. While I have amassed some limited experience with the language over the years, I never spent the time to understand Pandas, its de-facto standard data-frame library.

Read More

Too Much Parallelism is as Bad

The other day I run a machine learning backtest on a new data set. Once I got through the LDA and QDA initial run, I decided to try xgboost. The first thing I observed was a really bad performance. The results from the following debugging session were quite surprising to me.
Read More

Is There a Winner from all This BS?

There is abundance of claims that markets (by definition US markets) are rigged. Rigged in the sense that orders are often executed in a way, which contradicts to the natural intent of the person/machine behind the order. Until now, I have dismissed most of these as (populist) speculation, or, conspiracy theory. There is some truth in it however and my feeling is that it’s detrimental to all participants, yes, even to the “winner” in the examples I am going to show.
Read More

Volatility and Bollinger Bands

It is a common knowledge that Bollinger Bands (price standard deviation added to a moving average of the price) are an indicator for volatility. Expanding bands – higher volatility, squeezing bands – lower volatility. A bit of googling and you get the idea. In my opinion – that’s wrong, unless, one uses a twisted definition of volatility.
Read More

Tradelib’s C++ Code Base

My previous post explained some of the reasons to move away from C++ to Java for my trading tools. It generated a few interesting, somewhat heated, but fruitful discussions. Hence, I thought I’ll share Tradelib’s C++ code base, just before I switched to Java. The code is on GitHub. It’s fairly small, but it proved sufficient to implement some interesting strategies. It’s just as it is – I am not planning on adding any new features, fixes or examples for it.