Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I often have to generate cashflow diagrams.

I was wondering if anyone has a good tool to generate them in either $\LaTeX$ or a picture?

share|improve this question

I found a nice example on this page using the pgf/tikZ package for $\LaTeX$.

The website is giving the code for $\LaTeX$, if you are using LyX, in order to get the same sample than the website you have to do the following. First edit the document preamble using Document->Settings:


and then the following in a code block:

 \begin{tikzpicture}[>=stealth,ultra thick]
    \draw[->] (0,0) -- (10,0);
    \draw (-1,0) node[below] {n} (-1,0.5) node[above] {PMT};
    \foreach \x/\n in {1/0,3/1,5/2,7/3,9/4}
      \draw (\x,0) node(\n)[below] {\n} -- (\x,0.5);
    \foreach \x/\n in {1/0,3/1,5/2,7/3}
      \draw (\x,0.5) node[above] {\num{5000}};
    \matrix (calc) [matrix of math nodes,matrix anchor=north west,nodes={anchor=east}] at (9,-1) {%
      \$ \num{5300.00} & = & \num{5000}\times (\num{1.06})^1 \\
      \$ \num{5618.00} & = & \num{5000}\times (\num{1.06})^2 \\
      \$ \num{5955.08} & = & \num{5000}\times (\num{1.06})^3 \\
      \$ \num{6312.38} & = & \num{5000}\times (\num{1.06})^4 \\
      \$ \num{23185.46} \\
    \draw[thick] (calc-5-1.north west) -- (calc-5-1.north east);
    \foreach \n/\l in {0/4,1/3,2/2,3/1}
      \draw[->,gray!50] (\n) |- ($(calc-\l-1.west)+(-0.5,0)$);
share|improve this answer
Why do you think this requires LyX? – chrisaycock Apr 16 '13 at 12:50
It does not, I just gave the steps to use it with LyX, will edit to clarify. I put the steps for $LyX$ because I know many people who are not familiar with working directly with $\LaTeX$ files. – BlueTrin Apr 16 '13 at 12:51

Aside from TikZ approach that you've found, these scripting languages would work:

  • MetaPost
  • PSTricks
  • Asymptote
  • MATLAB, see cfplot
  • Mathematica, see Cashflow

Vector graphics are most suitable for the task, so if you prefer GUI point-and-click:

  • Adobe Illustrator
  • CorelDRAW
  • Inkscape (free)
share|improve this answer
Beyond a list of software packages, can you give examples of how someone would create the plots? Like are there some MetaPost commands the OP could copy and paste? – chrisaycock Apr 17 '13 at 2:09
Yes I could, but it appears from his question that he asked for a good tool, not specific commands. – madilyn Apr 17 '13 at 18:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.