[Python] Python validation function rejects "yahoo_finance" data source - how to fix?

Discussão em 'Python' iniciado por Stack, Setembro 4, 2025.

  1. Stack

    Stack Membro Participativo

    My Python trading system validation function rejects signals with error "Invalid data source: yahoo_finance".

    The scanner generates signals with data_source: "yahoo_finance" but the validation function only checks the source field and doesn't recognize "yahoo_finance" as a valid source.

    Here's the validation code that's failing:

    def _validate_signal_quality(self, signal):
    source = signal.get('source', 'unknown')
    real_sources = ['yahoo', 'enhanced', 'yfinance', 'market_data', 'real_time']
    if source not in real_sources:
    print(f" ❌ Invalid data source: {source}")
    return False
    return True

    Continue reading...

Compartilhe esta Página