Skip to content

Instantly share code, notes, and snippets.

Cyril Auburtin caub

Block or report user

Report or block caub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@caub
caub / KLRS.md
Last active Aug 29, 2015
Kernel Recursive Least Square using JSAT https://code.google.com/p/java-statistical-analysis-tool/, and test on Santa Fe laser data
View KLRS.md

result

NMSE = 0.039
@caub
caub / NNet.md
Last active Aug 29, 2015
Neural Net test on Santa Fe laser data with code.google.com/p/java-statistical-analysis-tool and sourceforge.net/projects/jarbm
View NNet.md

RBMNet

nmse = 0.095
@caub
caub / Http-test.mq4
Last active Aug 29, 2015
Small MT4 (http://docs.mql4.com/) script for orders copying between 2 accounts
View Http-test.mq4
#include <http51.mqh>
extern string url = "http://localhost:8080/orders";
//this scripts sends an http post containing orders info each tick to this url
int start() {
string params [0,2];
int status[1]; // HTTP Status code
int total=OrdersTotal();
View santa-fe.r
require(nnet)
require(caret)
y = read.csv('http://www-psych.stanford.edu/~andreas/Time-Series/SantaFe/A.dat', header=F)
y2 = read.csv('http://www-psych.stanford.edu/~andreas/Time-Series/SantaFe/A.cont', header=F)
k = 40
n=100
y = y$V1/256
y2 = y2$V1/256
dat = sapply(1:k, function(a) c(rep(NA,a),y[1:(length(y)-a)]) )
@caub
caub / KRLS plot.md
Last active Aug 29, 2015
Santa-Fe regression with matlab
View KRLS plot.md

krls

nmse = 0.042

@caub
caub / knapsack01.m
Last active Aug 29, 2015
an interview question
View knapsack01.m
% problem: we have a result, and many elements, find all combinations that sum up to the result
function sol = knapsack01(maxCapacity, items)
% knapsack problem with variables in {0,1}
% Naive solution is O(n!), knapsack implementation is O(n*m) where n is
% items length and m is weights length
@caub
caub / Zigzag.md
Last active Aug 29, 2015
zigzag chart indicator, a piecewise linear curve fit with alternate slopes (up, down, up, down...), used here to detect double-top and double-bottom patterns http://en.wikipedia.org/wiki/Chart_pattern
View rsi-bt.py
from scipy import *
M = 22 #ma for rsi
N = 14 #rsi loopback
thresh = [20,80] #rsi thresholds
cost = 0.0001 # cost per trade (spread)
price = 1.3 + 0.1*randn(100) + sin(linspace(0,10,100))
ma = ema(price, M)
ri = rsindex(price-ma, N)
@caub
caub / svm.py
Last active Aug 29, 2015
Simplified SMO from coursera's ml-class converted from matlab
View svm.py
from scipy import *
#from scipy.linalg import *
from pylab import *
class SVM:
def train(self, X, Y, kernel, C, tol = 1e-3, max_passes = 5):
m = size(X, 0)
n = size(X, 1)
@caub
caub / polyMultiFeatures.m
Created Apr 28, 2014
Combinatorics for generating polynomial terms of degree <=k
View polyMultiFeatures.m
function [ as_ ] = polyMultiFeatures( items, k )
as = [];
function recurse(a, i)
% we should optimize and early stop a with length>k
if i>size(items,2)
if size(a,2)<=k
as{end+1} = a;
end
return;
end
You can’t perform that action at this time.