You are browsing as a guest. Sign up (or log in) to start making projects!

Natural Gas pricing Model

  • 1 Devlogs
  • 2 Total hours

A Python pricing model for natural gas storage contracts that calculates the fair value of a buy-store-sell trade based on injection/withdrawal dates, historical price data, and storage costs. Built as part of the JPMorgan Chase Quantitative Research Virtual Experience.

Ship #1 Changes requested

Built a natural gas contract pricing model in Python for the JPMorgan Chase Quantitative Research Virtual Experience (Task 2).

The model calculates the fair value of a storage contract where a client buys gas cheaply in summer, stores it, and sells it at a premium in winter. It accounts for every cash flow — purchase cost, sale revenue, monthly storage fees, and per-MMBtu injection/withdrawal costs.

The most challenging part was figuring out how to calculate storage duration in months from two datetime objects, and making sure the for loops were subtracting vs adding the right cash flows at the right time.

Proud that I built this line by line with a real understanding of what each piece does rather than just copying code.

To test it: download the executable from the release, make sure Nat_Gas.csv is in the same folder, and run it. You'll see two contract valuations printed — one summer-to-winter trade worth $2,073,333 and one fall-to-winter trade worth $3,481,600.

  • 1 devlog
  • 2h
Try project → See source code →
Open comments for this post

1h 30m 3s logged

I built a natural gas contract pricing model in Python as part of the JPMorgan Chase Quantitative Research Virtual Experience (Task 2). The model calculates the fair value of a storage contract where a client buys gas in summer, stores it, and sells in winter. It accounts for all cash flows: purchase cost, sale revenue, monthly storage fees, and injection/withdrawal costs.

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…