Developing a Neural Network from Scratch in Python with Keras and yfinance

The Python Lab
4 min readJul 6, 2023

Neural networks have gained significant popularity in recent years for their ability to learn patterns and make predictions based on complex data. In this tutorial, we will explore how to develop a neural network from scratch in Python using the powerful combination of Keras and yfinance libraries. Keras provides a user-friendly and high-level API for building and training neural networks, while yfinance enables us to easily collect financial data from Yahoo Finance.

Throughout this tutorial, we will build a neural network model to predict stock prices based on historical data. We will cover the entire process, from data collection to model evaluation, providing step-by-step instructions along the way. By the end of this tutorial, you will have a solid understanding of how to apply neural networks to real-world financial data and the flexibility to experiment with different architectures and techniques to improve your model’s performance.

Let’s dive in and get started on our journey to develop a neural network from scratch in Python using Keras and yfinance.

Cover Image
Photo by Artturi Jalli on Unsplash

Table of Contents

  1. Introduction
  2. Getting Started
  3. Data Collection
  4. Data Preprocessing

--

--

The Python Lab
The Python Lab

Written by The Python Lab

Discovering the power of algorithms in Python. Exploring ML, AI, and Deep Learning. Data-driven trading strategies.