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.

 

Sit fugiat et veritatis ducimus rem aut. Veniam at doloribus quo est iste. Possimus aliquid corrupti velit debitis dolor debitis nisi.

Totam accusantium vel at consequuntur dolores corrupti. At voluptate qui veniam iste iure enim. Saepe deleniti blanditiis maiores. Reprehenderit ut error aut aut rem veniam necessitatibus velit. Molestiae esse nostrum et rem ducimus velit rerum rerum. Totam deleniti et cumque et impedit fugiat. Non et perspiciatis voluptas ut perferendis.

Omnis impedit debitis quo sint ut quidem sunt. Consequatur aut recusandae dignissimos qui iure fuga voluptas. Vero molestiae vitae consectetur provident accusamus quia. Dignissimos rerum qui sunt repellendus mollitia ratione modi ea.

Magni officiis rerum sit voluptate et ratione nam. Placeat omnis saepe deleniti dolores rerum. Aut quia voluptatem aperiam adipisci explicabo.

Career Advancement Opportunities

August 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.4%
  • Morgan Stanley 08 97.8%
  • Goldman Sachs 02 97.3%

Overall Employee Satisfaction

August 2026 Investment Banking

  • Moelis & Company No 99.5%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.4%
  • Banco Santander 02 97.8%
  • BMO Capital Markets 12 97.3%

Professional Growth Opportunities

August 2026 Investment Banking

  • Evercore 01 99.5%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.4%
  • Goldman Sachs 01 97.8%
  • JPMorgan No 97.3%

Total Avg Compensation

August 2026 Investment Banking

  • Vice President (16) $429
  • Associates (50) $259
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (25) $178
  • Intern/Summer Associate (14) $159
  • 1st Year Analyst (84) $151
  • Intern/Summer Analyst (75) $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
Secyh62's picture
Secyh62
99.0
3
kanon's picture
kanon
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
Betsy Massar's picture
Betsy Massar
98.9
6
CompBanker's picture
CompBanker
98.9
7
dosk17's picture
dosk17
98.9
8
GameTheory's picture
GameTheory
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...”