![绘制具有连续股息的单期二项资产定价模型](https://linux22.com/image/475494/%E7%BB%98%E5%88%B6%E5%85%B7%E6%9C%89%E8%BF%9E%E7%BB%AD%E8%82%A1%E6%81%AF%E7%9A%84%E5%8D%95%E6%9C%9F%E4%BA%8C%E9%A1%B9%E8%B5%84%E4%BA%A7%E5%AE%9A%E4%BB%B7%E6%A8%A1%E5%9E%8B.png)
\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[column sep=3cm, row sep=0mm, arrows={-Stealth}, cells={nodes={fill, circle, minimum size=3.5pt, inner sep=0pt, font=\small}}]
& |["S_0u" above, "f_u" below]|&\\
|["S_0" above left, "f" below left]|\arrow[ur,"(P)" above left]\arrow[dr,"(1-p)" below left] \\
& |["S_0d" above, "f_d" below]|&\\
\end{tikzcd}
\end{document}
然而,我确实想通过放置第二个节点来重新创建下面的图像,你能帮帮我吗?
答案1
由于您没有提供节点的内容,我不知道什么是下标,什么不是(我想这是图表的失败)。但无论如何,我会使用forest
,但还有其他选择。当然tikz-cd
是其中之一。
\documentclass[tikz,border=5pt]{standalone}
% ateb: https://tex.stackexchange.com/a/715128/
\usepackage{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
for tree={math content,grow'=0},
before typesetting nodes={
for tree={
circle,
inner sep=1.5pt,
s sep'+=20pt,
fill,
if level=0{% the root node
label/.process={Ow{content}{left:$#1$}},
l sep*=6,
}
{label/.process={Ow{content}{right:$#1$}}},
delay={content={}},
},
},
[S_{0}
[uS_{0},grow'=-90, edge label={node [above,midway,sloped]{$p$}}
[{S_{1(u)}=uS_{0(1-\delta)}}]
]
[dS_{0},grow'=-90, edge label={node [below,sloped,midway] {$1-p$}}
[{S_{1(d)}=dS_{0(1-\delta)}}]
]
]
\coordinate [label=below:$t_0$] (a) at ([yshift=-15pt]current bounding box.south -| !r.center);
\coordinate [label=below:$t_1$] (b) at (a -| {!r11.center});
\draw [Bar-Bar] (a) -- (b);
\end{forest}
\end{document}
[这是代表 EAFI 发布的公共服务公告。此帖子中的图像无法存在是由于 X 上的 Okular 24 中存在错误。]