\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Spazztaco} \pdfinfo{ /Title (coec-371.pdf) /Creator (Cheatography) /Author (Spazztaco) /Subject (Coec 371 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{A30000} \definecolor{LightBackground}{HTML}{FCF7F7} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Coec 371 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Spazztaco} via \textcolor{DarkBackground}{\uline{cheatography.com/95917/cs/20777/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Spazztaco \\ \uline{cheatography.com/spazztaco} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 15th October, 2019.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Formula}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Price of Longer Maturity Coupon Paying Bond} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{P = c/r*(1 - 1/(1+r)\textasciicircum{}t\textasciicircum{} ) + ParValue/(1+r)\textasciicircum{}t\textasciicircum{}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Price of Zero Coupon Bond} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{P = ParValue/(1+r)\textasciicircum{}t\textasciicircum{}} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Price of Short Maturity Coupon Paying Bond} \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{P = Coupon/(1+r)\textasciicircum{}t\textasciicircum{} + (ParValue+Coupon)/(1+r)\textasciicircum{}t\textasciicircum{}} \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Nominal Growth rate of Cash Flows} \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{i = \seqsplit{(1+GrowthRate)*(1+InflationRate)} - 1} \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Real Return Adjusted for Inflation} \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{r = (1+i)/(1+Inflation)} \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Present Value of Cash Flows} \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{PV = Cash * ((1+i)\textasciicircum{}t-1\textasciicircum{}/(1+DiscountRate)\textasciicircum{}t-1\textasciicircum{}+(1+i)\textasciicircum{}t\textasciicircum{}/(1+DiscountRate)\textasciicircum{}t\textasciicircum{} +...)} \tn % Row Count 13 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Computing YTM} \tn % Row Count 14 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Rates = Flat; Rates = YTM. \{\{nl\}\}\{\{nl\}\} Rates =/= Flat; Solve for Price, Swap Rates for Y and solve for Y} \tn % Row Count 17 (+ 3) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Discount Factors (D) for Zero Coupon Bonds} \tn % Row Count 18 (+ 1) % Row 15 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Price/100} \tn % Row Count 19 (+ 1) % Row 16 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Discount Factor (D) for Coupon Paying Bonds} \tn % Row Count 20 (+ 1) % Row 17 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Price = C*D{[}1{]} + (ParValue+C)D{[}2{]}} \tn % Row Count 21 (+ 1) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Calculation for Spot Rates Using Discount Factor} \tn % Row Count 22 (+ 1) % Row 19 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{r = (1/D)/\textasciicircum{}T\textasciicircum{} -1 \{\{nl\}\}\{\{nl\}\} For semiannual multiply answer by 2} \tn % Row Count 24 (+ 2) % Row 20 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Calculating Price with Discount Rates} \tn % Row Count 25 (+ 1) % Row 21 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{P = C*D{[}1{]} + C*D{[}2{]} + (ParValue+C)D{[}3{]} \{\{nl\}\}\{\{nl\}\} For semiannual C/2} \tn % Row Count 27 (+ 2) % Row 22 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Macaulay Definition} \tn % Row Count 28 (+ 1) % Row 23 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{D = (1+r)/r - \{{[}(1+r) + T(C-R){]} / (C{[}(1+r)\textasciicircum{}T\textasciicircum{} - 1{]} +r)\} \{\{nl\}\}\{\{nl\}\} Where R = Flat Rate Or YTM. \{\{nl\}\} When Semiannual r/2 and c/2, divide final answer by 2} \tn % Row Count 32 (+ 4) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Formula (cont)}} \tn % Row 24 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Modified Duration} \tn % Row Count 1 (+ 1) % Row 25 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{D*= D/1+r} \tn % Row Count 2 (+ 1) % Row 26 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Present Value of Liabilities} \tn % Row Count 3 (+ 1) % Row 27 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Liabilities * 1/(1+r)\textasciicircum{}T\textasciicircum{}} \tn % Row Count 4 (+ 1) % Row 28 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Compute Realized Returns} \tn % Row Count 5 (+ 1) % Row 29 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{( P{[}0{]} - P{[}-1{]} )/ P{[}-1{]}} \tn % Row Count 6 (+ 1) % Row 30 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Computing Expected Returns} \tn % Row Count 7 (+ 1) % Row 31 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{E(R) = (Probability * Return + ...)} \tn % Row Count 8 (+ 1) % Row 32 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Computing Standard Deviation} \tn % Row Count 9 (+ 1) % Row 33 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Sd(R) = Sqrt(Probability*(Return - E(R)\textasciicircum{}2\textasciicircum{} +...)} \tn % Row Count 10 (+ 1) % Row 34 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Effective Annual Rate (EAR)} \tn % Row Count 11 (+ 1) % Row 35 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{P{[}1{]}*(1+EAR)\textasciicircum{}T\textasciicircum{} = P{[}T{]}} \tn % Row Count 12 (+ 1) % Row 36 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Converting Monthly APR to Semiannual} \tn % Row Count 13 (+ 1) % Row 37 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{(1+APR/12)\textasciicircum{}6\textasciicircum{} -1} \tn % Row Count 14 (+ 1) % Row 38 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Calculating for Spot Rates using Price Formula} \tn % Row Count 15 (+ 1) % Row 39 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Price = ParValue/(1+r) then solve for r} \tn % Row Count 16 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Descriptive}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Constructing an Arbitage} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{e.g: \{\{nl\}\} Year 1 =\textgreater{} 100x{[}1{]} +5x{[}2{]} = 7 \{x{[}3{]}\} \{\{nl\}\} \{\{nl\}\}Year 2 =\textgreater{} 105x{[}2{]} = 107 \{x{[}3{]}\} \{\{nl\}\} \{\{nl\}\} Solve for x{[}1{]} and x{[}2{]}} \tn % Row Count 4 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Computing Realized Returns assuming Dividend Reinvesting} \tn % Row Count 6 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{e.g: \{\{nl\}\} Invest \$1000, 1000/Share Price = \# of Shares \{\{nl\}\} \{\{nl\}\} \# of Shares + {[}\# of Shares*DividendPayout{]}/NextSharePrice \{\{nl\}\} \{\{nl\}\} Repeat til end of Periods, compute the realized returns} \tn % Row Count 10 (+ 4) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Monthly Payment Questions} \tn % Row Count 11 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Owed Amount = c/r*{[}1-1/(1+r)\textasciicircum{}T\textasciicircum{}{]} \{\{nl\}\} \{\{nl\}\} Solve for C, Make sure T is in the right format (Monthly Payments, Yearly, Daily)} \tn % Row Count 14 (+ 3) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{What is your return if term structure remains flat and you hold for X years? \{\{nl\}\} TSR = Term Structure Rate} \tn % Row Count 17 (+ 3) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{(1+r)\textasciicircum{}T\textasciicircum{} = R/100 \{\{nl\}\} \{\{nl\}\} R = C*(1+TSR)\textasciicircum{}T-1\textasciicircum{} + C*(1+TSR)\textasciicircum{}T-2\textasciicircum{} +... ...+ C*(1+TSR)\textasciicircum{}1\textasciicircum{} + (ParValue + C) \{\{nl\}\}\{\{nl\}\} Plug in R to first equation then solve for small r} \tn % Row Count 21 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Simple Trading Model}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Expected Value of Stock} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{E(V) = P{[}h{]}*V{[}h{]} + P{[}l\}*V{[}l{]}} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Ask price so Market Maker breaks even} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{A = \{\{nl\}\} ( P{[}u{]}*P{[}l{]}*V{[}l{]} + P{[}h{]}*V{[}h{]} ) / ( P{[}u{]}*P{[}l{]}+ P{[}h\} )} \tn % Row Count 5 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Bid price so Market Maker breaks even} \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{B = \{\{nl\}\} ( P{[}l{]}*V{[}l{]} + P{[}u{]}*P{[}h{]}*V{[}h{]} ) / ( P{[}l{]} + P{[}u{]}*P{[}h{]}} \tn % Row Count 8 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Bid-Ask Spread} \tn % Row Count 9 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{s = A - B} \tn % Row Count 10 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Note}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Note: Spot Rates = Flat Term Rate. \newline % Row Count 1 (+ 1) And Equal to YTM if the rates are flat. \newline % Row Count 2 (+ 1) If not, YTM is found using the formula to your left.% Row Count 4 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}