Skip to main content
    AI in the Wild
    Learning & study·Workflow

    Train an LSTM to predict Palantir stock direction

    From @mar_antaya

    Creator-reportedThe creator describes it and says it worked. We did not verify the result.

    The creator reports their own accuracy numbers. We read the captions only and saw no code.

    The creator walks through a small machine learning project. It pulls Palantir price data with yfinance, charts it in Plotly, and builds features from moving averages and closing price. An LSTM model then guesses if tomorrow closes higher. They report 59 percent training and 51 percent testing accuracy, which is near a coin toss.

    How it works

    1. 1

      Download stock data

      Use yfinance

    2. 2

      Clean and plot it

      Use Plotly

    3. 3

      Build features

      5, 20 and 50 day averages plus close

    4. 4

      Train an LSTM model

      Predict up or down tomorrow

    5. 5

      Read the accuracy

      59% train, 51% test

    6. 6

      Compare with chance

      About 55% or more shows learning

    Who it helps

    Engineer / builderStudent

    Tools involved

    yfinancePlotlyLSTM model

    Before you try this

    • Test accuracy is near chance; this is not trading advice.
    • No code is shown in the captions.
    Watch the original Reviewed 2026-10-23. Transcript read; video visuals not reviewed.

    Get new additions

    Email updates when new entries are added are coming soon. The library stays free and open to browse. Nothing is collected on this page today.