\ProvidesPackage{iaw}[2011/09/09]

\usepackage{setspace}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{colornames}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{ifpdf}
\ifpdf{}\else\PackageError{iaw}{%
  You should be using pdflatex and not latex}{%
  You can ignore this error message, but at your own risk!
  The old LaTeX is definitely outdated by now, and could cause
  all sorts of weird interactions.}
\fi

\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
\usepackage{berasans}
\RequirePackage{charter} 
\RequirePackage[mdbch,ttscaled=true]{mathdesign} 
\usepackage{microtype}

\usepackage{array}  % gives newcolumntype
\def\GobbleColumnStart{\setbox0\hbox\bgroup}
\let\GobbleColumnStop\egroup
\newcolumntype{n}{@{}>{\GobbleColumnStart}c<{\GobbleColumnStop}}    % n means nothing
%\newcommand{\usermacro}[1]{}
%\usepackage{collcell}
%\newcolumntype{n}{>{\collectcell\usermacro}c<{\endcollectcell}}
\newcolumntype{S}{!{\qquad}}
\newcolumntype{s}{!{$\;\;$}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Have warning messages come with line numbers
\def\@warning#1{\typeout{LaTeX Warning [wl.\the\inputlineno]: #1.}}
\def\@error#1{\typeout{LaTeX Error [el.\the\inputlineno]: #1.}}

%%----------------------------------------------------------------------

% see diagram in Kopka+Daly, p35.
\setlength{\topmargin}{-0.5in} % will be changed below
\setlength{\textheight}{8.6in}
\setlength{\textwidth}{6.2in}
\setlength{\oddsidemargin}{0in}
\setlength{\evensidemargin}{0in}
\setlength{\parskip}{2mm}
                                % Good Values for baselinestretch (goosens, mittelbach, page 53):
                                %     10pt=1.25/1.67,  11pt=1.21/1.62,  12pt=1.24/1.66
                                %\renewcommand{\baselinestretch}{1.21} % not a good idea to use with setspace
\setstretch{1.2} 

\widowpenalty=200000                %/*150*/ No Widows at top of page
\displaywidowpenalty=20000       %/*50*/
\clubpenalty=100000               % this is really orphanpenalty.  No orphans at bottom of page

% 
 \def\sloppybottom{%
   \def\@textbottom{\vskip \z@ \@plus.0001fil \@minus .99\topskip}%
   \topskip=1\topskip \@plus10\p@\@minus.99\topskip
   \def\@texttop{\vskip \z@ \@plus-10\p@\@minus-.99\topskip}% negate flex in \topskip
 }

%%%% please note that the \sloppybottom command can insert empty pages 

% Page 181f in Kopka+Daly has a whole set of float definitions that can be useful
\setcounter{topnumber}{4}             % maximum number of floats on a page top
\setcounter{totalnumber}{10}          % maximum number of floats anywhere
\renewcommand{\floatpagefraction}{.75}
\renewcommand{\dblfloatpagefraction}{.75}
                                % Most of the styles don't allow floats to be placed at place `h'ere.
                                % You can allow it if you use [h] or you override the settings withL
\renewcommand{\fps@figure}{htbp}
\renewcommand{\fps@table}{htbp}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{needspace}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\realcenterline}[1]{%
  \begin{center}{\qquad\makebox[0mm]{#1}}\end{center}} % for debugging, change makebox to framebox

\newsavebox{\realcenterbox}
\newenvironment{realcenter}{%
  \begin{lrbox}{\realcenterbox}}%
  {\end{lrbox}%
  % should check if realcenterbox is wider than text.  if not, use begin{center}, otherwise use begin{realcenter}
  \realcenterline{{\usebox{\realcenterbox}}}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newenvironment{ctabular}{\begin{realcenter}\begin{tabular}}{\end{tabular}\end{realcenter}}

\makeatletter

\newcommand{\fixrunningparagraphstretch}[1]{
  \skip@=\baselineskip
  #1%
  \baselineskip=\skip@
}

\makeatother

\newenvironment{basectabular}[1]{%
  \fixrunningparagraphstretch{#1}
  \vspace{0.5\baselineskip}
  \ctabular
}{\endctabular\ignorespacesafterend\vspace{0.75\baselineskip}}
 

\newenvironment{fctabular}{%
  \begin{basectabular}{\footnotesize}
  }%
  {%
  \end{basectabular}
}

\newenvironment{smctabular}{%
  \begin{basectabular}{\small}
  }%
  {%
  \end{basectabular}
}

\newenvironment{scctabular}{%
  \begin{basectabular}{\scriptsize}
  }%
  {%
  \end{basectabular}
}



\newcommand{\mc}{\multicolumn}
\newlength{\lenofstar}
\newcommand{\osp}{$^{\star}$}
\newcommand{\ds}{\osp\osp}
\newcommand{\os}{\osp\settowidth{\lenofstar}{\osp}\hspace*{\lenofstar}}
\newcommand{\ns}{\settowidth{\lenofstar}{\osp}\hspace*{\lenofstar}\hspace*{\lenofstar}}
%\newcommand{\mspc}[1]{\rule[#1]{0cm}{#1}}

\providecommand{\nothing}[1]{}


\providecommand{\mailto}[1]{{\href{mailto:#1}{#1}}}

%\usepackage[hang,labelfont=bf,position=top]{caption}



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\sfix}[1]{{\typeout{SFIX on Page \thepage!}\setlength{\fboxrule}{1pt}\fcolorbox{black}{yellow}{{#1}}} }
\newcommand{\fix}[1]{\typeout{FIX on Page \thepage!} \standout{#1} }
\newcommand{\standout}[1]{ {
    \renewcommand{\baselinestretch}{1.0} \normalsize \footnotesize
    \begin{realcenter}
      \setlength{\fboxrule}{3pt}%
      \fcolorbox{black}{yellow}{
          \begin{minipage}{0.8\textwidth}
            {\bf \footnotesize #1}
          \end{minipage}
        }
    \end{realcenter}
    } }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\providecommand{\nothing}[1]{}
\newsavebox{\nothingbox}
\newenvironment{Nothing}{%
  \begin{lrbox}{\nothingbox}%
    \begin{minipage}{.9\linewidth}}%
    {\end{minipage}%
  \end{lrbox}}%



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% math definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
%\newenvironment{proof}{{\bf \noindent Proof:\/} \em}{ {\bf q.e.d.} }
\newcommand{\delayedproof}{{\bf \noindent Proof:\/} {\em See the Appendix.}}
\newcommand{\point}[1]{\begin{itemize} \item #1 \end{itemize}}
                                % Small Separator Line
\newcommand{\horizline}{\begin{picture}(400,9)(0,0)     % 72*6, 72*0.1
    \put(144,5){\line(1,0){144}}    % 72*2=144
  \end{picture}%
  }

\thickmuskip=7.5mu plus 5mu  % this applies to inequality, etc.

\newcommand{\angledline}[3][0.3pt]{\begin{rotate}{#2}\rule{#3\unitlength}{#1}\end{rotate}}  % 0.8pt is thickline

\def\nfrac#1/#2{\ensuremath{\leavevmode
  \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}%
  \kern-.1em $/$%
  \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}}}% use as: \nfrac 3/2
\newcommand{\nicefrac}[2]{%
  \ensuremath{\raisebox{1mm}{$#1$}/\raisebox{-1mm}{$#2$}}} % in equation, no parens necessary
\providecommand{\ff}[2]{%
  \ensuremath{\raisebox{0.3ex}{\footnotesize #1}\hspace*{-0.1em}/\hspace*{-0.1em}\raisebox{-0.3ex}{\footnotesize #2}}}


\newcommand{\combo}[2]{
  \typeout{Sorry, use amsmath with binom instead of combo}
  \text{USE BINOM(#1)(#2)}
  \latexerror{Sorry, use amsmath with binom instead of combo}
}

\newcommand{\verylongrightarrow}[1]{\hbox to #1cm{\rightarrowfill}}
                                % this allows \verylongrightarrow{5} to get a 5 cm arrow

\newcommand{\Sum}{\displaystyle \sum}
\newcommand{\be}{\begin{equation}}
  \newcommand{\ee}{\end{equation}}

\usepackage{eqtabular}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% sections and headings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\makeatletter

\newcommand{\makeruninheadings}{
  \renewcommand{\subsubsection}{\@startsection
    {subsubsection}%
    {3}%
    {0em}%the indent
    {0.5\baselineskip}%
    {-\fontdimen2\font
      plus -\fontdimen3\font
      minus -\fontdimen4\font}%
    {\normalfont\bfseries\scshape}}%
  \setcounter{secnumdepth}{2}
  }

\makeatother

\newcommand{\header}[1]{ \needspace{6cm} \begin{realcenter} {\LARGE \textsc{#1}} \end{realcenter}}
\newcommand{\subheader}[1]{\needspace{4cm} {\begin{realcenter} {\normalsize \textbf{\textsc{#1}}} \end{realcenter}}}

                                % Journal of Finance Convention
\renewcommand{\thesection}{\Roman{section}}
\renewcommand{\thesubsection}{\Alph{subsection}}

\def\ivominsectspace{0.4}
\def\ivominsubsectspace{0.2}

\let\origsectionivo\section
\renewcommand{\section}{\needspace{\ivominsectspace\textheight}\origsectionivo}
\let\origsubsectionivo\subsection
\renewcommand{\subsection}{\needspace{\ivominsubsectspace\textheight}\origsubsectionivo}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\nfootnote}[1]{%
  {\renewcommand{\baselinestretch}{1.0}\footnote{#1}\renewcommand{\baselinestretch}{1.4}}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{calc}
\newcounter{hours} \newcounter{oneminutes} \newcounter{tenminutes} \newcounter{rawtime}
\newcommand{\printtime}{\setcounter{rawtime}{\time}\setcounter{hours}{\time/60}%
  \setcounter{tenminutes}{(\time-\value{hours}*60)/10}%
  \setcounter{oneminutes}{(\time-\value{hours}*60-\value{tenminutes}*10)}%
  \thehours:\thetenminutes\theoneminutes h}

                                % \def\today{\ifcase\month\or
                                %  January\or February\or March\or April\or May\or June\or
                                %  July\or August\or September\or October\or November\or December\fi
                                %  \space\number\day, \number\year}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\longabstract{\if@twocolumn
  \section*{Long Abstract}
  \else \small 
  \begin{center}
    {\bf Long Abstract\vspace{-.5em}\vspace{0pt}} 
  \end{center}
  \quotation 
  \fi}
\def\endlongabstract{\if@twocolumn\else\endquotation\fi}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Color Definitions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\AtBeginDocument{
% Base Colors
%  \definecolor{red}{1.0,0.0,0.0}
%  \definecolor{green}{0.0,1.0,0.0}
%  \definecolor{blue}{1.0,0.0,1.0}
  \definecolor{yellow}{rgb}{1.0,1.0,0.0}
  \definecolor{lightyellow}{rgb}{1.0,1.0,0.5}
  \definecolor{verylightyellow}{rgb}{1.0,1.0,0.8}
  \definecolor{cyan}{rgb}{0.0,1.0,1.0} % or ``aqua''
  \definecolor{purple}{rgb}{1.0,0.0,1.0}

% Iaw Colors
  \definecolor{verylightgray}{rgb}{0.92,0.92,0.92}
  \definecolor{veryverylightgray}{rgb}{0.96,0.96,0.98}
  \definecolor{lightgray}{rgb}{0.75,0.75,0.75}
  \definecolor{gray}{rgb}{0.5,0.5,0.5}
  \definecolor{darkgray}{rgb}{0.25,0.25,0.25}
  \definecolor{darkblue}{rgb}{0,0,0.5}
  \definecolor{orange}{rgb}{1,0.5,0.5}
  \definecolor{darkred}{rgb}{0.5,0,0}
  \definecolor{brown}{rgb}{0.4,0.1,0.1}
  \definecolor{darkgreen}{rgb}{0,0.5,0}
  \definecolor{lightblue}{rgb}{0.5,0.5,1.0}
  \definecolor{verylightblue}{rgb}{0.85,0.85,1.0}
  \definecolor{lightred}{rgb}{1.0,0.5,0.5}
  \definecolor{verylightred}{rgb}{1.0,0.8,0.8}
  \definecolor{lightgreen}{rgb}{0.5,1.0,0.5}
  \definecolor{verylightgreen}{rgb}{0.8,1.0,0.8}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\Exp}{\index{Expected Value}\text{$\mathcal{E}$\kern.3pt}}
\newcommand{\Var}{\index{Variance}\text{$\mathcal{V}\kern-3pt\text{\it ar}$\kern.8pt}}
\newcommand{\Cov}{\index{Covariance}\text{$\mathcal{C}\kern-3pt\text{\it ov}$\kern.8pt}}
\newcommand{\Sdv}{\index{Standard Deviation}\text{$\mathcal{S}\kern-1pt\text{\it dv}$\kern.8pt}}
\newcommand{\Avg}{\index{Average}\text{$\mathcal{A}\kern-1pt\text{\it vg}$\kern.8pt}}


\def\GobbleColumnStart{\setbox0\hbox\bgroup}
\let\GobbleColumnStop\egroup
\newcolumntype{i}{@{}>{\GobbleColumnStart}c<{\GobbleColumnStop}}    % n means nothing
\newcolumntype{d}{>{\centerdots}c<{\endcenterdots}}

\newcolumntype{S}{!{\qquad}}
\newcolumntype{s}{!{$\;\;$}}

%\newcolumntype{C}{c@{\qquad}}
%\newcolumntype{R}{r@{\qquad}}
%\newcolumntype{L}{l@{\qquad}}

\endinput




\usepackage[%
pdftex,%
pdfauthor={Ivo Welch}%
pdfstartview={XYZ null null 1},%
pdffitwindow=true,%
pdfcreator={pdflatex}
letterpaper,%
colorlinks,%
citecolor=darkblue,
breaklinks=true,%
backref=true,%
plainpages=false,%
bookmarks=false,%
pdfpagelabels,% this may add another page
pdfpagemode=None%
]{hyperref}
                                % \pdfcompresslevel=9, could add backref



\makeatletter
\def\@urlcolor{darkblue}
\def\@citecolor{darkblue}
\def\@linkcolor{darkred}
\hypersetup{urlcolor=darkblue}
\hypersetup{linkcolor=darkred}
\hypersetup{citecolor=darkblue}
\makeatother

