'Test the output that is returned from the fast stochastic oscillator
is the same as that from the ta-lib STOCHF function.'

@parameter_space(seed=range(5))
def test_fso_expected_with_talib(self, seed):

    window_length = 14
    nassets = 6
    rng = np.random.RandomState(seed=seed)
    input_size = (window_length, nassets)
    closes = (9.0 + (rng.random_sample(input_size) * 3.0))
    highs = (13.0 + (rng.random_sample(input_size) * 2.0))
    lows = (6.0 + (rng.random_sample(input_size) * 2.0))
    expected_out_k = []
    for i in range(nassets):
        (fastk, fastd) = talib.STOCHF(high=highs[:, i], low=lows[:, i], close=closes[:, i], fastk_period=window_length, fastd_period=1)
        expected_out_k.append(fastk[(-1)])
    expected_out_k = np.array(expected_out_k)
    today = pd.Timestamp('2015')
    out = np.empty(shape=(nassets,), dtype=np.float)
    assets = np.arange(nassets, dtype=np.float)
    fso = FastStochasticOscillator()
    fso.compute(today, assets, out, closes, lows, highs)
    assert_equal(out, expected_out_k, array_decimal=6)
