Git Product home page Git Product logo

transition-matrices's Introduction

Overview

The Markov chains have been widely applied in multiple areas from physics, engineering and biology to marketing and finance (Norris, 1997; Privault, 2013). This repository is exclusively focused on the type of transition matrix of the Markov chain whose probabilities are expressed in percentage (Privault, 2013). To showcase this particular application of Markov chains, the Fortune Global 500 list on the world's largest companies was scraped and prepared. Specifically, the compiled dataset covers lists of the previous four years (from 2020 to 2023). A 4-year transition matrix based on the companies' profit was computed and styled using Python.

About the method

1. Calculation of profit classes

Profit classes are the resulting categories of the calculation which splits up the profit from the Fortune Global 500 companies into 10 equal parts based on the cumulative percentage.

The calculation is as follows:

  • To sort the companies in descending order according to its profit;
  • To assign the profit classes from 1 to 10 in line with the respective cumulative percentage;
  • Figures <=0 are excluded from the calculation and categorized as "<=0".

Image 1: Profit classes calculation

2. Interpretation of the transition matrix

  • The probabilities of the transition matrix are expressed in percentage, as stated previously;
  • The columns represent the profit classes of a later year of the time range (2023 in the case in hand), whereas the rows stand for the profit classes of a previous year (2020);
  • A color coding method was adopted to identify the different types of transitions;
  • Green segment (lower triangular): it portrays upgrades in the matrix, meaning any transition from a lower class of a previous year to an upper class of a later year; steep upgrades are highlighted in dark green while intermediate and slight upgrades are marked in light green;
  • Yellow segment (diagonal): no ranking changes over the time period;
  • Red segment (upper triangular): red identifies downgrades (any transition from an upper class of a previous year to a lower class of a later year); the dark red intersections of the matrix are referring to steep downgrades and the light red ones are related to intermediate and slight downgrades;
  • Blue segment: companies which entered the Fortune Global 500 list;
  • Brown segment: companies which were dropped from the list.

Image 2: 4-Year Profit transition matrix on the Fortune Global 500


Image 3: 4-Year overall upgrade likelihood on the Fortune Global 500


Image 4: 4-Year overall downgrade likelihood on the Fortune Global 500

Find out more in the Jupyter Notebook

References

  • Norris, J.R. (1997) Markov Chains. Cambridge Series in Statistical and Probabilistic Mathematics. Series Number 2. Cambridge University Press. 237p. ISBN: 9780511810633.
  • Privault, N. (2013) Understanding Markov Chains. Examples and Applications. Springer Undergraduate Mathematics Series. 354p. ISBN 978-981-4451-50-5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.