27 Commits

Author SHA1 Message Date
Conner Fromknecht 99efa7a9f3 Fixed catalyst tests except example tests 2017-06-19 14:43:10 -07:00
Scott Sanderson 4210a2f80f MAINT: Tweaks/cleanups in technical.py.
- Use `expect_bounded` to check inputs.
- Add tests for expected failures from `MACDSignal`.
- Use `float64` instead of `float` in a few places.  This prevents
  diverging behavior on 32-bit systems.
- Docstring edits.
2016-11-28 13:02:40 -05:00
Scott Sanderson c05635333e STY: Put whitespace between operators. 2016-11-28 12:57:03 -05:00
Scott Sanderson 52958a0340 TEST: Use parameter_space for randomized tests.
- Use a RandomState with a seed so that we have repeatible results.
- Use `randint` instead of `random_integers.` `random_integers` is
  deprecated.
- Use `parameter_space` to test multiple period lengths.
2016-11-28 12:57:03 -05:00
Ana Ruelas 3363237123 ENH: Add MACDSignal, test with random input 2016-11-23 11:43:29 -05:00
Ana Ruelas 435d5acd14 TST: Add test for annualized volatility factor 2016-11-21 14:24:28 -05:00
Ana Ruelas 10f5cc2cbb ENH: Actually use rolling windows for EWMA in MACD 2016-11-21 14:24:28 -05:00
Scott Sanderson 30a1eb66ea MAINT: Use explicit floats in np.full. 2016-09-20 17:12:08 -04:00
Scott Sanderson 989d21514c MAINT: Pass float to np.full explicitly. 2016-09-20 17:12:07 -04:00
Scott Sanderson 36e4f70499 MAINT: Fix numpy deprecation warnings. 2016-09-20 16:24:55 -04:00
Scott Sanderson 77146ef489 MAINT: Explicitly use float64 in test. 2016-09-20 16:24:54 -04:00
Scott Sanderson a8b67d352e MAINT: Refactor in prep for downsampled terms.
- Split out extra_rows handling into an `ExecutionPlan` subclass.
  `ExecutionPlan` now requires the dates and calendar against which a
  set of terms will be computed, and now defers to a term's
  `compute_extra_rows` method when deciding how many extra rows are
  required to compute for that term. This will allow downsampled terms
  to request enough extra rows to guarantee that we can maintain consistent
  calculation dates.

  As a consequence of the above, `TermGraph` now only deals with logical
  dependencies, not with metadata surrounding extra row calculations.
  This means that TermGraph can be used to generate dependency
  visualizations in interactive contexts where we don't yet have a
  calendar or start/end dates.

- Refactored test_{filter,factor,classifier} to use check_terms instead
  of run_graph.  This makes it easier to make changes to TermGraph,
  since the testing interface is now to simply provide a dict of terms.

- Refactored BasePipelineTestCase to use fixtures to create an asset
  finder.  This fixes a potential leak of the test's asset db, which was
  not being explicitly cleaned up.

- Refactored test_technical to use BasePipelineTestCase.

- Added a new special term, `InputDates()`, which can be used to request
  date labels for inputs.  Like `AssetExists`, `InputDates` is provided
  in the initial workspace by default.

- Added a default (failing) `_compute` method to `AssetExists` which
  provides a more useful error than AttributeError.
2016-08-17 16:52:09 -04:00
Scott Sanderson 007e1f9cfb BUG/TEST: Fix stochastic oscillator test.
- Don't create unnecessary extra data (requires passing fastd_period=1
  to TA-Lib or else it fills the FastK with NaNs even though it must
  have already computed them...

- Use random_sample instead of random_integers so that we're not
  dependent on integer arithmetic.

- Pass array_decimal to assert_equal so that we do almost equal checking
  on results.
2016-08-09 17:55:24 -04:00
ChrisPappalardo 5888cf1657 ENH: add true range technical factor 2016-07-25 12:37:25 -04:00
Samuel Woo 5756f2932d ENH: Adds LinearWeightedMovingAverage factor 2016-07-14 15:10:42 -04:00
Richard Frank c9b0e4050d TST: Added more test cases for RateOfChangePercentage 2016-07-13 19:48:18 -04:00
Elizaveta239 8a32c2b7ce ENH: Add Rate of change Percentage indicator 2016-07-13 18:07:20 -04:00
Joe Jevnik 0f1c08024a ENH: Adds the ichimoku cloud factor 2016-07-12 18:49:24 -04:00
Jonny Elliott 6979ae8d6a ENH: fast stochastic oscillator added (#1255)
ENH: fast stochastic oscillator added.

A fast stochastic oscillator has been added to the technical
factors. This is the simplest of the stochastic oscillators,
and can be used to build the others.

Tests have been added that compare against the values expected
from that of ta-lib STOCHF.

FastStochasticOscillator is marked as window_safe=True to allow taking
moving averages for smoothing.
2016-06-06 17:06:34 -04:00
Eric Batalden 696e81b911 ENH: Add Aroon indicator. 2016-06-03 16:28:13 -07:00
Scott Sanderson f4d96e065a TEST/PERF: Don't slice twice. 2016-05-13 14:44:26 -04:00
Scott Sanderson c4b69d6223 TEST: Don't mask unexpected exceptions from TALIB.
We know when we expect the error to be raised.
2016-05-13 14:32:21 -04:00
Scott Sanderson 2f90665676 TEST: Add a test for bbands output ordering. 2016-05-13 14:31:58 -04:00
Scott Sanderson cbd4ea36bc STY: No need for these to be vertical. 2016-05-13 14:31:33 -04:00
Joe Jevnik c128b69a91 STY: get Scott to stop yelling at me 2016-05-12 22:15:32 -04:00
Joe Jevnik a345e6f3f5 TST: Clean up metaclass usage in fixtures 2016-05-12 17:00:51 -04:00
Joe Jevnik 2297ace20c ENH: Adds BollingerBands factor. 2016-05-11 21:41:55 -04:00