Module: Math::Stats::TimeSeries
- Defined in:
- lib/ruuuby/math/stats/time_series.rb
Class Method Summary collapse
- .aroon_down(data, n) ⇒ Array
- .aroon_oscillator(data, n) ⇒ Array
- .aroon_up(data, n) ⇒ Array
- .exponential_moving_average(data, n, smoothing_constant = 2.0) ⇒ Array (also: ema)
- .simple_moving_average(data, n) ⇒ Array (also: sma)
- .weighted_moving_average(data, n) ⇒ Array (also: wma)
Class Method Details
.aroon_down(data, n) ⇒ Array
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 137 def self.aroon_down(data, n) |
.aroon_oscillator(data, n) ⇒ Array
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 163 def self.aroon_oscillator(data, n) |
.aroon_up(data, n) ⇒ Array
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 111 def self.aroon_up(data, n) |
.exponential_moving_average(data, n, smoothing_constant = 2.0) ⇒ Array Also known as: ema
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 27 def self.exponential_moving_average(data, n, smoothing_constant=2.0) |
.simple_moving_average(data, n) ⇒ Array Also known as: sma
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 85 def self.simple_moving_average(data, n) |
.weighted_moving_average(data, n) ⇒ Array Also known as: wma
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/ruuuby/math/stats/time_series.rb', line 56 def self.weighted_moving_average(data, n) |