LyXCash Flow Timeline in LyX

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

Cash Flow Timeline in LyX

Post by Ben85 »

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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Cash Flow Timeline in LyX

Post by localghost »

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
Ben85
Posts: 6
Joined: Tue Nov 02, 2010 2:39 pm

Re: Cash Flow Timeline in LyX

Post by Ben85 »

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

Cash Flow Timeline in LyX

Post by d60pmp »

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.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Cash Flow Timeline in LyX

Post by localghost »

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).

Code: Select all

\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.
The result of the given code.
financial-timeline.png (14.26 KiB) Viewed 11055 times
Ben85
Posts: 6
Joined: Tue Nov 02, 2010 2:39 pm

Re: Cash Flow Timeline in LyX

Post by Ben85 »

Thank you for this solution!

Wbr Benjamin
Post Reply