The goal of the project is to implement a tool to visualise product relationship in the Energy Market. You will need to develop algorithm in Python, which takes Excel files (data) as input, and generates a network/directed graph as output.
The data used to build the graph will be provided:
- In Product Information folder, there are 12 files, each represents a market and contain all product information within that market. Specifically, column A is Product ID, column B is EnergyInstrumentType and column C is TradingTickSize
- In Product Relationship folder, there are 12 files, each represents a market and contain all product relationships within that market. For each row (product), column A is its Market, column B is its Product ID and the remaining columns show relationships between this product and other products.
The structure of the output Network graph should look like the below figure, with additional features outlined in section 4.
The network should have the following features
- Nodes/vertices of the network will have different shapes, according to EnergyInstrumentType in Product Information files. For example, square for CashSpot, circle for PASwap, etc. See above picture for details.
- Nodes/vertices will have different sizes, according to TradingTickSize in Product Information files. TradingTickSize ranges from 0 to 100. Hence, the size of vertices should be proportional to TradingTickSize.
- Edges will have different colours, according to relationship (column D, J, P, V, AB, etc.) in Product Relationship files. Red colour for priceRelationship, Black for Floating and Blue for BalancedForward.
- Edges will have different arrows, according to position (column E, K, Q, W, AC, etc.) in Product Relationship files.
- if column B is CS, column C is CL, column D is Floating, column E is Long, then the edge connecting CS and CL should be CL -> CS with Black colour.
- If the position column is blank, then there should be no arrows, i.e CL - CS.
- if column B is YX, column C is YV, column D is priceRelationship, column E is Short, then the edge should be YV <- YX with Red colour.
The visualisation tool will be implemented using Python. Several libraries can be used but we recommend using NetworkX to connect nodes and build networks. Then use Plotly to plot directed graph.