Module: Quant::Mixins::HilbertTransform
- Included in:
- Indicators::Indicator
- Defined in:
- lib/quant/mixins/hilbert_transform.rb
Instance Method Summary collapse
Instance Method Details
#hilbert_transform(source, period:) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/quant/mixins/hilbert_transform.rb', line 6 def hilbert_transform(source, period:) [0.0962 * p0.send(source), 0.5769 * p2.send(source), -0.5769 * p(4).send(source), -0.0962 * p(6).send(source),].sum * ((0.075 * period) + 0.54) end |