Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How should I represent a financial market as a graph?

  1. Mar 10, 2017 #1
    Hi guys.
    I am reading several papers about financial market and authors show the possibility to represent this market as a graph in which nodes correspond to traders and edges represent trading relationships.
    Which programming software could be a powerful tool to write a such code?
    I am curious about that (unfortunately I have not experience and I am not familiar with codes.
    I hope you can suggest me a software, an algorithm and/or whatever is helpful to understand and trying to replicate some of their works ( I would like to say "just for fun" though I don't guess I could call this a "fun" work...).

    Many thanks.
  2. jcsd
  3. Mar 10, 2017 #2


    Staff: Mentor

    Is this some sort of school project?

    I would suggest something like MATLAB or FreeMat could draw 2D/3D charts and do any computations needed.

    Its also possible that a spreadsheet program could do it too. I imagine you'd need to use a 3D type of chart.

    Or if you had some familiarity with javascript then D3 might be able to generate such a chart:


    It sems that you'll need to collect data on market activity and see how you could sketch one by hand so that you understand what you want to plot and then look into one of the software packages above.
  4. Mar 10, 2017 #3


    Staff: Mentor

    You are wildly unrealistic to hope to do a project like that if you don't have the background. A 4 year degree in computer science, is a guess of what you need to begin.
  5. Mar 10, 2017 #4
    Thank for your reply.
    I have used programming code like C, Mathematica and R in the last years, but I am not familiar with these ones. Not more, anyway. I will try to understand how I should work with these programmes in order to replicate a financial model as a graph (or small network), with nodes and edges. It is not easy, of course, but I will try to do that ;)
  6. Mar 10, 2017 #5


    User Avatar
    Science Advisor
    Gold Member
    2017 Award

    graphviz is a free utility that you can use for such diagrams. It is programmed using a language called "dot". See http://www.graphviz.org/Documentation/dotguide.pdf
    It doesn't require prior programming background. Several well-known documentation utilities, like doxygen, use it to make very complicated diagrams. I have used it, stand alone, to make simple diagrams. Simple diagrams are easy.
    If you are trying to automate generating the diagrams, I think that the syntax of dot would be fairly simple as long as you are satisfied with letting graphviz do most of the work of positioning the diagram elements.

    If you have money and are looking for a combination of graphics and calculations, MATLAB Simulink is a good option.
    Last edited: Mar 10, 2017
  7. Mar 10, 2017 #6
    I suggest looking at the data analytics and visualization software called Tableau, which doesn't require any coding.

    Edit: There's an open source alternative made by Eclipse called BIRT, but I haven't used it.
    Last edited: Mar 10, 2017
  8. Mar 15, 2017 #7
    Thank you for all your great advices!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted