我在开头添加了下面的代码来绘制一些流程图。但是很奇怪,tex 文件可以在一台电脑上运行,但不能在另一台电脑上运行。出现错误enter file name:
。有人知道为什么吗?
\documentclass[12pt]{article}
\usepackage{}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{mathrsfs,calrsfs}
\usepackage{pb-diagram}
\usepackage{epstopdf}
\usepackage{CJK}
\usepackage{bbm}
\usepackage[shortlabels]{enumitem}
\usepackage{multirow}
\usepackage{mathrsfs}
\usepackage[mathscr]{eucal}
\usepackage{epsfig,epsf,epic}
\usepackage{pdfsync}
\usepackage[all,cmtip]{xy}
\usepackage{extarrows}
%\usepackage{enumerate}
\usepackage{chngpage}
\usepackage{array}
\usepackage{titletoc}
\usepackage{graphicx}
\usepackage{fancyhdr}
\usepackage{verbatim}
\usepackage{amsthm}
%for flowchart
\usepackage{tikz}
\usetikzlibrary{arrows.meta, positioning}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{shapes.geometric, arrows,calc,decorations.markings}
\tikzset{
process/.style={
text width=2.5cm, draw,
minimum height=1.6cm,
text centered,
},
process1/.style={
text width=2.5cm, draw,
minimum height=0.8cm,
text centered,
},
description/.style={
text centered,
text width=10cm,
},
myarrow/.style={
postaction={
decorate, decoration={
markings,mark=at position #1 with {\arrow{Stealth};
}
}
}
},
}
\usepackage{setspace}
\usepackage{etoolbox}
\AtBeginEnvironment{tikzpicture}{\singlespacing}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{prop}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{note}[theorem]{Note}
\newtheorem{hint}[theorem]{Hint}
\newcommand{\st}{\textrm{s.t}}
\newcommand{\dd}{\emph{d}}
\newcommand{\Var}{\emph{Var}}
\newcommand{\nty}{n\rightarrow\infty}
\newcommand{\tr}{\textrm{\textbf{tr}}}
\newcommand{\BM}{Brownian motion}
\newcommand{\dt}{\textrm{d}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\EH}{\widehat{\mathbb{E}}}
\newcommand{\II}{\mathbb{I}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\ITO}{It\^{o} integral}
\newcommand{\limn}{\lim\limits_{n\rightarrow \infty}}
\newcommand{\intt}{\int_0^t}
\newcommand{\ip}{It\^{o} process}
\newcommand{\dr}{\textrm{d}}
\newcommand{\PS}{\widetilde{\mathbb{P}}}
\newcommand{\ES}{\widetilde{\mathbb{E}}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\WS}{\widetilde{W}}
\newcommand{\WH}{\widehat{W}}
\newcommand{\MH}{\widehat{M}}
\newcommand{\eTt}{e^{-r(T-t)}}
\newcommand{\fa}{\textrm{for all}}
\newcommand{\vlx}{v_{L_*}(x)}
\newcommand{\tls}{\tau_{L_*}}
\newcommand{\pa}{\partial}
\newcommand{\pap}{perpetual American put}
\newcommand{\vl}{\pmb |}
\newcommand{\num}{num\'{e}raire}
\newcommand{\fors}{\textrm{For}_S(t,T)}
\newcommand{\btau}{\bar{\tau}}
\newcommand{\Btt}{B(t,T)}
\newcommand{\et}{e^{-\lambda t}}
\newcommand{\ert}{e^{-rt}}
\newcommand{\ol}{\dfrac{1}{\lambda}}
\newcommand{\pp}{Possion process}
\newcommand{\kk}{k=0,1,\ldots}
\newcommand{\var}{\textrm{Var}}
\newcommand{\Nt}{$N(t)$ be a \pp\ with intensity $\lambda>0$}
\newcommand{\cpp}{compound Poisson process}
\newcommand{\sumN}{\sum\limits_{i=1}^{N(t)}}
\newcommand{\stime}{0=t_0<t_1<\cdots<t_n}
\newcommand{\mgf}{moment-generating function}
\newcommand{\rc}{right-continuous}
\newcommand{\lc}{left-continuous}
\newcommand{\sumst}{\sum\limits_{0<s\leq t}}
\newcommand{\ls}{\widetilde{\lambda}}
\newcommand{\MS}{\widetilde{M}}
\newcommand{\ps}{\widetilde{p}}
\newcommand{\fs}{\widetilde{f}}
\newcommand{\N}{\textbf{\textrm{N}}}
\newcommand{\imvol}{\sigma_{\textrm{imp}}}
\begin{document}{\allowdisplaybreaks[4]}
\begin{itemize}
\item \textbf{Par Asset Swap}\label{asset swap}
At initiation there is a cash flow $100-P$(seller). The exchanges take place regardless of whether the bond defaults.
At initiation Asset Swap buyer purchases bond worth full price $P$ in return for par
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Default\\ protection\\ seller};
\node[process, right=12em of p1] (p2) {Default\\ protection\\ buyer};
%\draw[-Stealth] ([yshift=8ex, xshift=-7ex]p1.east) -- node[description, above] {90 basis points per year} ([yshift=8ex, xshift=7ex]p2.west);
\draw[-Stealth, line width=1pt] ([yshift=-8ex, xshift=8ex]p2.west) -- node[description, above] {100} ([yshift=-8ex, xshift=-8ex]p1.east);
\draw [-Stealth, line width=1pt]([yshift= 8ex,xshift=-0.7ex]$(p1)$) --node[midway] (Rect){}([yshift=8ex,xshift=-0.7ex]$(p2)$);
\draw[fill=white] ($(Rect)+(-1.5,-0.7)$)rectangle($(Rect)+(1.5,0.7)$) node[midway] (Text){};
\node at (Text) {\begin{minipage}{3cm}\centering
Bond\\ worth P
\end{minipage}};
\end{tikzpicture}
\end{center}
and enters into an interest rate swap paying a fixed coupon of $C$ in return for LIBOR plus asset swap spread $S$
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Asset Swap\\ Seller};
\node[process, right=12em of p1] (p2) {Asset Swap\\ Buyer};
\node[process1, right=3em of p2] (p3) {Bond};
\draw[-Stealth] ([yshift=2ex]p2.west) -- node[description, above] {C} ([yshift=2ex]p1.east);
\draw[-Stealth] ([yshift=-2ex]p1.east) -- node[description, below] {LIBOR + S} ([yshift=-2ex]p2.west);
\draw[-Stealth] (p3.west) -- node[description, below] {C} (p2.east);
\draw[dashed] ($(p1)+(-1.8,-1)$)rectangle($(p2)+(1.8,1)$);
\end{tikzpicture}
\end{center}
If default occurs the asset swap buyer loses the coupon and principal redemption on the bond, \emph{so the spread $S$ is compensation for the default of bond}. The interest rate swap will continue until bond maturity or can be closed out at market value.
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Asset Swap\\ Seller};
\node[process, right=12em of p1] (p2) {Asset Swap\\ Buyer};
\node[process1, right=3em of p2] (p3) {Bond};
\draw[-Stealth] ([yshift=2ex]p2.west) -- node[description, above] {C} ([yshift=2ex]p1.east);
\draw[-Stealth] ([yshift=-2ex]p1.east) -- node[description, below] {LIBOR + S} ([yshift=-2ex]p2.west);
\draw[-Stealth] (p3.west) -- node[description, below] {C} (p2.east);
\draw[dashed] ($(p1)+(-1.8,-1)$)rectangle($(p2)+(1.8,1)$);
\draw[ultra thick] ($(p3)+(-1.7,-0.8)$)--($(p3)+(1.7,0.8)$);
\draw[ultra thick] ($(p3)+(-1.7,0.8)$)--($(p3)+(1.7,-0.8)$);
\end{tikzpicture}
\end{center}
\item \textbf{Market Asset Swap}
At the beginning, there is no cash flow, but at the maturity, there is an exchange of par for the original price of the bond $100-P$(seller). The notional of the LIBOR leg(seller) is then scaled by the full price $P.$
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Default\\ protection\\ seller};
\node[process, right=12em of p1] (p2) {Default\\ protection\\ buyer};
%\draw[-Stealth] ([yshift=8ex, xshift=-7ex]p1.east) -- node[description, above] {90 basis points per year} ([yshift=8ex, xshift=7ex]p2.west);
\draw[-Stealth, line width=1pt] ([yshift=-8ex, xshift=8ex]p2.west) -- node[description, above] {P} ([yshift=-8ex, xshift=-8ex]p1.east);
\draw [-Stealth, line width=1pt]([yshift= 8ex,xshift=-0.7ex]$(p1)$) --node[midway] (Rect){}([yshift=8ex,xshift=-0.7ex]$(p2)$);
\draw[fill=white] ($(Rect)+(-1.5,-0.7)$)rectangle($(Rect)+(1.5,0.7)$) node[midway] (Text){};
\node at (Text) {\begin{minipage}{3cm}\centering
Bond\\ worth P
\end{minipage}};
\end{tikzpicture}
\begin{tikzpicture}
\node[process] (p1) {Asset Swap\\ Seller};
\node[process, right=12em of p1] (p2) {Asset Swap\\ Buyer};
\node[process1, right=3em of p2] (p3) {Bond};
\draw[-Stealth] ([yshift=2ex]p2.west) -- node[description, above] {C} ([yshift=2ex]p1.east);
\draw[-Stealth] ([yshift=-2ex]p1.east) -- node[description, below] {Libor + S on notional P} ([yshift=-2ex]p2.west);
\draw[-Stealth] (p3.west) -- node[description, below] {C} (p2.east);
\draw[dashed] ($(p1)+(-1.8,-1)$)rectangle($(p2)+(1.8,1)$);
\end{tikzpicture}
\end{center}
At maturity there is an exchange of
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Asset Swap\\ Seller};
\node[process, right=12em of p1] (p2) {Asset Swap\\ Buyer};
\draw[-Stealth] ([yshift=2ex]p2.west) -- node[description, above] {100} ([yshift=2ex]p1.east);
\draw[-Stealth] ([yshift=-2ex]p1.east) -- node[description, below] {P} ([yshift=-2ex]p2.west);
\end{tikzpicture}
\end{center}
\emph{The final swap just gives back return. In the Par asset swap since bond = 100 at final, there is no cash flow. }
\item \textbf{CDS(Credit Default Swap)}
\begin{center}
\begin{tikzpicture}
\node[process] (p1) {Default\\ protection\\ buyer};
\node[process, right=16em of p1] (p2) {Default\\ protection\\ seller};
\draw[myarrow=.9] ([yshift=2ex]p1.east) -- node[description, above] {90 basis points per year} ([yshift=2ex]p2.west);
\draw[myarrow=.9] ([yshift=-2ex]p2.west) -- node[description, below] {Payment if default by\\ reference entity} ([yshift=-2ex]p1.east);
\end{tikzpicture}
\end{center}
\end{itemize}
\end{document}