Hot answers tagged


After having done a lot of research on the topic I found the following excellent research piece on Wealthfront modifies historic asset-class returns with current market implied expected returns (Black-Litterman) as well as with the in-house views of Chief Investment Officer Burton Malkiel’s team. In addition, Wealthfront sets minimum and ...


I think you might find this answer in The future language of quant programming? useful. People get this problem wrong because they always end up discussing the theoretical advantages of these languages rather than the practical uses of these languages. Theoretically speaking: Haskell is elegant and has many of the theoretical advantages (language ...


The following link has a good summary of a typical pair trading strategy: It actually has full python code as well. It doesn't include a cointegration check though. Edit: if X and Y are cointegrated: calculate Beta between X and Y ...


Your reasoning is correct. To answer your last question: the current prices alone don't decide how many shares to sell and buy in each of the stocks. That is decided by the hedge ratio. In fact, the whole point of the hedge ratio is to assume that it is the ratio that the stocks will revert back to over time. So if we denote the spread at time $t$ by $s_t$ ...


One idea is Dynamic time warping (DTW). There is an R package for that: dtw Here is the vignette:Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Packageby Toni Giorgino And here is an example from Systematic Investor with full code: Time Series Matching with Dynamic Time Warping


There are many resources on the web but you need to think why you would want to do this in the first place. Are there not packages or frameworks out there already that will do what you need? Also backtesting or any financial trading platform will be suited to a specific style or method of backtesting. Some are vectorised iterative processes (e.g. just a big ...


This may not directly answer your questions. There's a class offered by Georgia Tech called Machine Learning for Trading, you might find it useful.


Read Max Dama on Automated trading (PDF) - This is the best introduction to algorithmic trading out there:


You may have a look at a list of clustering algos available in sklearn here, but I think all of them are of $O(n^2$) complexity. As well, have a look at the TSNE clustering algo, which is supposed to be $O(log(n)*n)$, but this may not be the fact depending on a particular implementation. A particular case in point is again Python sklearn implementation of ...

Only top voted, non community-wiki answers of a minimum length are eligible