Skip to content

sandeepsahu1808/JPM-QuantResearch-Virtual-Task-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JP Morgan Quantitative Research

Task 1 – Investigate and Analyze Price Data

This repository contains files for Task 1 of the J.P. Morgan Quantitative Research Virtual Job Experience.
The goal is to analyze natural gas monthly price data and build a model to:

  • Estimate gas prices on any given date (historical or future).
  • Extrapolate prices 12 months into the future for storage contract pricing.
  • Identify seasonal patterns in the price data.

📊 Problem Statement

Commodity storage contracts depend heavily on future price movements.
We were provided with monthly natural gas prices (Oct 2020 – Sep 2024), and the task was to:

  1. Clean and analyze the dataset.
  2. Build a function that takes a date as input and returns an estimated price.
  3. Extend the forecast for 1 additional year beyond the given dataset.
  4. Visualize trends, seasonality, and fitted model.

🛠️ Approach

I used a Sinusoidal Regression Model combined with a linear trend to capture:

  • Trend: Long-term upward/downward movement of prices.
  • Seasonality: Annual demand patterns (higher in winter, lower in summer).

Steps:

  1. Converted dates into a time index (t in months).
  2. Added sin and cos terms to model yearly seasonality.
  3. Fitted a Linear Regression model:
    [ Price = a \cdot t + b \cdot \sin\left(\frac{2 \pi t}{12}\right) + c \cdot \cos\left(\frac{2 \pi t}{12}\right) ]
  4. Forecasted 12 months ahead (Oct 2024 – Sep 2025).
  5. Built a helper function estimate_price_sinusoidal(date) for interpolation/extrapolation.

📈 Results

  • The model captures both the upward trend and seasonal variation in natural gas prices.
  • Provides daily estimates by mapping any input date into the sinusoidal model.
  • Produces a 1-year forecast beyond the dataset.

Example Output:

print(estimate_price_sinusoidal("2024-06-15"))  # interpolation
print(estimate_price_sinusoidal("2025-09-15"))  # extrapolation

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors