Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LaTeX style file providing symbols and other notation for actuarial, financial and statistical uses
% \iffalse meta-comment -*- latex -*-
%
% actuarial.dtx. Provides for symbols and other notation for actuarial,
% financial and statistical uses.
%
%% Copyright (C) Kelvin Mo 1999, 2000
%%
%%
% Reference: Bowers L et al, Actuarial Mathematics, Appendix 4
% \fi
%% \CheckSum{134}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%% Digits \0\1\2\3\4\5\6\7\8\9
%% Exclamation \! Double quote \" Hash (number) \#
%% Dollar \$ Percent \% Ampersand \&
%% Acute accent \' Left paren \( Right paren \)
%% Asterisk \* Plus \+ Comma \,
%% Minus \- Point \. Solidus \/
%% Colon \: Semicolon \; Less than \<
%% Equals \= Greater than \> Question mark \?
%% Commercial at \@ Left bracket \[ Backslash \\
%% Right bracket \] Circumflex \^ Underscore \_
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
% \changes{0.3}{2000/03/01}{Initial stable release}
% \changes{0.4}{2000/06/01}{Included documentation}
% \MakeShortVerb{\|}
% \newcommand{\actuarial}{\texttt{actuarial}}
% \newcommand{\AmS}{\leavevmode\hbox{$\mathcal A\kern-0.2em\lower.376ex^^A
% \hbox{$\mathcal M$}\kern-0.2em\mathcal S$}}
% \GetFileInfo{actuarial.sty}
% \title{The \actuarial{} package}
% \author{Kelvin Mo}
% \date{\filedate (\fileversion)}
% \maketitle
% \begin{abstract}
% This package provides macros that aid in production of notation commonly
% used in actuarial science. It supports the International
% Actuarial Notation, along with other symbols in finance and statistics
% \end{abstract}
% \section{Using the \actuarial{} package}
% The user interface to the \actuarial{} package is very simple---
% just include |\usepackage{actuarial}| in the premable of your document.
% There are no options available for this package.
%
% Note, however, this package requires \AmS-\LaTeX, or more specifically, the
% \texttt{amsmath} package. If \AmS-\LaTeX is loaded automatically by
% the \actuarial{} package when required.
% \section{The Macros}
% \subsection{Statistical Operators}
% \DescribeMacro\Var \DescribeMacro\Cov
% Instead of using |\text{Var}| and |\text{Cov}| repeatedly to typeset the
% variance and covariance operators, the two macros |\Var| and |\Cov| are
% used.
% \subsection{Probability}
% \DescribeMacro\random
% In probability theory, random variables are generally denoted as uppercase
% roman characters, like $X$. However, when actuarial quantities are modelled
% as random variables, the International Actuarial Notation prevents this
% convention from being used. The |\random{|\meta{text}|}| macro is used to
% denote that \meta{text} is a random variable.
%
% \textbf{This macro is currently not implemented, i.e.~it does not do
% anything.} However, in future versions, this may be implemented.
% \subsection{Spreadsheet Documentation}
% \DescribeMacro\place
% The macro |\place{|\meta{text}|}| typesets \meta{text} as a metasyntatic
% variable used in spreadsheet documentation. As an example |\place{Price}|
% produces $\langle$Price$\rangle$.
% \subsection{International Actuarial Notation}
% The main pupose of the \actuarial{} package is to typeset International
% Actuarial Notation. Thus most of the macros in this package will be
% described here.
%
% The IAN macros are grouped into sections, which are adapted from appendix~4
% of Bowers.\footnote{N.~L.~Bowers and others, \emph{Actuarial Mathematics},
% 2nd.~ed (Society of Actuaries, 1997).}
% \subsubsection*{Section II: Lower Space to the Right}
% \DescribeMacro\certain\DescribeMacro\eventorder\DescribeMacro\eventgroup
% These macros affect the subscript symbols to the right of the main symbol.
% |\certain{|\meta{text}|}| implements the term certain (``angle'') symbol
% over \meta{text}. |\eventorder{|\meta{num}|}{|\meta{text}|}| places
% \meta{num} above the status \meta{text} to indicate the order of the status
% to fail. (There is currently no provision to place the numerals below the
% status, but that may happen in the future.) |\eventgroup{|\meta{text}|}|
% places a wide hat above \meta{text} to group joint statuses. This is
% currently not the correct implementation of the IAN.
% \subsubsection*{Sections III and VI: Spaces to the Left}
% \DescribeMacro\ian
% |\ian{|\meta{left}|}{|\meta{centre}|}{|\meta{right}|}| types the generic
% IAN symbol. Thus the probability of a life aged $x$ surviving $n$ years
% is typeset |\ian{_n}{p}{_x}|.
% \subsubsection*{Section IV: Top}
% \DescribeMacro\complete
% |\complete{|\meta{text}|}| places a circle over the symbol, to indicate
% completeness.
% \StopEventually{
% \section{Bugs}
% \begin{itemize}
% \item Random variables not implemented
% \item Status groups not implemented correctly (wide hat)
% \item Vertical alignment of the sections III and VI not implemented correctly
% \item |eventorder| affects vertical alignment
% \end{itemize}
% }
% \section{Implementation}
% \begin{macrocode}
%<*driver>
\documentclass[a4paper]{ltxdoc}
\DisableCrossrefs
\RecordChanges
\setlength\hfuzz{15pt}
\hbadness=7000
\begin{document}
\DocInput{actuarial.dtx}
\end{document}
%</driver>
\ProvidesPackage{actuarial}[2000/06/01 v0.4 Actuarial,
Financial, Statistical Notation]
\NeedsTeXFormat{LaTeX2e}
\RequirePackage[tbtags]{amsmath}
\newdimen\completeht
%% Statistical operators
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
%% Probability
%\def\random#1{\mathrel{\mathop{#1}\limits_{\char126}}}
%% NOT IMPLEMENTED YET
\def\random#1{#1}
%% Spreadsheet Documentation
\def\place#1{\ensuremath{\langle\text{#1}\rangle}}
%%International Actuarial Notation
%% Section II
\def\certain#1{%
\setbox0=\vbox{\ensuremath{#1\mathstrut\,}}
%\completeht=\ht0\advance\completeht-0.325ex%
\completeht=0.9\ht0%
\overline{\ensuremath{#1\mathstrut\,}}\kern-.04em\vrule height\completeht\kern.25em}
%\def\eventorder#1#2{\mathrel{\mathop{#2}\limits^{#1}}}
\def\eventorder#1#2{%
\setbox0=\vbox{\ensuremath{#2}%
\hbox to\ht0{}\ensuremath{\mathrel{\mathop{#2}\limits^{#1}}}%
}
\def\eventgroup#1{\widehat{#1}}
%% Sections III and VI
\def\ian#1#2#3{\kern0.25em{}#1#2#3}
%\def\ian#1#2#3{\@mathmeasure\z@\displaystyle{#2}%
%\global\setbox\@ne\vbox to\ht\z@{}\dp\@ne\dp\z@
%\setbox\tw@\box\@ne
%\@mathmeasure4\displaystyle{\copy\tw@#1}%
%\@mathmeasure6\displaystyle{#2#3}%
%\dimen@-\wd6 \advance\dimen@\wd4 \advance\dimen@\wd\z@
%\hbox to\dimen@{}\mathop{\kern-\dimen@\box4\box6}}
%% Section IV
\def\complete#1{\leavevmode\setbox0=\hbox{\ensuremath{#1}}\dimen0=\ht0%
\advance\dimen0 by-1ex \rlap{\raise-.67\dimen0\hbox to\wd0{\hss\char'27\hss}}%
\box0{}}
%% Fancy strutting
\def\vp#1{\vphantom{#1}}
%% Deprecated symbols
\def\dnd#1#2#3{\ian{_#1}{#2}{_#3}}
\def\und#1#2#3{\ian{^#1}{#2}{_#3}}
\let\circover=\complete
%% Set up hyphenation (if necessary)
\hyphenation{}
% \end{macrocode}
% \Finale
%%
%% This file will generate fast loadable files and documentation
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
%%
%% --------------- start of docstrip commands ------------------
%%
\input docstrip.tex % ignored in distribution
\preamble
This is a generated file.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
\endpreamble
\keepsilent
\usedir{tex/latex/actuarial}
\generateFile{actuarial.sty}{t}{\from{actuarial.dtx}{package}}
\Msg{***********************************************************}
\Msg{\space}
\Msg{To finish the installation you have to move the following}
\Msg{file into a directory searched by TeX:}
\Msg{\space}
\Msg{\space\space actuarial.sty}
\Msg{\space}
\Msg{To produce the documentation run `actuarial.dtx' through LaTeX.}
\Msg{\space}
\Msg{***********************************************************}
\endinput
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment