Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IE420 Financial Dashboard

A Java 8 desktop application for monitoring key financial instruments. Data is sourced from the FRED API (Federal Reserve Economic Data). Users enter a ticker symbol into the table and the app automatically fetches the instrument's recent history, computing standard deviation and z-score statistics to help identify unusual market conditions.


Project Overview

The dashboard provides a quick snapshot of 13 financial instruments spanning U.S. Treasury rates, inflation, short-term funding rates, volatility, and foreign exchange. For each instrument the app shows:

ApplicationScreenshot

  • Yesterday's Close — the most recent available observation from FRED.
  • 3-Month Standard Deviation — population standard deviation of all daily values over the past ~3 months, measuring how volatile the instrument has been.
  • 3-Month Z-Score — how many standard deviations the latest value sits from the 3-month mean: (latest − mean) / σ. A large absolute z-score signals that the current level is unusual relative to recent history.

Double-clicking the close cell of any loaded row opens a line chart of the instrument's full 3-month history.

30YBond

USDJPY


Supported Tickers

Ticker Instrument FRED Series
3M 3-Month T-Bill (Secondary Market Rate) TB3MS
6M 6-Month T-Bill (Secondary Market Rate) TB6MS
1Y 1-Year Treasury Constant Maturity Rate DGS1
2Y 2-Year Treasury Constant Maturity Rate DGS2
3Y 3-Year Treasury Constant Maturity Rate DGS3
5Y 5-Year Treasury Constant Maturity Rate DGS5
10Y 10-Year Treasury Constant Maturity Rate DGS10
30Y 30-Year Treasury Constant Maturity Rate DGS30
CPI Consumer Price Index (All Urban Consumers) CPIAUCSL
SOFR Secured Overnight Financing Rate SOFR
VIX CBOE Volatility Index VIXCLS
USDEUR USD / EUR Exchange Rate DEXUSEU
USDJPY USD / JPY Exchange Rate DEXJPUS

How to Run Locally

Prerequisites

Requirement Version
Java JDK 8 or later (tested on JDK 21+)
Apache Maven 3.6 or later

Install Java

  • macOS: brew install openjdk or download from Adoptium
  • Windows: Download the installer from Adoptium and run it. Ensure JAVA_HOME is set and java is on your PATH.
  • Linux (Debian/Ubuntu): sudo apt-get install openjdk-21-jdk
  • Linux (Fedora/RHEL): sudo dnf install java-21-openjdk-devel

Install Maven

  • macOS: brew install maven
  • Windows: Download the binary zip from maven.apache.org, extract it, and add the bin\ folder to your PATH environment variable.
  • Linux (Debian/Ubuntu): sudo apt-get install maven
  • Linux (Fedora/RHEL): sudo dnf install maven

Build and Run

The launch command is the same on all platforms:

# 1. Navigate to the project directory
cd IE420-Project

# 2. Compile and launch
mvn exec:java -Dexec.mainClass=com.ie420.Main

Maven will automatically download the two runtime dependencies (JFreeChart and org.json) on the first run.

Build a Standalone JAR

mvn package -DskipTests

Then run the JAR directly. The classpath separator is : on macOS/Linux and ; on Windows.

macOS / Linux:

java -cp "target/financial-dashboard-1.0-SNAPSHOT.jar:\
$HOME/.m2/repository/org/jfree/jfreechart/1.5.3/jfreechart-1.5.3.jar:\
$HOME/.m2/repository/org/json/json/20231013/json-20231013.jar" \
com.ie420.Main

Windows (Command Prompt):

java -cp "target\financial-dashboard-1.0-SNAPSHOT.jar;^
%USERPROFILE%\.m2\repository\org\jfree\jfreechart\1.5.3\jfreechart-1.5.3.jar;^
%USERPROFILE%\.m2\repository\org\json\json\20231013\json-20231013.jar" ^
com.ie420.Main

Windows (PowerShell):

