-
Notifications
You must be signed in to change notification settings - Fork 0
/
js.js
83 lines (65 loc) · 3.99 KB
/
js.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
"use strict";
document.addEventListener("DOMContentLoaded", () => {
});
let array_text = ["<b>"+"class Main2Period: "+"</b>"+"creates two increments from a financial instrument with different and dynamically variable periods with a shift of one.One increment on the x axis, the other on the y axis. If the value was growing, then the dot is green, the falling value of the dot will be blue."+"<p>"+" By adjusting the first and second periods,"+" we select the optimal values for separating the points."+"</p>"+"<p>"+"Following libraries are used: PyQt5, numpy, sklearn, scipy, pandas_datareader."+"</p>"+
"<p>"+"<a href='https://github.com/quant12345/Machine-learning-and-graphics-for-financial-markets-and-beyond' target='_blank'>"+"You can download the code here"+"</a>"+"</p>",
"<b>"+"class Main2Market: "+"</b>"+"similar to the previous version. But, in the second increment, another financial instrument is used. In this case, these are bonds(^TNX). The second increment works much slower, since synchronization with the first increment is used. If the value was growing, then the point green, the falling point value will be red."+"<p>"+"By adjusting the first and second periods," + " we select the optimal values for separating the points. You can also use other financial instruments and find relationships in them. Rising and falling values are taken from the first financial instrument---^GSPC(df1)."+"</p>"+"<p>"+"Following libraries are used: PyQt5, numpy, sklearn, scipy, pandas_datareader."+"</p>"+
"<p>"+"<a href='https://github.com/quant12345/Machine-learning-and-graphics-for-financial-markets-and-beyond' target='_blank'>"+"You can download the code here"+"</a>"+"</p>",
"<b>"+"class curve_prec_rec: "+"</b>"+" for classification, a one-period increment with a shift of one is used. The 'GradientBoostingClassifier' model is used. 'decision_function()' is used to get the sum of points from 'sklearn'.By adjusting the 'threshold' we get the optimal ratio of 'precisions' and 'recalls'. report=True(prints 'classification_report'), split - how much in % training data, class_= 1 or class_= 0"
+"<p>"+"Following libraries are used: PyQt5, numpy, sklearn, scipy, pandas_datareader."+"</p>"+
"<p>"+"<a href='https://github.com/quant12345/Machine-learning-and-graphics-for-financial-markets-and-beyond' target='_blank'>"+"You can download the code here"+"</a>"+"</p>",
"<b>"+"class curve_roc_: "+"</b>"+"for classification, a one-period increment with a shift of one is used. The 'GradientBoostingClassifier' model is used. By adjusting the slider, select the desired ratio of fpr and tpr. Split - how much in % training data, class_= 1 or class_= 0"
+"<p>"+"Following libraries are used: PyQt5, numpy, sklearn, scipy, pandas_datareader."+"</p>"+
"<p>"+"<a href='https://github.com/quant12345/Machine-learning-and-graphics-for-financial-markets-and-beyond' target='_blank'>"+"You can download the code here"+"</a>"+"</p>"];
const mainSlider = () =>
{
var swiper = new Swiper('.swiper-container', {
effect: 'cube',
grabCursor: true,
slidesPerView: 'auto',
cubeEffect: {
shadow: true,
slideShadows: true,
shadowOffset: 50,
shadowScale: 0.3,
centerSlidesBounds: true,
},
direction: 'horizontal',
loop: true,
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
pagination: {
el: '.swiper-pagination',
},
on: {
init: function () {
},
},
});
swiper.on('slideChange', function () {
let name = swiper.realIndex;
let element = document.getElementsByClassName("text-element")[0];
if (name == 0)
{
element.innerHTML = array_text[0];
}
if (name == 1)
{
element.innerHTML = array_text[1];
}
if (name == 2)
{
element.innerHTML = array_text[2];
}
if (name == 3)
{
element.innerHTML = array_text[3];
}
});
};
try {
mainSlider();
} catch(err) {
}