summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chi_pred.m9
-rw-r--r--run_tests.m3
2 files changed, 11 insertions, 1 deletions
diff --git a/chi_pred.m b/chi_pred.m
new file mode 100644
index 0000000..6e82d37
--- /dev/null
+++ b/chi_pred.m
@@ -0,0 +1,9 @@
+function pred = chi_pred(price, data)
+
+ times = size(price, 1) - size(data, 1);
+ pred = zeros(times, size(price, 2));
+
+ for i = 1:times
+ pred(i,:) = abs(chi2rnd(sqrt(var(data))));
+ end
+end
diff --git a/run_tests.m b/run_tests.m
index 4ab6922..12306a4 100644
--- a/run_tests.m
+++ b/run_tests.m
@@ -13,7 +13,8 @@ pred_methods = [
m('quad', @quad_regress_pred)
m('log reg.', @log_regress_pred)
m('sevenday', @sevenday_pred)
- m('random', @rand_pred)
+ m('norm rand.',@rand_pred)
+% m('chi rand.',@chi_pred)
m('regress2', @regress_frequency_removal)
];
num_methods = size(pred_methods, 1);