java -cp ("target\financial-dashboard-1.0-SNAPSHOT.jar;" +
  "$env:USERPROFILE\.m2\repository\org\jfree\jfreechart\1.5.3\jfreechart-1.5.3.jar;" +
  "$env:USERPROFILE\.m2\repository\org\json\json\20231013\json-20231013.jar") `
  com.ie420.Main

How to Use the Application

  1. Enter a ticker — click any cell in the Ticker column, type a supported symbol (e.g. 10Y, VIX, SOFR), then press Enter or click elsewhere. The app fetches data from FRED in the background and populates the row.

  2. Read the statistics — once loaded, the row shows Yesterday's Close, 3-Month Std Dev, and 3-Month Z-Score. A large absolute z-score (e.g. > 2) indicates the current level is far from its recent average.

  3. View the history chart — double-click the Yesterday's Close cell of any loaded row to open a popup line chart showing the instrument's daily values over the past 3 months.

  4. Comment rows — type any text starting with == in the Ticker column (e.g. == US Treasuries) to insert a comment row. The entire row turns light yellow and no data is fetched. Use comments to label or separate groups of tickers.

  5. Auto-expanding table — the table starts with 10 rows. When you commit a value in the last row, 5 additional blank rows are appended automatically so you never run out of space.

  6. Get help — click Help → How to Use in the menu bar for an in-app reference.

  7. Invalid tickers — entering an unsupported symbol shows N/A in the numeric columns.


Design

Architecture

The application follows a layered design:

UI Layer         →  Swing components (JFrame, JTable, JDialog)
Model Layer      →  AbstractTableModel + TickerData value object
API Layer        →  FRED REST client + ticker-to-series mapping
Utility Layer    →  Statistical calculations (std dev, z-score)

Each layer has a single responsibility and no circular dependencies.

Data Flow

User types ticker
       │
       ▼
TickerTableModel.setValueAt()
       │  spawns SwingWorker (off EDT)
       ▼
FredClient.fetchObservations()  ──►  FRED REST API
       │  returns List<[epochMs, value]>
       ▼
StatsUtil.stdDev() / zScore()
       │  computes statistics
       ▼
TickerTableModel.updateRow()   ──►  fireTableRowsUpdated()
       │  back on EDT
       ▼
JTable repaints row

The SwingWorker pattern ensures the Event Dispatch Thread (EDT) is never blocked by network I/O, keeping the UI responsive while data loads.

Statistical Definitions

Given N daily observations over the past ~95 calendar days (ensuring ~63 trading days):

Metric Formula
Mean μ = Σxᵢ / N
Population Std Dev σ = √( Σ(xᵢ − μ)² / N )
Z-Score z = (x_latest − μ) / σ

Missing FRED observations (represented as ".") are excluded before any calculation.

UI Design Choices

  • Alternating row colors — even rows in grey (#C8C8C8), odd rows in light blue (#ADD8E6) for easy row scanning.
  • Comment rows — any ticker starting with == is treated as a label rather than an instrument. The row is highlighted in light yellow (#FFFFCC) and no FRED fetch is triggered, letting users annotate the table with section headers.
  • Non-blocking fetch — each ticker fetch runs in its own SwingWorker, showing "Loading..." during the request.
  • Double-click chart — keeps the main table uncluttered; the chart is on-demand.
  • Auto-expanding rows — the table starts with 10 rows. When the user commits a value in the last row, 5 more blank rows are appended automatically via fireTableRowsInserted, so the table grows on demand without an explicit "Add Row" button.

Project Structure

IE420-Project/
├── pom.xml                                        # Maven build file (JFreeChart, org.json)
└── src/
    └── main/
        └── java/
            └── com/
                └── ie420/
                    ├── Main.java                  # Entry point — launches MainFrame on the EDT
                    │
                    ├── api/
                    │   ├── FredClient.java        # HTTP client for FRED REST API
                    │   └── TickerMapping.java     # Maps user ticker symbols to FRED series IDs
                    │
                    ├── model/
                    │   ├── TickerData.java        # Immutable value object for one row of data
                    │   └── TickerTableModel.java  # AbstractTableModel; triggers SwingWorker fetch
                    │
                    ├── ui/
                    │   ├── MainFrame.java         # Top-level JFrame with menu bar
                    │   ├── TickerTable.java       # JTable subclass; double-click listener
                    │   ├── AlternatingRowRenderer.java  # Grey/light-blue alternating rows; light yellow for comments
                    │   ├── HelpDialog.java        # Non-modal help window
                    │   └── ChartDialog.java       # Modal JFreeChart time-series dialog
                    │
                    └── util/
                        └── StatsUtil.java         # mean(), stdDev(), zScore() helpers

Key Files

File Role
FredClient.java Builds the FRED API URL, makes the HTTP request, parses JSON, filters missing values, returns List<double[]>
TickerMapping.java Single source of truth for which FRED series corresponds to each user-facing ticker
TickerTableModel.java Owns all row state (dynamic ArrayLists); setValueAt() triggers fetch, comment detection, and last-row expansion
StatsUtil.java Pure functions; no Swing or FRED dependencies — easy to unit test independently
ChartDialog.java Builds a TimeSeries from the stored history and renders it via JFreeChart

Dependencies

Library Version License Purpose
JFreeChart 1.5.3 LGPL 2.1 Time-series line chart in the history popup
org.json 20231013 Public Domain Parse FRED API JSON responses

No other third-party libraries are used. All HTTP networking uses java.net.HttpURLConnection from the Java standard library.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages