summaryrefslogtreecommitdiff
path: root/chi_pred.m
diff options
context:
space:
mode:
Diffstat (limited to 'chi_pred.m')
-rw-r--r--chi_pred.m9
1 files changed, 9 insertions, 0 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