Investing | Talaikis


Kolmogorov-Smirnov test as regime switcher [0.06]

Posted on April 9, 2016, 5:48 p.m. by Investing | Talaikis @ [source]

Kolmogorov-Smirnov test is a nonparametric test of the equality of continuous distribution that can be used to compare a sample with a reference probability distribution. KS-test is usually referred as goodness of fit test, but also it's test for "normality" (if our reference distribution is normal).

compare fit goodness KS normal normality null referred returns test


I was busy with fully abandoning Windows for the Linux and some LAMP stack for some more MEAN stack. Below is is simple exploration of the idea that we can buy some anomalies presented by this test.

anomalies disk efficient exploration happy idea network neural platform python


Continuing SVM clustering I planned to run over all machine learning methods using same two indicator features, and possibly same data, maybe with slight variations. That wouldn't work in practice though as it would be overfit after seeing the out of sample results and using them to select best performers.

Ca checked guarantee middles momentum overfit performers practice results select


OK, I'm continuing my dive into machine learning. I will make two indicators - RSI, which tries to represent (as believed), mean reversion (more acurrately probably - momentum) and momentum indicator in the form of relationship between price and moving average.

acurrately believed indicator momentum moving prove relationship represent reversion rsi


Proper in and out samples.

Following is an example of recurrent learning artificial neural network for returns regression, for the easier future explorations.

complex examples functions generate implement internet related slightly test trading


Most often they don't. Here we'll try to find the real expected returns of several stocks.

Bayes behavior estimate hidden idea ll markets markov models noisy


Hidden Markov Models are generative, probabilistic models, in which a sequences of visible variables are generated by some unknown ("hidden") states. I've done it mainly to minimize the tendency of others to overcomplicate from the mere beginnings.

checks errors find functions generative ll P500 probabilistic unknown words


This is huge subject, so I'll try it cover very fast. If signal goes up and S&P500 goes up - it's true positive, if signal goes up and S&P500 goes down, it's false positive, same for short signals.

data etf financial find ll P500 positive relationship signal XLF


ZipFile ( file_path + "\\tmp_" + filename_ , 'w' ) for file in zipped . ZipFile ( file_path + "tmp_" + filename_ , 'w' ) for file in zipped .

dir filename filename_ file_path tmp_ zipfile zipped


Unlike event driven backtesting where we do calculations on each new arrived data element, we can do simple, fast, but very flexible backtest on the entire vector at once.

Let's try to tests simple thing - mean reversion strategy where we buy large down moves and sell large up moves in S&P500, based on last two bars, delayed by 1 day.

decimal depend initiated moves position signal values words