Class: TimeSeriesData
- Defined in:
- lib/ruuuby/math/stats/time_series_data.rb
Overview
Documentation
MSE | scale-dependent; can’t be used to compare accuracy across time series w/ different scales | MAPE | not scale-dependent; can’t be used when percentages don’t make sense | MASE | independent of scale and usable on all scales |
LEADING | leading -> anticipates future LAGGING | lagging -> validate upcoming trend MOMENTUM | help identify momentum (attribute w/ relation to time) VOLATILITY | measure delta of price movement VOLUME |
LAGGING | simple_moving_average, moving_average_convergence_divergence(MACD) | bollinger_bands, average_true_range, standard_deviation | volume_rate_of_change LEADING | parabolic_stop_and_reverse(parabolic SAR) | stochastic_oscillator, commodity_channel_index(CCI), relative_strength_index(RSI) | chaikin_oscillator, on_balance_volume(OBV)
Constant Summary collapse
- BITWISE_FLAGS =
::Ruuuby::BitwiseFlag.new(%w(has_zero? has_negative? normalized? even? strictly_increasing? strictly_decreasing? all_same?))
Instance Method Summary collapse
- #correlation_with(data) ⇒ Float (also: #R)
-
#healthy? ⇒ Boolean
TODO: un-sorted data not covered atm,
wipTODO: in future, offer score between 0-1.0 once there are a significant amount of attributes to track. - #outliers_lower ⇒ Array
- #outliers_upper ⇒ Array
-
#R²(data) ⇒ Float
(also: #r_squared)
helps show relation between the ‘dependent variable` and 1 or more `independent variables`.
Instance Method Details
#correlation_with(data) ⇒ Float Also known as: R
51 52 53 54 55 56 57 58 59 |
# File 'lib/ruuuby/math/stats/time_series_data.rb', line 51 def correlation_with(data) |
#healthy? ⇒ Boolean
TODO: un-sorted data not covered atm, wip TODO: in future, offer score between 0-1.0 once there are a significant amount of attributes to track
74 75 76 |
# File 'lib/ruuuby/math/stats/time_series_data.rb', line 74 def healthy? self.outliers_lower. |
#outliers_lower ⇒ Array
79 80 81 82 83 84 |
# File 'lib/ruuuby/math/stats/time_series_data.rb', line 79 def outliers_lower outliers = [] boundary = self.boundary_outliers_min (0...self.len). |
#outliers_upper ⇒ Array
87 88 89 90 91 92 |
# File 'lib/ruuuby/math/stats/time_series_data.rb', line 87 def outliers_upper outliers = [] boundary = self.boundary_outliers_max (0...self.len). |
#R²(data) ⇒ Float Also known as: r_squared
helps show relation between the ‘dependent variable` and 1 or more `independent variables`
68 |
# File 'lib/ruuuby/math/stats/time_series_data.rb', line 68 def R |