Series: Commodities

Python project to maintain and analyse commodity prices.

  • Introduction to the Commodity Futures Project

    This entry is part 1 of 2 in the series Commodities

    In this series of posts, I am going to describe the full setup, design and operation of a Python Django application to acquire and analyse commodity futures with the aim of finding a winning strategy for predicting a [pretend] winning strategy.

    Note that this is just for a bit of fun and to demonstrate the power of Python.

  • Setting up the development environment

    This entry is part 2 of 2 in the series Commodities

    In this post I will describe setting up a development environment on a Mac machine. If you are following along and are using Windows I will indicate any differences to the procedure.

    1. Creating a Directory
    2. Creating a Virtual Environment
    3. Add some Python Packages to the Python Virtual Environment
    4. Open Project in VS Code
    5. Initialise Git

    Creating a Directory

    I suggest you allocate yourself a directory somewhere on your computer (Mac, Windows, Linux) and then create a sub-directory within for each project your embark on.

    To prevent problems with some packages, I suggest you avoid directory names containing spaces.

    On my Mac I have a directory on my desktop called Python and within that I have created a sub-directory called commodities.

    (base) peter@Peters-MacBook-Pro-3 commodities % pwd
    /Users/peter/Desktop/Python/commodities
    (base) peter@Peters-MacBook-Pro-3 commodities % 

    Creating a Virtual Environment

    I will be using the ta-lib package which sometimes won’t install in pip created virtual environments so I am going to use conda to create my environment instead.

    Add some Python Packages

    Ta-Lib

    (commodities) peter@Peters-MacBook-Pro-3 commodities % conda install conda-forge::ta-lib