Prediction Dataset

MSFT - Microsoft Corporation

  • day 1 : $413.41
  • day 2 : $414.87
  • day 3 : $415.79
  • day 4 : $418.34
  • day 5 : $412.23
  • day 6 : $414.71
  • day 7 : $413.93
  • day 8 : $411.52
  • day 9 : $413.02
  • day 10 : $410.9

Stock Predictor

Programming Language Used:

Programming Framework Used:

Description:

This project is a combination of three separate projects. They are as follows:

  1. Stock Prediction Python Script/Class
    1. A class object that retrieves stock data from yFinance and uses sci-kit (sklearn) machine learning to predict future stock values.
    2. When used in a script, the class will be utilized to send the prediction data to any API endpoint, in this case, my other project using Laravel API.
  2. Stock Prediction API
    1. An API built on Laravel and its internal and third-party package of Laravel Sanctum and Laravel Testing.
    2. POST, PATCH, and DELETE methods need authorization to be used. GET methods are universal.
  3. Stock Prediction Next.js
    1. A frontend application built on Next.js to showcase stock prediction data.
    2. Data is fetched from an API backend and is used in a Chart.js to show a line graph of stock predictions.
    3. TypeScript is applied to ensure data fetched from the backend has the correct types and structures.

Challenges and Solutions

The main challenge I faced in this project was configuring the web servers on DigitalOcean DigitalOcean Droplet server to have proper SSL to ensure that the Next.js application can properly fetch data from the Laravel API. Since you are not able to make an IP address secure with SSL, and I did not want to have to purchase an additional domain, I had to find another way to make the IP address safe.

The solution I found was that I could make a subdomain of my portfolio website and point it to the DigitalOcean Droplet server. This way, developers had a trusted way to fetch data while minimizing the cost of having this project. My portfolio website is hosted on Netlify, and all I had to do was create a subdomain ‘A’ and point it towards the IP of the Droplet server.