## LaTeX forum ⇒ LyX ⇒ Cash Flow Timeline in LyX

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Ben85
Posts: 6
Joined: Tue Nov 02, 2010 2:39 pm

### Cash Flow Timeline in LyX

Hello all!
Thank you for a nice forum.

I had been doing some Finance lately which requires the use of timeline.
However, I still draw them in PPt og that like...

Hmm, so I hope you guys can help me out.

A timeline with cashflows, and the possibility to draw arrows to show pv, fv and so on.

WBR
Benjamin

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
Ben85 wrote:[…] A timeline with cashflows, and the possibility to draw arrows to show pv, fv and so on.[…]

Can you translate that into a common language so everybody who is not familiar with these acronyms can understand it? If I would talk about AES, MBE and XPS you wouldn't understand, too. And by the way it would be helpful if can give a visual example of such a time line.

Best regards and welcome to the board
Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Ben85
Posts: 6
Joined: Tue Nov 02, 2010 2:39 pm
Ofcourse, that was foolish of mé to assume that you knew.

And example look at http://www.calcblog.com/business-financ ... nuity-due/

So a cash flow timeline is an ordinary horisontal timeline that shows numbers at different time. Cash in or cash out.

The mission is with the interest to be able to compare allings over time, by calculating the value of the cash flow to the same point in time.

It is common to show by arrows which amounts that has ben discounted back in time or forth, by showing a bendes arror from that amount back to the relant time.

I hope Thisted cleared some.

Thank you.

Wbr Benjamin

d60pmp
Posts: 17
Joined: Wed Mar 09, 2011 1:54 pm
I don't know if there's any good software for doing specifically this, but for drawing simple diagrams there are MUCH better drawing programs than powerpoint!

I suggest Inkscape http://inkscape.org/, although it may be overkill for what you need.

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany
d60pmp wrote:I don't know if there's any good software for doing specifically this […]

Oh yes, there is. The pgf/tikZ package is doing a great job here (see attachment).
\documentclass{standalone}\usepackage{siunitx}\usepackage{tikz}\usetikzlibrary{calc,matrix} \sisetup{%   group-digits=true,   group-four-digits=true,   group-separator={,},   output-decimal-marker={.}} \begin{document}   \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)\$);   \end{tikzpicture}\end{document}

The only disfigurement is a misplaced equal sign in the equation system and I don't know why. I'm thinking about doing this in a different way but the matrix is easier for the arrow connections.

I'm sure this can be done similarly in PSTricks, but pgf/tikZ appeared easier to me. And since I don't use LyX, I have no idea how to incorporate this solution into a LyX document.
Attachments
The result of the given code.
financial-timeline.png (14.26 KiB) Viewed 5329 times
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Ben85
Posts: 6
Joined: Tue Nov 02, 2010 2:39 pm
Thank you for this solution!

Wbr Benjamin