I saw a lot of examples on tex.exchange.com about how to construct a 2-period or 3-period binomialtree in latex. I tried to modify these examples to construct a generel n-period binomialtree, but it didn't work. What I'm looking for is something like this:
Any help is appreciated. Thanks in advance.
I tried the edit the following code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{matrix}
\begin{document}
\begin{tikzpicture}[>=stealth,sloped]
\matrix (tree) [%
matrix of nodes,
minimum size=1cm,
column sep=3.5cm,
row sep=1cm,
]
{
& & F \\
& C & \\
\$A & & E \\
& B & \\
& & D \\
};
\draw[->] (tree-3-1) -- (tree-2-2) node [midway,above] {$P$};
\draw[->] (tree-3-1) -- (tree-4-2) node [midway,below] {$(1-p)$};
\draw[->] (tree-2-2) -- (tree-1-3) node [midway,above] {$P^2$};
\draw[->] (tree-2-2) -- (tree-3-3) node [midway,below] {$(1-p)p$};
\draw[->] (tree-4-2) -- (tree-3-3) node [midway,above] {$(1-p)p$};
\draw[->] (tree-4-2) -- (tree-5-3) node [midway,below] {$(1-p)^2$};
\end{tikzpicture}
\end{document}
I got compile errors when I modify it. So this is what I have. I have troubles editing the "->" to dots.
