Python for commodity trading

Hi monkeys,

Can somebody give me a good idea for a python project related to commodities? I would like to learn python programming while doing something I actually find interesting. BTW, I already have a good knowledge of R. Any suggestion is welcome.

6 Comments
 

Based on the most helpful WSO content, here are some tips and ideas for a Python project related to commodities:

Python Skills to Focus On:

  • Understanding Object Types: Strings, lists, tuples, dictionaries. Use the type() function or the variable explorer.
  • Installing Modules: Learn how to install modules using pip install.
  • Data Sourcing: Write connection strings and use libraries like mySQL, pyodbc, cx_oracle.
  • Data Manipulation: Master Pandas for data manipulation.
  • Emailing from Your Machine: Use win32com and learn basic HTML with inline styling for better email formatting.
  • Advanced Tools (if you have more time):
    • numpy for numerical operations.
    • seaborn for data visualization.
    • pyfolio for portfolio risk management.
    • Web scraping for data collection.

Project Idea:

Commodity Price Analysis and Prediction

Steps:

  1. Data Collection:

    • Use APIs to collect historical commodity prices (e.g., oil, gold, silver).
    • Store the data in a database using mySQL or pyodbc.
  2. Data Cleaning and Manipulation:

    • Use Pandas to clean and manipulate the data.
    • Handle missing values, normalize data, and create new features if necessary.
  3. Exploratory Data Analysis (EDA):

    • Use seaborn and matplotlib to visualize trends, correlations, and patterns in the data.
  4. Model Building:

    • Implement machine learning models to predict future commodity prices.
    • Use libraries like scikit-learn for regression models.
  5. Risk Management:

    • Use pyfolio to analyze the risk and performance of your predictions.
  6. Visualization and Reporting:

    • Create dashboards using Tableau or Power BI to present your findings.
    • Automate email reports using win32com.

This project will not only help you learn Python but also give you practical insights into commodity trading. Happy coding!

I'm an AI bot trained on the most helpful WSO content across 17+ years.
 
Most Helpful

Try to predict fair value of front month crude prices based on various balance sheet factors. Estimate crude production for the rest of the year. Try to predict crack spreads using similar factors. Start with scatter plots of different variables to explore the data.

Predict corn prices based on fundamentals of the balance sheet.

Come up with simple moving average rules and backtest trading strategies.

Build a model to identify different time windows as mean reverting or trending.

Find the seasonality of volatility in various commodities.

 

Aut dolor quas quis iusto iusto quo. Quis sint fugit qui. Voluptatum ut dolore sunt ratione laudantium omnis quam. Culpa omnis voluptate voluptas tempora velit hic. Eveniet id accusantium repudiandae cupiditate suscipit et.

Nobis quibusdam error odio earum est dolores. Dolorum ut dignissimos sint magni. Corporis quia facilis ut praesentium.

Saepe id ut dolore debitis perferendis debitis nam porro. Corporis doloremque mollitia aut sint enim dolores.

Career Advancement Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.8%
  • JPMorgan 01 98.2%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.1%

Overall Employee Satisfaction

June 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Morgan Stanley 01 98.8%
  • Evercore 01 98.2%
  • BMO Capital Markets 12 97.6%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

June 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.8%
  • Morgan Stanley 05 98.2%
  • JPMorgan No 97.7%
  • BMO Capital Markets 12 97.1%

Total Avg Compensation

June 2026 Investment Banking

  • Vice President (14) $434
  • Associates (43) $259
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (13) $156
  • 1st Year Analyst (75) $151
  • Intern/Summer Analyst (66) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
kanon's picture
kanon
99.0
3
BankonBanking's picture
BankonBanking
99.0
4
Secyh62's picture
Secyh62
99.0
5
Betsy Massar's picture
Betsy Massar
98.9
6
dosk17's picture
dosk17
98.9
7
GameTheory's picture
GameTheory
98.9
8
CompBanker's picture
CompBanker
98.9
9
DrApeman's picture
DrApeman
98.9
10
bolo up's picture
bolo up
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”