Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning in Finance

Project Header

Author: Sid Shenoy
Date of Submission: Wednesday, June 14, 2023
Course Code: ICS4U1 (Grade 12 Computer Science)
Course Instructor: Mr. Fernandes

Title: Machine Learning in Finance
Version: 1.8.12 (FINAL VERSION)
Last Modified: June 14, 2023

Description:
This application illustrates the growing link between finance and machine learning.
There are 4 interactive frames that display organized information, a trivia quiz, a machine learning demo, and a guessing game.
The information in this program will provide an improved understanding of machine learning actually works when dealing with finances.
More details on each section can be found in the program's information panel.

Major Skills: GUI programming, Object oriented programming (OOP), User input, Machine learning
Areas of Concern: The recursive differentiation algorithm does not validate inputs.


Overview

This is my Grade 12 final project (SDP). It is a Java GUI application (Swing) that teaches concepts about machine learning specifically in finance, and includes interactive sections to test knowledge and demonstrate an algorithm used for optimization.

The program opens a main window with tabs (frames) that you can switch between.


What's in the program

1) Intro to ML

  • A slideshow-style introduction with 5 slides
  • Each slide has an image (images/frame1.png to images/frame5.png) and a written explanation
  • Use the numbered buttons or the < > buttons to move between slides

2) Machine Learning Quiz

  • 10 multiple-choice questions (finance + ML terms)
  • Score is shown live
  • At the end, you get a feedback message depending on your score
  • You can retry the quiz as many times as you want

3) Test it Out! (Interactive ML Demo)

  • Live demonstration of a recursive differentiation style optimization process
    • "Recursive differentiation" is not a real algorithm, but a name I created for this project (Note: in this project the number of values is hard-coded to 4, so the demo does not actually recurse.)
  • You select a scenario and input 4 profit values
  • The program generates a full step-by-step explanation:
    • Finite differences table
    • Building a polynomial
    • Differentiating using the power rule
    • Solving for slopes of 0 to find local maximum values
    • Testing the points to determine the best maximum within the domain {1 <= x <= 4}
  • Includes a Desmos link for verification (manual input required)

Scenarios included:

  • Bakery Management - Recipe Optimization
  • Advertising Campaign - Marketing Optimization
  • Theme Park Tickets - Sales Optimization

4) Guessing Game (Maximum Values)

  • 10 questions
  • You are given 4 function values (like a(1), a(2), a(3), a(4)) and must guess where the maximum curve value occurs between 1 and 4
  • Scoring:
    • +10 if you pick the correct value
    • Otherwise you still get a small amount
  • The test can only be taken only once (after completion it locks)

How to run

Important note about images

This project uses image paths like:

  • images/logo.png
  • images/frame1.pngimages/frame5.png

So make sure your working directory is the project root (the folder containing images/), or the images may not load.

Option A: Run using an IDE (recommended)

  1. Open the project folder in Eclipse / IntelliJ / VS Code
  2. Run:
    • src/application/MachineLearningApplication.java

Option B: Compile and run from terminal

From the project root:

javac -d out src/application/MachineLearningApplication.java src/frame/WindowFrame.java src/demopanel/DemoPanel.java src/differentiator/Polynomial.java src/differentiator/SequenceHandler.java
java -cp out application.MachineLearningApplication

Known limitations / concerns (important)

  • The recursive differentiation demo does not validate inputs, so invalid or unexpected input can lead to problems.
  • The demo is designed around exactly 4 values (hard-coded), meaning it does not scale to larger datasets in this version.
  • The guessing test is intentionally one attempt only once completed.

Credits / Notes

  • This project was created as part of ICS4U1 (Grade 12 Computer Science).
  • Some portions of the window/frame structure were imported from a previous SDP and modified (as mentioned in WindowFrame.java).
  • The intro slide images are stated in the program as labelled free for use by Google.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages