def test_readme_example_four():
    """Get price prediction and positions from an external signal transformer"""
    adapted_aroon = ta_adaptor(AroonIndicator, "aroon_down", window=1)
    pipeline = make_pipeline(
        scikit_signal_factory(adapted_aroon), PricePredictionFromSignalRegression(), PositionsFromPricePrediction()
    )
    pipeline.fit_transform(simulated_market_data_4_years_gen())
def test_pipeline_signal_to_position():
    """Checks we can use a signal in conjunction with a rule to calculate a position."""
    signal_to_positions = make_pipeline(
        scikit_signal_factory(normalised_close,), PricePredictionFromSignalRegression(), PositionsFromPricePrediction()
    )
    df = signal_to_positions.fit_transform(simulated_market_data_4_years_gen())
    assert isinstance(df, pd.DataFrame)
def test_readme_example_three():
    """Get price prediction and positions from a signal transformer"""
    pipeline = make_pipeline(
        scikit_signal_factory(normalised_close), PricePredictionFromSignalRegression(), PositionsFromPricePrediction()
    )

    pipeline.fit_transform(simulated_market_data_4_years_gen())
def test_readme_example_one_external():
    """Example of signal generation from time series via simple function"""
    adapted_aroon = ta_adaptor(AroonIndicator, "aroon_down", window=1)
    signal_transformer = scikit_signal_factory(adapted_aroon)
    signal_transformer.fit_transform(simulated_market_data_4_years_gen())
def test_readme_example_one():
    """Example of signal generation from time series via simple function"""
    signal_transformer = scikit_signal_factory(normalised_close)
    signal_transformer.fit_transform(simulated_market_data_4_years_gen())