% Neutrino physics
% Target length: 30 pages

\chapter{Neutrino Physics}\label{chap:NeutrinoPhysics}

Neutrino physics will be discussed! \\
\\
-- Theory\\
-- Experiments\\
-- Future Experiments\\
\\
It may make sense to discuss the experiments as we go along...\\
\\
I think the chapter will work best with both past, present and future woven together.\\
And no distinct separation between theory and experiment (this is an experimental thesis after all...).\\
Can discuss the `neutrino problems' to motivate the theory of neutrino oscillations, and include the SNO and Kamiokande results within.\\
Then something similar with mass.\\
And as we get onto unanswered questions, can weave the propsed experiments into this.\\
I feel a section on the technology and concept of LAr TPCs will fit nicely into this setup.\\

%----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\section{Neutrino Theory}\label{sec:NeutrinoTheory}

\subsection{Neutrino Oscillations}\label{sec:NeutrinoOscillations}

Derive 2-flavour case.\\
Extend to 3 flavour.\\
Discuss CP violation.\\

\subsection{Neutrino Mass}\label{sec:NeutrinoMass}

Mass hierarchy.\\
Absolute mass.\\

%----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\section{Future Neutrino Experiments}\label{sec:FutureNeutrinoExperiments}

%----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
\section{The LAr TPC Concept}\label{sec:LArTPC}

The use of a liquid argon time projection chamber (LArTPC) as a high-precision fine-grained detector medium holds much promise for the successful resolution of the open questions in neutrino physics.  A great amount of R\&D work has taken place to advance the maturity of the technology and pioneering experiments, such as ICARUS \cite{ICARUS2004}, have further increased the understanding of the neutrino community of the detector techniques.  Past and currently running experiments at Fermilab, such as ArgoNeuT [], LArIAT [] and MicroBooNE [], are successfully using LArTPCs to take and analyse data and it seems certain to be the future of neutrino physics in the U.S.

This section will provide a brief history of LArTPC technology and motivate its potential when used in a huge experiment such as DUNE.  The basic operation of such a detector will also be described to provide background for discussion of the DUNE and 35t experiments, and of reconstruction in LArTPCs, in future chapters.

\subsection{A Brief History of Time (Projection Chambers)}\label{sec:LArTPCHistory}

The use of a time projection chamber as a potential particle detector was put forward by David Nygren in 1974 \cite{Nygren1974}.  He envisioned bubble-chamber quality data but with the possiblity of digital readout of the data, fascilitating extremely fine spatial resolution, good timing resolution and fast recovery after triggering.  The basic concept is a drift chamber containing a noble gas placed within a field to drift ionisation electrons created by a propagating particle towards a multielectron array.  This setup allows full three-dimensional reconstruction by combining information from the two-dimensional readout plane with the drift time.  Nygren also included a magnetic field to assist particle identification in his design, shown in Fig. \ref{fig:NygrenTPC}.

\begin{figure}[ht]
  \centering
  \includegraphics[width=10cm]{NygrenTPC.png}
  \caption{The original concept of the time projection chamber particle detector, drawn by David Nygren in 1974 \cite{Nygren1974}.}
  \label{fig:NygrenTPC}
\end{figure}

The extension of this concept to a liquid argon TPC and it potential as a high-precision fine-grained detector medium in neutrino physics was proposed by Carlo Rubbia in 1977 \cite{Rubbia1977}.  The use of a noble liquid rather than gas is necessary in neutrino experiments to provide a high enough target mass to increase the probability of a neutrino interaction.  Noble liquids have high electron mobility and low diffusion, favourable properties as the detection of particles is from the ionisation and scintillation light created by the particles.  Given the necessity of a high electric field in order to drift these electrons to the readout places, excellent dielectric properties are also required; noble liquids possess such qualities.  The properties of liquid argon which make it almost perfect for this use are demonstrated in the table in Table \ref{tab:NobleProperties}.

\begin{table}[ht]
  \caption{Properties of noble elements relevant when considering a TPC medium for a neutrino experiment.}
  \label{tab:NobleProperties}
  \centering
  \begin{tabular}{ m{5cm} || m{1.5cm} | m{1.5cm} | m{1.5cm} | m{1.5cm} | m{1.5cm} | m{1.5cm} }
     & Water & He & Ne & \color{red} Ar & Kr & Xe \\
    \hline\hline
    Boiling point [K] @ 1 atm & 373 & 4.2 & 27.1 & \color{red} 87.3 & 120.0 & 165.0 \\
    \hline
    Density [g/cm$^3$] & 1 & 0.125 & 1.2 & \color{red} 1.4 & 2.4 & 3.0 \\
    \hline
    Radiation length [cm] & 36.1 & 755.2 & 24.0 & \color{red} 14.0 & 4.9 & 2.8 \\
    \hline
    Scintillation [$\gamma$/MeV] & - & 19 000 & 30 000 & \color{red} 40 000 & 25 000 & 42 000 \\
    \hline
    dE/dx [MeV/cm] & 1.9 & & 1.4 & \color{red} 2.1 & 3.0 & 3.8 \\
    \hline
    Scintillation $\lambda$ [nm] & & 80 & 78 & \color{red} 128 & 150 & 175 \\
    \hline
    Natural abundance (Earth atm) [ppm] & & 5.2 & 18.2 & \color{red} 9340.0 & 1.10 & 0.09 \\
    \hline
    Electron mobility [cm$^2$/Vs] & & low & low & \color{red} 400 & 1200 & 2200 \\
    \hline\hline
  \end{tabular}
\end{table}

An additional advantage of this technology is the low threshold for detection; this is set by the ionisation threshold of liquid argon and is only $23.6 \pm 0.5$ eV [].  Rubbia realised that a LArTPC could be the digital replacement for the high quality particle detection methods used in bubble chambers, very common in neutrino physics in the 1970s.  He proposed the first LArTPC detector design, shown in Fig. \ref{fig:RubbiaLArTPC}, which bears a striking resemblense to the LArTPC used in experiments today.

\begin{figure}[ht]
  \centering
  \includegraphics[width=10cm]{RubbiaLArTPC.png}
  \caption{The LArTPC detector proposed by Carlo Rubbia in 1977 \cite{Rubbia1977}.}
  \label{fig:RubbiaLArTPC}
\end{figure}

Constructing and operating such a detector was beyond the technology of the time, and is still being understood today.  The operation of a LArTPC detector and the challenges associated with this are the subject of section \ref{sec:LArTPCOperation}.

\subsection{LAr TPC Operation}\label{sec:LArTPCOperation}

explain how they work

new subsubsection

[FIND OR MAKE A FIGURE TO GO WITH THE FOLLOWING DESCRIPTION...]

A LArTPC typically consists of a single, or multiple anode and cathode, at either end of an active drift region.  An ionising particle passing through a LArTPC causes electrons to become free from argon atoms and, in the presence of a field, drift towards an anode where they are read out.

The readout consists of multiple wires planes with different orientations to facilitate the reconstruction.  The wires are either `induction' wires, which allow the electrons to deposit charge but continue past, or `collection' wires, on which the electric field lines end and all the charge on the electron is collected.  Each wire plane is therefore held at a different `bias voltage' to prevent any field lines ending on the induction wire, thus creating local electric fields which promote the continuing forward motion of the electrons.  The signal seen is therefore dependent on the type of wire plane; a bipolar pulse on an induction plane wire and unipolar on a collection plane wire.  It is also common, though not essential, to make use of a `grid plane' upstream of the signal planes in order to shield them from the electron charge until they are close.  Without such a plane, the bipolar pulse would be highly asymmetric, though would still have zero integral.  It also makes changing the drift voltage (controlling the electric field) slightly easier as the signal planes are somewhat shielded from its effects.  MicroBooNE does not operate with a grid plane and, although the 35t and the DUNE reference design make use of a grid plane, it is uncertain whether the benefit outweighs the cost for a huge LArTPC detector such as the DUNE far detector.  It is worth mentioning alternative readout possibilities have been suggested but, given the scale of future LArTPCs, it is highly unlikely a viable solution which delivers superior readout at a comparable cost will be found.

Given the positive ions that are left in the medium, there is the possibility of recombination at a later time and therefore a loss of information about the initial interaction.

This is however accompanied by a flash of scintillation light which is hugely useful as a means of determining the event `start time' ($t_0$); without this information it would be impossible to place an absolute time scale on the interaction and we would therefore not be able to resolve the coordinate along the drift direction.  The magnitude of the electric field applied is the key to both processes and there is thus a compromise which must be struck in order to preserve as much information as possible.  The graph in Fig. \ref{fig:ElectricFieldScintillationIonisation} demonstrates this; a field of $500$ V/cm is often chosen in current LAr neutrino experiments.

\begin{figure}[ht]
  \centering
  \includegraphics[width=12cm]{ElectricFieldScintillationIonisation.png}
  \caption{Demonstration of the competing effect the electric field has on the luminosity of the ionisation electrons and scintillation light arriving at the detector readout.  Since both are essential in reconstructing the complete interactions, a balance must be found. [PLACEHOLDER IMAGE].}
  \label{fig:ElectronFieldScintiallationIonisation}
\end{figure}

A cathode is held at a high voltage

Flesh this stuff out...

U plane, V plane and collection all held at different fields.  Slightly increasing in order to promote forward motion of the electrons.  V held at 0V because it's cheaper (don't need crazy voltages, just some negative (still quite high, ~100V), 0V and some positive.
Grid plane (also held at potential) is to sheild the APAs from the electrons until they are close.  Not needed, but if not present then pulse wouldn't be very bipolar! The charge in both portions will still equate but the leading end will be muchhhh longer.  All electric field lines (generated from movement of electrons) end on the cathode; don't want them to end on the induction wires (hence making sure the field increases).  We want them to end on the collection planes, which collects the charge.  Signal shaping time (along with gain, the two front-end ASIC parameters) is to let the charge leave the wire before being hit again (or something like this!).  Deconvolution I still need to understand...

In 35t, we have FE ASICs which are the very front end and apply the signal shaping and gain.  Have regulators to control the power these receive (these are noisy...).  Also ADC ASICs to do digitisation in the cold.  MicroBooNE don't do this, this just have the front end and do everything else in the warm.  FE ASICs are the problem, same for uBooNE and 35t.  ADC ASIC has stuck code problem.


\section{Introduction}

Age is one of the most elusive stellar parameters, particularly for stars on
the main sequence.
Isochrone fitting methods suffer from poor precision, especially when only
photometric information is available, and asteroseismology is limited to a
small sample of bright \kepler\ short cadence targets.
Stellar rotation is often used to infer ages via gyrochronology, however it
remains relatively untested at old ages due to the sparsity of precise data.
The data in hand tell an intriguing story: they indicate that magnetic braking
may cease altogether for old, slowly rotating stars.
Here we investigate another dating method: galactic kinematics.

Observations of stars with a range of ages reveal that older stars have
greater velocity dispersions than younger stars \citep[\eg][]{casagrande2011,
aumer2011}
% Aumer M., Binney J. J., 2011, MNRAS, 397, 1286
% Casagrande L., Scho ̈nrich R., Asplund M., Cassisi S., Ram ́ırez I., Mele ́ndez
J., Bensby T.,
% Feltzing S., 2011, A&A, 530, A138
We calculate the dispersion in vertical action for Gaia DR1 targets in the
\kepler\ field.
Although expected to be a weak tracer of age, vertical action dispersion
should be an accurate one as the underlying physical processes are relatively
simple and well understood.
We test the potential of vertical action dispersion as a clock, by comparing
age predictions to asteroseismic ages.
Using the rotation periods of \kepler\ stars we also test the gyrochronology
relations: does magnetic braking cease at late ages?

The processes behind the formation of the galaxy and the formation of
exoplanets are two complex topics in astrophysics connected by a common theme:
stellar ages.
Main sequence (MS) stars comprise the majority of our galaxy but unfortunately
their ages are notoriously difficult to measure \citep[see][for a
review]{Soderblom2010}.
Their positions on the HR diagram don't change significantly during their
hydrogen burning lifetimes, a fact that is convenient for life on Earth but
inconvenient for galactic archaeologists.
Now, due to the abundance of rotation periods for MS stars provided by Kepler
and to-be provided by TESS, LSST and Wfirst, rotation-dating has the potential
to be the most readily available precise method for inferring stellar ages.
Rotation-dating works well for young stars but its accuracy is questionable
for stars older than the Sun: old \kepler\ asteroseismic stars rotate more
rapidly than expected given their age \citep{Angus2015, Vansaders2016,
Metcalfe2016}.
\citet{Vansaders2016} attribute this to an evolving magnetic dynamo: as stars
reach an critical Rossby number (the ratio of rotation period to the
convective overturn timescale), their magnetic field `switches off' and stars
maintain a constant rotation period after that time.
The data sets typically used to test the age-rotation relations are highly
heterogeneous and each set has its own detection and selection biases.
For example, asteroseismology favours quiet stars whereas rotation periods are
easiest to measure for active stars.
Here, we test the age-rotation relations by comparing rotational (gyrochronal)
age with dynamical age.
Data from the first \Gaia\ data release (DR1) provides kinematic ages for
several MS \Kepler\ stars with detectable rotation periods.
We use these kinematic ages to test the gyrochronology relations at all ages.
% We use the vertical action-age relation for red giants to test the
%     vertical action-age relation for MS stars.

% A history of rotation-dating.
\subsection{The status of gyrochronology}
The phenomenon of magnetic braking in MS stars was first observed almost fifty
years ago by \citet{Skumanich1972} who noticed that the rotation periods of
the Sun and young cluster stars decayed with the square-root of time.
% Later, a mass-dependence was added to the relation between age and rotation
% period --- less massive stars lose angular momentum faster than more massive
% one.
\citet{Kawaler1988} derived a formalism for this angular momentum loss.
 % and his
% relation depended on the mass loss rate, the ....
More recently, \citet{Barnes2003} demonstrated that a simple relation could be
used to describe `gyrochronology', the method of rotation-dating, and further
works \citep[\eg][]{Barnes2007, Mamajek2008, Barnes2010, Meibom2011},
demonstrated that the relation between rotation period and age holds true
while theorists \citep[\eg][]{Matt2012, Epstein2014, Vansaders2013,
Vansaders2015} modify and extend physical models that reproduce the
observations.

As discussed above, the performance of the age-rotation relations for old
stars was recently called into question \citep{Angus2015, Vansaders2016,
Metcalfe2016}.
A simple straight-line model for rotational age does not reproduce the ages
predicted by asteroseismology for stars older than the Sun.
This phenomenon is attributed to a transitioning magnetic dynamo at a critical
Rossby number, $Ro$, of 2.6, the solar value \citep{Vansaders2016}.
As rotation periods slow, $Ro$ decreases until it hits the critical value and
magnetic braking switches off: stars maintain their rotation period from that
point onward.
This restricts the applicability of gyrochronology to young, rapidly rotating
stars only.
This hypothesis is supported by the existing data, however these data are
sparse~---~the analyses demonstrating the discrepancies were conducted on the
small number of main sequence, Solar-like oscillators observed by Kepler in
short cadence mode with detectable rotation periods: a sample size of around
20.
% Furthermore, asteroseismology favors stars with low surface gravities since
% they show the largest amplitudes of oscillation and the majority of stars in
% this sample were slightly evolved.
A larger sample of old main sequence stars with precise ages is required to
confirm and further characterize the Rossby saturation mechanism introduced by
\citep{Vansaders2016}.
However, old main sequence stars are difficult to age-date with any other
method than asteroseismology.
We use the age gradients in the kinematic properties of stars to investigate
the \citet{Vansaders2016} model.

\subsection{Kinematic ages}
The age-velocity dispersion relations are based on relatively simple physics.
There is evidence to suggest that stars in the Milky Way form in the thin disc
of the galaxy with relatively small vertical velocities and angular momenta
\racomment{add citations}.
As time passes these stars are scattered via close encounters with other
stars and interactions with galactic spiral arms.
The more time passes, the more scattering events, and stars slowly accumulate
angular momentum in the vertical direction, known as vertical action.
This results in a slow heating of stellar orbits.
Older stars can be identified in Gaia DR1 by integrating their orbits in the
potential of the Milky Way to convert their proper motions, positions and
parallaxes into vertical actions.
It is the {\it dispersion} in vertical action that truly traces age, far
better than vertical action itself.
However for single stars only the individual's vertical action is available.
Nonetheless, $J_z^2$ increases over time for any given star, and is a weak
tracer of age.


\chapter{Firms}
\label{chap:firms}
\index{Firms%
@\emph{Firms}}%

\section{Firms}

There at least one representative firm for each production industry.  Most industries will have a both corporate and non-corporate firms.  Corporate firms may be as many as three - with a domestic corporation, a multi-national parent corporation, and a multi-national subsidiary corporation (the follows the structure of the CORTAX model in terms of the types of corporations).  However, for computational and calibration issues, we will simplify and have just a single multinational corporation for each production industry.  The extent of overseas operations will be a an element of calibration - therefore the degree to which each industries firm is multinational will vary across industry.

The costs of making this simplification is that it would be more difficult to handle legislation about corporate inversion (but even that isn't handled well in the CORTAX structure).  It also makes it more difficult to do multi-country interactions of tax policy, which is what CORTAX is designed for.  I think out other features, such as a diverse set of industries and corporate and non-corporate firms, are more relevant for US tax policy and are difficult to fit in the CORTAX framework due to computational and calibration issues.

We start by describing a fully domestic corporate firm and it's optimal investment, employment, and financial policies.  We then add the international components that describe the multinational nature of this firm.  Next, we discuss the problem of the non-corporate firm.   The functional forms describing the technologies and constraints of the firms are the same across industry, but the parameter values (of both the policy variant and policy invariant) parameters may vary across sector.  In the notation below, we drop the industry subscripts for clarify of exposition.

\section{The Problem of the Domestic Corporation}

The objective of the firm is to maximize firm value.  Firms do this by choosing investment and labor demand, as well as financial policies such as new equity issues, dividend distributions, and borrowing.  There are a total of six endogenous variables in the domestic corporation's problem: investment demand ($I$), demand of effective labor units ($EL$), the stock of corporate debt ($B$), the amount of new equity issues ($VN$), dividend distributions, $DIV$, and the price of output ($p$).  The firm makes choices over the first five of these variables.  The last is determined by an assumption about market structure.  In particular, we assume that firms have a decreasing returns to scale production function and thus realize economic profits.  \textcolor{red}{We pin down the price of output by assuming that there is free entry into the market.  Thus, firms must set price at marginal cost.  With a decreasing returns to scale function, such a price still produces economic profits.  This condition then provides the final equation to identify our six exogenous variables.}

\textcolor{red}{One issue to be resolved is how we handle differential returns on equity across industry and corporate/non-corporate status.  For example, the returns to some firms might differ because they have more overseas profits and/or more ability to shift income overseas to avoid US taxation.}

\subsection{The Value of the Firm}

The household's portfolio problem described in Section \ref{sec:portfolio} allows for differential returns on debt and equity.  It also makes clear that after tax returns differ across savers as they face different tax treatment.  In the formulation of the value of the firm, we use the tax rate on the marginal investor.  \textcolor{red}{It is an open question as to who this investor is, but we will take it to be the domestic investor with the median amount of savings.}  Noting that all individual level tax rates represent those on this marginal investor, we can derive the value of the firm in period $t$, $V_{t}$ in the following way.  The after-tax return on firm equity in period $t$ is given by:

\begin{equation}
\label{eqn:equity_return}
r_{e,t} = \frac{(1-\tau^{d}_{t})DIV_{t}+(1-\tau^{g}_{t})(V_{t+1}-V_{t}-VN_{t})}{V_{t}},
\end{equation}

\noindent\noindent where  $VN_{t}$ are new equity issues in period $t$ (that dilute the value of period $t$ shareholders) and $DIV_{t}$ are dividends distributed in period $t$. The policy parameters $\tau^{d}_{t}$ and $\tau^{g}$ are the period $t$ marginal tax rates on dividends and capital gains for the marginal investor.

\subsubsection{An aside on after-tax rates of return}

\textcolor{red}{Note that the notation for the return on equity differs from that in Section \ref{sec:portfolio}, where $r_{e,t}$ is the before tax return.  In the current section, $r_{e,t}$ denotes the after-tax return for the marginal investor.  To the after-tax return for all investors, we have two options.  First, we can use the decision rules of firms (which imply dividend distributions an firm value) to find the pre-tax rate of return, call it $r^{pre}_{e,t}$:}

\begin{equation}
r^{pre}_{e,t}=\frac{DIV_{t}+V_{t+1}-V_{t}-VN_{t}}{V_{t}},
\end{equation}

\noindent\noindent \textcolor{red}{We then define the gross, after-tax return for a individual of lifetime income group $j$, age $s$, in period $t$ as in Section \ref{sec:portfolio}: $\rho_{e,s,j,t}=(1+r^{pre}_{e,t}(1-\tau^{cap}(y_{j,s,t})))$.}

\textcolor{red}{A second way to do this would be to use the firms decision rules to find the after tax return for each investor:}

\begin{equation}
r_{e,j,s,t} = \frac{(1-\tau^{d}_{j,s,t})DIV_{t}+(1-\tau^{g}_{j,s,t})(V_{t+1}-V_{t}-VN_{t})}{V_{t}},
\end{equation}

\noindent\noindent \textcolor{red}{where the gross, after-tax return would be described by $\rho_{e,s,j,t}=1+r_{e,j,s,t}$.}

\textcolor{red}{The main difference between the two methods is that the first allows for the model to include some elements of the dividend clientele hypothesis (depending on the detail on asset holdings imputed to the micro simulation model).  In particular, the tax rate, $\tau^{cap}(y_{j,s,t})$ would be calibrated from the microsimulation model and therefore would be a weighted average of the tax rates on dividends and capital gains for filers in a particular age-income group, where the weighting depends on the amount of capital gains versus dividend income for those filers.  In contract, the second method assumed that all households get the same mix of dividends and capital gain income.  However, the second method benefits from using the model's endogenous split between dividend and capital gains income, rather than assuming that the split is the same over time (but varies in the cross-section).  So, to summarize, the first method allows for cross-sectional variation in the split between dividend and capital gains income (but no variation over time within a filer type), while the second method allows for variation over time (but not across filer types).}

\subsection{The Value of the Firm, cont'd}
We can rearrange Equation \ref{eqn:equity_return} to solve for $V_{t}$:

\begin{equation}
\begin{split}
(1-\tau^{g}_{t})V_{t+1} &=V_{t}r_{e,t}-(1-\tau^{d}_{t})DIV_{t}+(1-\tau^{g}_{t})V_{t}+(1-\tau^{g}_{t})VN_{t}\\
\implies  V_{t+1} & = \frac{r_{e,t}V{t}-(1-\tau^{d}_{t})DIV_{t}}{(1-\tau^{g}_{t})}+V_{t}+VN_{t} \\
\implies  V_{t+1} & = V_{t}\left(\frac{r_{e,t}}{(1-\tau^{g}_{t})}+1\right)+VN_{t} - \left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}\right)DIV_{t} \\
\implies V_{t} &= \left(\frac{1}{1+\frac{r_{e,t}}{(1-\tau^{g}_{t})}}\right)\left[V_{t+1} - VN_{t} + \left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}\right)DIV_{t}\right]  \\
\end{split}
\end{equation}

\noindent\noindent Letting $ \left(\frac{1}{1+\frac{r_{e,t}}{(1-\tau^{g}_{t})}}\right) = 1+\theta_{t}$, we can solve for $V_{t}$ by repeatedly substituting for $V_{t+1}$ and applying the transversality condition ($\lim_{T \to \infty} \prod_{t=1}^{T}(1+\theta_{t})V_{T}=0$):

\begin{equation}
\label{eqn:solve_vs}
\begin{split}
& V_{t}=\frac{V_{t+1}}{(1+\theta_{t})} - \frac{VN_{t}}{(1+\theta_{t})}  + \frac{\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}\right)DIV_{t}}{(1+\theta_{t})} \\
\implies &  V_{t}=\frac{V_{t+2}}{(1+\theta_{t})(1+\theta_{t+1})} - \frac{VN_{t+1}}{(1+\theta_{t})(1+\theta_{t+1})}  + \frac{\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}}\right)DIV_{t+1}}{(1+\theta_{t})(1+\theta_{t+1})} - \frac{VN_{t}}{(1+\theta_{t})}  + \frac{\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}\right)DIV_{t}}{(1+\theta_{t})} \\
\implies &  V_{t}= \frac{V_{t+3}}{(1+\theta_{t})(1+\theta_{t+1})(1+\theta_{t+2})} - \frac{VN_{t+2}}{(1+\theta_{t})(1+\theta_{t+1})(1+\theta_{t+2})}  + \frac{\left(\frac{1-\tau^{d}_{t+2}}{1-\tau^{g}_{t+2}}\right)DIV_{t+2}}{(1+\theta_{t})(1+\theta_{t+1})(1+\theta_{t+2})} \\
& - \frac{VN_{t+1}}{(1+\theta_{t})(1+\theta_{t+1})}  + \frac{\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}}\right)DIV_{t+1}}{(1+\theta_{t})(1+\theta_{t+1})} - \frac{VN_{t}}{(1+\theta_{t})}  + \frac{\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}\right)DIV_{t}}{(1+\theta_{t})} \\
& \text{and so on...} \\
\implies & V_{t}=\underbrace{\prod_{\nu=t}^{\infty}\left(\frac{1}{1+\theta_{\nu}}\right)V_{\infty}}_{=0 \text{ by transversality condition}} - \sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[VN_{u} - \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)DIV_{u}\right]\\
\implies & V_{t}= \sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[ \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)DIV_{u}-VN_{u}\right]\\
\end{split}
\end{equation}

\subsection{Firm Production}

Firm's combine capital, $K$, and effective labor, $EL$, with a fixed factor of production, $A$ to produce output, $X$.  We can think of the fixed factor of production as ``location specific capital".  It is fixed in the sense that its supply is perfectly inelastic.  It is location specific in the sense that it is proportional to the size of the population in the firm's home country at time $t$. \textcolor{red}{CORTAX documentation at first suggests this factor is chosen optimally by the firm, but there is not first order condition for this choice shown.  The documentation does state that this factor is paid its marginal product.  So there are only economic profits before you account for the return to this factor of production.  I'm also not sure if we need this fixed factor of production to be proportional to the population.  CORTAX says yes so that you don't have productivity differential arising from differences in country size.  They consider multi-country model, but only steady state.  Do we need something similar so productivity doesn't depend upon population at time $t$?}  We write the amount of output produced as a function of this fixed factor and the value added, $VA$, from the input of capital and labor:

\begin{equation}
X_{t} = A_{t}(VA_{t})^{\alpha_{v}},
\end{equation}

\noindent\noindent where $\alpha_{v}$ is the share of output attributable to the firm's value added and the fixed factor of production is given by:

\begin{equation}
A_{t} = (A_{0,t}\omega_{t}N_{t})^{1-\alpha_{v}}
\end{equation}

\noindent\noindent  So the input from fixed factor of production used by the firm is given by the level of total factor productivity (TFP), $A_{0,t}$, and a exogenous share of the population, $N_{t}$ where the share is given by the parameter $\omega_{t}$ (\textcolor{red}{Not sure if we want this to vary by time, or just across production industry.}).  The share parameters must sum to one.  That is, $\sum_{m=1}^{M} \omega_{m,t} = 1$.     We assume that TFP grows at the same rate across industry, with the growth rate given by $g_{a}$.  The value added is given by a CES function:

\begin{equation}
\label{eqn:prod_fun}
F(A_{0,t},K_{t},EL_{t})=VA_{t} =A_{0,t} \left[(\gamma_{})^{1/\epsilon_{}}(K_{t})^{(\epsilon-1)/\epsilon_{}}+(1-\gamma_{})^{1/\epsilon_{}}(e^{g_{y}t}EL_{t})^{(\epsilon_{}-1)/\epsilon_{}}\right]^{(\epsilon_{}/(\epsilon_{}-1))},
\end{equation}

\noindent\noindent where $\epsilon$ gives the elasticity of substitution between capital and labor and $\gamma$ is the share parameter in the CES production function.  Effective labor units are affected by labor augmenting technological change.  The growth rate of this technology is give by $g_{y}$.  If $\alpha_{v}<1$, then the production function exhibits decreasing returns to scale with respect the firm's inputs of capital and labor.

We can derive the marginal products of capital and labor as:

\begin{equation}
\label{eqn:mpk}
MPK_{t}=\frac{\partial X_{t}}{\partial K_{t}}=A_{0,t}^{\frac{\epsilon-1}{\epsilon}} \left(\frac{\alpha_{v}X_{t}}{VA_{t}}\right)\left(\frac{\gamma VA_{t}}{K_{t}}\right)^{\frac{1}{\epsilon}}
\end{equation}

\begin{equation}
\label{eqn:mpl}
MPL_{t}=\frac{\partial X_{t}}{\partial EL_{t}}=A_{0,t}^{\frac{\epsilon-1}{\epsilon}} \left(\frac{\alpha_{v}X_{t}}{VA_{t}}\right)\left(\frac{(1-\gamma) VA_{t}}{EL_{t}}\right)^{\frac{1}{\epsilon}}
\end{equation}

\subsection{Firm Accounting}

Here we define a few accounting concepts and constraints relevant to the firm's problem.

\subsubsection{Cash Flow Constraint}
The firm's choices of investment and labor demand, as well as financial policies to finance these expenditures must satisfy the firm's cash flow constraint, which is given by:

\begin{equation}
\label{eqn:cash_flow}
\begin{split}
& \underbrace{p_{t}X_{t}+B_{t+1}+VN_{t}}_{\text{financial inflows}} =\\
 & \underbrace{w_{t}EL_{t} + (1+r_{b,t})B_{t} + c(B_{t+1},K_{t}) + p^{k}_{t}I_{t}(1+\Phi_{t}) + DIV_{t} + \tau^{p}_{t}p^{k}_{t}K_{t} + TE_{t} + \Psi(VN_{t})}_{\text{financial outflows}}
\end{split}
\end{equation}

\noindent\noindent Here, $p_{t}$ is the price of output, $B_{t+1}$ is the stock of debt at the beginning of period $t+1$ (so that new debt issues in period $t$ are equal to $B_{t+1}-B_{t}$), $VN_{t}$ are new equity issues (as noted above).  Labor costs are given by the wage rate times the number of effective labor units employed, $w_{t}EL_{t}$.  The interest rate of bond holdings is given by $r_{b,t}$ and the costs of holding debt are given by $c(B_{t+1},K_{t+1})$.  These costs might represent bankruptcy costs and other frictions in the debt markets.  The variable $p^{k}_{t}$ denotes the price of capital, $I_{t}$ represents investment, and $\Phi_{t}$ are the costs to adjusting the capital stock through new investment.  The firm also pays dividends, $DIV_{t}$, property taxes at a marginal rate of $\tau^{p}$ on the nominal value of its capital stock, income taxes $TE_{t}$, and costs to new equity issues, $\Psi(VN_{t})$.  Costs to new equity issues represent frictions in the equity markets such as those arising from information asymmetries.

We impose to constraints on variables in the cash flow constraint: $DIV_{t}\geq0$ and $VN_{t}\geq0$.  In practice, firm's can and do buy back shares, but we restrict share repurchases in the model since the IRS treats share repurchases as dividends if they are done on a regular basis.  Our model therefore restricts the distribution of firm value to shareholders to be through dividend issues.  Note that we do not impose a constraint debt.  Positive values of $B$ indicate firm borrowing, while negative values represent firm saving.  Thus, retained earnings are held in the form of bonds that earn a rate of return $r_{b,t}$.

The law of motion of the capital stock is given by:
\begin{equation}
\label{eqn:lom_capital}
K_{t+1}=(1-\delta)K_{t} + I_{t},
\end{equation}

It is assumed that costs of debt take the following form:

\begin{equation}
\label{eqn:debt_cost}
c(B_{t+1},K_{t}) = \chi_{bk}\left(\frac{B_{t+1}}{K_{t}}\right)^{\ve_{bk}},
\end{equation}

\noindent\noindent where $\chi_{bk}$ is a scaling parameter and $\ve_{bk}$ is the curvature parameter. \textcolor{red}{Note the timing convention used here.  Leverage is determined by the current capital stock, not the one-period ahead capital stock.  While the investment made with the loan may be used as collateral for the loan, we assume that the costs of debt depend upon the ratio the loan to the current capital stock. This seems realistic if there is uncertainty about the potential value of the investments.  We will need to adjust this cost function in a way so that savings (i.e., $B<0$) result in no cost.}

Adjustment costs are assumed to be a quadratic function of deviations from the steady-state investment rate:
\begin{equation}
\label{eqn:adj_cost}
\Phi_{t}=\frac{\left(\frac{\beta}{2}\right)\left(\frac{I_{t}}{K_{t}}-\mu\right)^{2}}{\left(\frac{I_{t}}{K_{t}}\right)}
\end{equation}

\noindent\noindent The parameter $\beta$ is the scaling parameter for the adjustment cost function and $\mu$ is the steady-state investment rate, which is determined as $\mu=\delta+g_{y}+g_{n}$

Costs to new equity issues are assumed to be of the form:

\begin{equation}
\label{eqn:equity_cost}
\Psi(VN_{t})= \psi_{1}VN_{t} + \psi_{2}VN_{t}^{2}
\end{equation}

\textcolor{red}{We can play around with these function forms.  The key points are that we have increasing marginal costs in each. It's also very convenient for the steady state costs of adjusting the capital stock to equal zero.  We also need to think about forms that are easy to calibrate and want to avoid fixed costs (and other non-convexities) that may make computation difficult.}

If the firm has a net financial surplus before choosing it's financial policy (dividends, new equity, bond holdings), then it will either save the excess, earning a rate of return $r_{b,t}$ or will distribute the excess as dividends.  In making this choice it will consider the corporate income tax rate to the gains return on retained earnings as well as the capital gains taxes on the marginal investor in the benefits to the retained earnings.  It will consider taxes on dividend income in the benefits to dividend distributions.  If the firm has net financial deficit, then it will use new equity and/or bond issues to satisfy the cash flow constraint. In making this choice, it will consider the costs of debt and equity as well as the tax implications of each.  In particular, that interest payments on debt may be tax deductible and that the after-tax dilution of shareholder value is affected by the capital gains tax rate.

\subsubsection{Accounting Concepts}

It is useful to define some accounting concepts.  We define firm profits from a financial accounting perspective as:

\begin{equation}
\label{eqn:profit_book}
\Pi^{book}_{t} = p_{t}X_{t}-w_{t}EL_{t}-\delta K_{t} -\Phi_{t}p^{k}_{t}I_{t}-(1+r_{b,t})B_{t}- c(B_{t+1},K_{t})-\tau^{p}_{t}K_{t}-TE_{t}
\end{equation}

We define firm profits from a tax accounting perspective as:
\begin{equation}
\label{eqn:profit_tax}
\begin{split}
\Pi^{tax}_{t}= & p_{t}X_{t}-w_{t}EL_{t}-f_{e,t}p^{K}_{t}I_{t}-\Phi_{t}I_{t}-f_{i,t}r_{b,t}B_{t}-f_{c,t}c(B_{t+1},K_{t})+f_{p,t}\delta B_{t}+...\\
& f_{b,t}B_{t+1}-f_{d,t}\delta^{\tau}_{t}K^{\tau}_{t}-f_{ace,t}r_{ace,t}K^{\tau}_{t}-\tau^{p}_{t}p^{k}_{t}K_{t}
\end{split}
\end{equation}

\noindent\noindent Note that we are assuming that investment may or may not be deductible (depending upon the dummy variable $f_{e,t}$), but that investment adjustment costs are always deductible (i.e., they are not preceded by $f_{e,t}$).  Under a pre-pay consumption tax system, investments are not deductible from the tax base.  Whether or not adjustment costs are deductible under a pre-pay consumption tax depends upon what you think these costs derive from.  For example, if adjustment costs are from retraining employees to use new equipment, then these costs may be deductible under a consumption tax system (pre or post-pay) because they would likely be in the form of wage/labor costs.\footnote{It's not clear how best to handle this and \citet{DZ2013} are vague on this point.}  The other indicator variables, $f_{i,t}$, $f_{c,t}$,$f_{p,t}$, $f_{b,t}$, $f_{d}$, and $f_{ace,t}$, allow for various consumption tax policies to be incorporated into the model.  The parameter $f_{i,t}=1$ if interest on debt is deductible and 0 if not (\textcolor{red}{Since we will allow firms to lend with their retained earnings, we need to think about that fact that this indicator is not always symmetric.  That is, one might have a tax system where interest income is taxes, but interest payments are not deductible (or fully deductible).}).  The indicator $f_{c,t}$ equals one if debt costs are deductible (\textcolor{red}{Not sure if we want this - maybe just assume they are deductible are capital adjustment costs are.}).  The parameter $f_{p,t}$ is equal to one the principle on corporate borrowing is deductible from the corporate income tax based.  Principle on loans would be deductible in a post-pay consumption tax system.  The parameter $f_{b,t}$ is equal to one if the proceeds from firm borrowing is included in the corporate tax base.  Such proceeds would be included in a pre-pay consumption tax system.  The parameter $f_{d,t}$ is equal to one if capital can be depreciated and zero if not.  For example, in a post-pay consumption tax framework, $f_{e,t}=1$ and $f_{d,t}=0$. We allow for allowance of corporate equity (ACE) policies through the $f_{ace,t}$ indicator variable, which equals one if there is an allowance for corporate equity.  We use the notation $r_{ace,t}$ for the rate of return use for the corporate equity allowance.  In practice, this maybe set to $r_{b,t}$ or $r_{e,t}$ or another rate of return. \textcolor{red}{The fiscal capital stock is currently used as the basis for the ACE system.  I think this needs to be adjusted for the fraction of the capital stock that is supported by equity, but I'm not totally sure.}

The tax basis of the capital stock is given by $K^{\tau}_{t}$.  The law of motion for the tax basis of the capital stock is given by:

\begin{equation}
\label{eqn:lom_taxcapital}
K^{\tau}_{t+1}=(1-\delta^{\tau}_{t})(K^{\tau}_{t} + (1-f_{e})p^{K}_{t}I_{t}),
\end{equation}

%\noindent\noindent where $\delta^{\tau}$ is the rate if depreciation for tax purposes.  Note how we form the law of motion for the tax basis.  The above formulation accounts for the fact that investment in year $t$ receives a depreciation deduction in year $t$.\footnote{The IRS specifies a partial year rule, where one deducts the value of investment proportional to the amount of the year in which the asset was in place.  We ignore this detail and assume all assets are in place for the entire year.}  We can think about modifying this so that you get no deduction in the year the investment is made, which may or may not be more consistent with the ``time to build" built into the law of motion for the physical capital stock.
%
%
%\noindent\noindent Note that $K^{\tau}_{u}$ tracks depreciation deductions in in all periods $u=t,...,\infty$.  Future depreciation deductions on the tax basis of the capital stock in existence at time $u$ do not affect investment decisions at time $u$ (or forward) since the tax basis is predetermined.\footnote{Note that if there were financial frictions (e.g. a borrowing constraint or costly external finance), then investment would be dependent on cash flow and would then be affected by changes in the value of deductions for the existing capital basis.}  However, future depreciation deductions for investments made at time $u$ do affect investment decisions (since they lower the after-tax cost of investment).  Therefore it's useful to distinguish between old and new capital.
%
%The time $u$ value of future depreciation deductions on the capital stock existing at the beginning of period $u$ is given by $K^{\tau}_{u-1}$.  We can determine this value as:
%
%\begin{equation}
%\label{eqn:z}
%\begin{split}
%f_{d}Z_{u}K^{\tau}_{u-1} &=  \sum^{\infty}_{j=u} \prod_{\nu=u}^{j} \left(\frac{1}{1+\theta_{\nu}}\right)f_{d}\Omega_{j}\tau^{b}_{j}\delta^{\tau}(1-\delta^{\tau})^{j-u}K^{\tau}_{u} \\
%&= f_{d} K^{\tau}_{u-1} \underbrace{\sum^{\infty}_{j=u} \prod_{\nu=u}^{j} \left(\frac{1}{1+\theta_{\nu}}\right)f_{d}\Omega_{j}\tau^{b}_{j}\delta^{\tau}(1-\delta^{\tau})^{j-u}}_{Z_{u}} \\
%& = f_{d} K^{\tau}_{u-1} Z_{u},
%\end{split}
%\end{equation}
%
%\noindent\noindent where $Z_{u}$ is the net present value of future depreciation deductions per dollar of investment.  With this, we derive the time $u$ value of future depreciation deductions on investments made at time $u$, $I^{\tau}_{u}$.  These are given by $f_{d}(1-f_{e})Z_{u}I_{u}$.  Now we can rewrite Equation \ref{eqn:vs} describing the value of the firm at time $t$ as:
%
% \begin{equation}
%\label{eqn:vs_w_z}
%\begin{split}
%V_{t} = &  \sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right) (1-\tau^{b}_{u})\Omega_{u}(p_{u}X_{u}-w_{u}EL_{u})  \\
% & - K_{t} \left\{(1-\tau^{b}_{u})\Omega_{u}\tau^{p}_{u}+(1-f_{i}\tau^{i}_{u})i_{u}\Omega_{u}b-\delta(p_{u}-b-\Omega_{u}(p_{u}-f_{p}\tau^{b}_{u}b))\right\}  \\
% & - I_{u}\left\{1-b+\Omega_{u}f_{b}\tau^{b}_{u}b-\Omega_{u}f_{e}\tau^{b}_{u} - f_{d}(1-f_{e})Z_{u} + (1-\Omega_{u}\tau^{b}_{u})\Phi_{u}\right\} \\
% &  + f_{d}Z_{t}K^{\tau}_{t-1} \\
%\end{split}
%\end{equation}

Total income taxes on the firm are thus given by:

\begin{equation}
\label{eqn:corp_tax}
\begin{split}
TE_{t}= \tau^{b}_{t}\Pi^{tax}_{t} +\tau^{ic}_{t}p^{K}_{t}I_{t},
\end{split}
\end{equation}

\noindent\noindent  where $\tau^{b}_{t}$ is the tax rate on business income will be used to represent either an entity level tax or the tax rate on the distributions of income to owners for those firms not subject to an entity level tax.

\subsection{Optimal Firm Policy}

Using the cash flow constraint, we can solve for dividends as a function of the other endogenous variables, exogenous variables, and parameters:

\begin{equation}
\label{eqn:div}
\begin{split}
DIV_{t}&=\Pi^{book}_{t} + B_{t+1} + VN_{t}\\
 & = p_{t}X_{t}+ B_{t+1} + VN_{t}-w_{t}EL_{t}-\delta K_{t} -\Phi_{t}p^{k}_{t}I_{t}-(1+r_{b,t})B_{t} - c(B_{t+1},K_{t})-\tau^{p}_{t}K_{t}-TE_{t}
\end{split}
\end{equation}

The problem of the firm is maximize firm value, $V_{t}$, to the constraints on dividends and equity issues, and the laws of motion for the economic and fiscal capital stock.  That is, it solves:

\begin{equation}
\label{eqn:V_max}
\begin{split}
        &V_{t}= \max_{\{DIV_{u},VN_{u}, I_{u}, K_{u+1}, EL_{u}, B_{u+1}, K^{\tau}_{u+1},p_{u}\}^{\infty}_{u=t}} \sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[ \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)DIV_{u}-VN_{u}\right]\\
        &\text{subject to:} \\
        &DIV_{u}\geq 0\\
        &VN_{u}\geq 0\\
        &K{u+1}=(1-\delta)K_{u}+ I_{u} \\
        &K^{\tau}_{t+1}=(1-\delta^{\tau}_{t})(K^{\tau}_{t} + (1-f_{e})p^{K}_{t}I_{t})
      \end{split}
    \end{equation}

We can substitute in Equation \ref{eqn:div} for $DIV_{t}$ in the above and write the Lagrangian of the firm's problem as:

 \begin{equation}
\label{eqn:lagrangian}
\begin{split}
\mathcal{L}_{t} =& \max_{\{VN_{u}, I_{u}, K_{u+1}, EL_{u}, B_{u+1}, K^{\tau}_{u+1},p_{u}\}^{\infty}_{u=t}}   \sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right) \left[ \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right) \left(p_{u}X_{t}+ B_{u+1}... \right. \right. \\
& \left. \left.  + VN_{u}-w_{u}EL_{u}-\delta K_{u} -\Phi_{u}p^{k}_{u}I_{t}-(1+r_{b,u})B_{u} - c(B_{t+1},K_{t})-\tau^{p}_{u}K_{u}-TE_{u}\right)  - VN_{u} ...\right. \\
&\left. + q_{u}\left((1-\delta)K_{u}+I_{u}-K_{u+1}\right) + \lambda^{\tau}\left((1-\delta^{\tau}_{u})(K^{\tau}_{u}+(1-f_{e,u})p^{k}_{u}I_{u})-K^{\tau}_{u+1}\right) ...\right. \\
& \left.+ \lambda^{v}_{t}VN_{u} ... \right. \\
& \left. + \lambda^{d}\left(p_{u}X_{u}+ B_{u+1} + VN_{u} - w_{u}EL_{u} - (1+r_{b,u})B_{u} - c(B_{u+1},K_{u+1})... \right.\right.\\
& \left.\left. - p^{k}_{u}I_{u}(1+\Phi_{u}) - \tau^{p}_{u}p^{k}_{u} - TE_{u} -\Psi(VN_{u})\right) \right]
\end{split}
\end{equation}

The maximization problem yields the following first order conditions:

With respect to labor:
\begin{equation}
\label{eqn:foc_l}
\begin{split}
&\frac{\partial \mathcal{L}_{t}}{\partial EL_{u}} = \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[ \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)\left[p_{u}MPL_{u} - w_{u} - \frac{\partial TE_{u}}{\partial EL_{u}}\right] ... \right. \\
& \left. - \lambda^{d}_{u}\left[p_{u}MPL_{u} - w_{u} - \frac{\partial TE_{u}}{\partial EL_{u}}\right] \right] = 0  \\
& \implies  p_{u}MPL_{u}- \frac{\partial TE_{u}}{\partial EL_{u}} = w_{u}
\end{split}
\end{equation}

Labor demand is determined through this intratemporal trade off between the costs and benefits of employing additional labor in the production process. The left hand side gives the marginal revenue, or benefits from employing more labor, and the right hand save gives the costs, which are the wages paid to the additional labor.

With respect to investment:
 \begin{equation}
\label{eqn:foc_i}
\begin{split}
\frac{\partial \mathcal{L}_{t}}{\partial I_{u}} & =  \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right) \left[ q_{u} + \lambda^{\tau}_{u}(1-\delta^{\tau}_{u})(1-f_{e,u})p^{k}_{u} -  \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right) \left[p^{k}_{u}(1+ \frac{\partial \Phi_{u}}{\partial I_{u}}I_{u} + \Phi_{u}) + \frac{\partial TE_{u}}{\partial I_{u}} \right] - \right. \\
& \left. \lambda^{d}_{u}\left[p^{k}_{u}(1+ \frac{\partial \Phi_{u}}{\partial I_{u}}I_{u} + \Phi_{u}) + \frac{\partial TE_{u}}{\partial I_{u}} \right]\right]= 0 \\
& \implies q_{u} + \lambda^{\tau}_{u}(1-\delta^{\tau}_{u})(1-f_{e,u})p^{k}_{u} =  \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u}\right)\left[p^{k}_{u}(1+ \frac{\partial \Phi_{u}}{\partial I_{u}}I_{u} + \Phi_{u}) + \frac{\partial TE_{u}}{\partial I_{u}}\right]
\end{split}
\end{equation}

With respect to the one-period ahead capital stock:

 \begin{equation}
\label{eqn:foc_k}
\begin{split}
 \frac{\partial \mathcal{L}_{t}}{\partial K_{u+1}}  &=  - \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)q_{u}  + \prod_{\nu=t}^{u+1}\left(\frac{1}{1+\theta{\nu}}\right)\left[(1-
\delta)q_{u+1} ... \right. \\
&\left. +    \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}}\right)\left[p_{u+1}MPK_{u+1} - p^{k}_{u+1}\frac{\partial \Phi_{u+1}}{\partial K_{u+1}}I_{u+1} - \frac{\partial c(B_{u+2},K_{u+1})}{\partial K_{u+1}}-\tau^{p}_{u+1}p^{k}_{u+1}-\frac{\partial TE_{u+1}}{\partial K_{u+1}} \right] \right. \\
& \left. - \lambda^{d}_{u}\left[p_{u+1}MPK_{u+1} - p^{k}_{u+1}\frac{\partial \Phi_{u+1}}{\partial K_{u+1}}I_{u+1} - \frac{\partial c(B_{u+2},K_{u+1})}{\partial K_{u+1}}-\tau^{p}_{u+1}p^{k}_{u+1}-\frac{\partial TE_{u+1}}{\partial K_{u+1}} \right] \right] = 0 \\
&\implies q_{u} = \left(\frac{1}{1+\theta_{u+1}}\right)\left[(1-\delta)q_{u+1} ... \right. \\
& \left. +  \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u+1} \right)\left[p_{u+1}MPK_{u+1}- p^{k}_{u+1}\frac{\partial \Phi_{u+1}}{\partial K_{u+1}}I_{u+1}  ... \right.\right. \\
& \left.\left.- \frac{\partial c(B_{u+2},K_{u+1})}{\partial K_{u+1}}-\tau^{p}_{u+1}p^{k}_{u+1}-\frac{\partial TE_{u+1}}{\partial K_{u+1}} \right] \right]
\end{split}
\end{equation}

\noindent\noindent The Euler equation described in Equation \ref{eqn:foc_i} relates Tobin's $q$, given by $q_{u}$, to the marginal costs of investment.  Tobin's $q$ defines the marginal change in firm value for a dollar of investment. It is the shadow price of additional capital.  The FOC for investment says that the firm invests until the marginal benefit (the LHS of Equation \ref{eqn:foc_i}) is equal to the marginal cost of investment (the RHS of Equation \ref{eqn:foc_i}).  The cost of investment in the absence of taxes and frictions is equal to the price of capital (the first term on the RHS of Equation \ref{eqn:foc_i}).  The second term reflects the reduction in the cost of capital due to debt financing.  The third term on the RHS of Equation \ref{eqn:foc_i} is the change in the cost of capital due to debt being included or excluded from business entity-level income taxes.  The fourth term reflects the reduction in the cost of capital due to depreciation deductions.  The last term reflects the component of the cost of capital that is due to adjustment costs (net of the expensing of adjustment costs for tax purposes).

With respect to one-period ahead bond holdings:
 \begin{equation}
\label{eqn:foc_b}
\begin{split}
 \frac{\partial \mathcal{L}_{t}}{\partial B_{u+1}}  &=  \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)\left(1-\frac{\partial c(B_{u+1},K_{u}}{\partial B_{u+1}}-\frac{\partial TE_{u}}{\partial B_{u+1}}\right) ... \right. \\
 & \left. +  \lambda^{d}_{u}\left(1-\frac{\partial c(B_{u+1},K_{u})}{\partial B_{u+1}}-\frac{\partial TE_{u}}{\partial B_{u+1}}\right) \right] ... \\
 & -  \prod_{\nu=t}^{u+1}\left(\frac{1}{1+\theta{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}}\right)\left((1+r_{b,u+1})+\frac{\partial TE_{u+1}}{\partial B_{u+1}}\right)... \right. \\
 & \left. + \lambda^{d}_{u+1}\left((1+r_{b,u+1})+\frac{\partial TE_{u+1}}{\partial B_{u+1}}\right)\right] = 0 \\
& \implies \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u} \right)\left(1-\frac{\partial c(B_{u+1},K_{u})}{\partial B_{u+1}}-\frac{\partial TE_{u}}{\partial B_{u+1}}\right)= \\
&  \left(\frac{1}{1+\theta_{u+1}}\right) \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u} \right) \left((1+r_{b,u+1})+\frac{\partial TE_{u+1}}{\partial B_{u+1}}\right)
 \end{split}
\end{equation}

With respect to new equity issues:
 \begin{equation}
\label{eqn:foc_vn}
\begin{split}
 \frac{\partial \mathcal{L}_{t}}{\partial VN_{u}}  &=  \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right) - 1 + \lambda^{v}_{u} + \lambda^{d}_{u}\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right) \right] = 0 \\
 & \implies 1 = \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u}\right)\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right) + \lambda^{v}_{u}
 \end{split}
\end{equation}

With respect to the one-period ahead fiscal capital stock:
 \begin{equation}
\label{eqn:foc_ktau}
\begin{split}
 \frac{\partial \mathcal{L}_{t}}{\partial K^{\tau}_{u+1}}  &=  - \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta{\nu}}\right)\lambda^{\tau}_{u} -  \\
 & \prod_{\nu=t}^{u+1}\left(\frac{1}{1+\theta{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}}\right)\frac{\partial TE_{u+1}}{\partial K^{\tau}_{u+1}} - \lambda^{\tau}_{u+1}(1-\delta^{\tau}_{u+1}) + \lambda^{d}_{u+1}\frac{\partial TE_{u+1}}{\partial K^{\tau}_{u+1}} \right] = 0 \\
& \implies \lambda^{\tau}_{u} = \left(\frac{1}{1+\theta_{u+1}}\right)\left[\left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u+1} \right)\frac{- \partial TE_{u+1}}{\partial K^{\tau}_{u+1}} + \lambda^{\tau}_{u+1}(1-\delta^{\tau}_{u+1})\right]
 \end{split}
\end{equation}

The final endogenous variable to solve for is the value of the firm at any point in time, $V_{u}$.  As \citet{Hayashi1982} shows, with a constant returns to scale production function and quadratic adjustment costs, there is an equivalence between marginal $q$ and average $q$.  \textcolor{red}{Is it ok that we have a production function that is CRS, but DRS with respect to capital and labor???}  Note that in our case, we must make an adjustment for the value of depreciation deductions on the tax basis of the capital stock already in place at time $u$.  The relation between marginal $q$, given by $q_{u}$, and average $q$, given by $Q_{u}$ is:
 \begin{equation}
\label{eqn:avg_q}
\begin{split}
q_{u}=\frac{[V_{u}-f_{d}Z_{u}K^{\tau}_{u-1}]}{K_{u}} \text{ and } Q_{u}=\frac{V_{u}}{K_{u}},
\end{split}
\end{equation}

\noindent\noindent where $Z_{u}$ is the net present value of depreciation deductions on the existing capital stock.  This relationship thus allows use to determine the value of the firm as:

 \begin{equation}
\label{eqn:solve_firmvalue}
\begin{split}
 V_{u}=q_{u}K_{u}+f_{d}Z_{u}K^{\tau}_{u-1}
\end{split}
\end{equation}

\textcolor{red}{Note that price is endogenous, but there is no first order condition for this choice that makes sense here since we don't have a demand function.  To pin down this endogenous variable we'll use the condition that with free entry, the equilibrium price will equal the firm's marginal cost. To do this, we need to write the marginal cost of producing a unit of output.  And for price to be determined, we need this to be constant over all amounts of output (which is not the case with a DRS production function).  Or, can we set price equal to marginal cost then solve for the output price as a function of the factor prices (r,w)? }

We can write the derivatives of the tax function with respect to the endogenous variables as:

\begin{equation}
\label{eqn:d_te_l}
\frac{\partial TE_{u}}{\partial EL_{u}}= \tau^{b}_{u}\left(p_{u}MPL_{u}- w_{u} \right)
\end{equation}

\begin{equation}
\label{eqn:d_te_i}
\frac{\partial TE_{u}}{\partial I_{u}}= -\tau^{b}_{u}\left(f_{e,u}p^{k}_{u} + p^{k}_{u}\left(\frac{\partial \Phi_{u}}{\partial I_{u}} + \Phi_{u}\right)\right) + \tau^{ic}_{t}p^{k}_{t}
\end{equation}

\begin{equation}
\label{eqn:d_te_kp1}
\frac{\partial TE_{u}}{\partial K_{u+1}}= 0
\end{equation}

\begin{equation}
\label{eqn:d_te_k}
\frac{\partial TE_{u}}{\partial K_{u}}= \tau^{b}_{u}\left( p_{u}MPK_{u} - p^{k}_{u}\frac{\partial \Phi_{u}}{\partial K_{u}}I_{u} - f_{c,u}\frac{\partial c(B_{u+1},K_{u})}{\partial K_{u}}- \tau^{p}_{u}p^{k}_{u}\right)
\end{equation}

\begin{equation}
\label{eqn:d_te_bp1}
\frac{\partial TE_{u}}{\partial B_{u+1}}= -\tau^{b}_{u}\left( f_{c,u}\frac{\partial c(B_{u+1},K_{u})}{\partial B_{u+1}} + f_{b,u}\right)
\end{equation}

\begin{equation}
\label{eqn:d_te_b}
\frac{\partial TE_{u}}{\partial B_{u}}= -\tau^{b}_{u}\left(f_{i,u}r_{b,u} + f_{p,u} \right)
\end{equation}

\begin{equation}
\label{eqn:d_te_b}
\frac{\partial TE_{u}}{\partial K^{\tau}_{u}}= -\tau^{b}_{u}\left(f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)
\end{equation}

Using these partial derivatives of the tax function with respect to the endogenous variables, we can rewrite the FOCs as:

\begin{equation}
\label{eqn:foc_l_tax}
\begin{split}
 p_{u}MPL_{u} = w_{u}
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_i_tax}
\begin{split}
 & q_{u} + \lambda^{\tau}_{u}(1-\delta^{\tau}_{u})(1-f_{e,u})p^{k}_{u} =  \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u}\right)\left[(1-f_{e,u}\tau^{b}_{u} - \tau^{ic}_{t})p^{k}_{u}+ (1-\tau^{b}_{u})p^{k}_{u}\left(\frac{\partial \Phi_{u}}{\partial I_{u}} + \Phi_{u}\right) \right]
\end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_k_tax}
\begin{split}
 q_{u} & = \left(\frac{1}{1+\theta_{u+1}}\right)\left[(1-\delta)q_{u+1} ... \right. \\
& \left. +  \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u+1} \right)\left[(1-\tau^{b}_{u+1})\left(p_{u+1}MPK_{u+1}- p^{k}_{u+1}\frac{\partial \Phi_{u+1}}{\partial K_{u+1}}I_{u+1}\right)  ... \right.\right. \\
& \left.\left.-(1-f_{c,u+1}\tau^{b}_{u+1}) \frac{\partial c(B_{u+2},K_{u+1})}{\partial K_{u+1}} \right] \right]
\end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_b_tax}
\begin{split}
&  \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u} \right)\left((1-\tau^{b}_{u}f_{b,u})-(1-\tau^{b}_{u}f_{c,u})\frac{\partial c(B_{u+1},K_{u})}{\partial B_{u+1}}\right)= \\
&  \left(\frac{1}{1+\theta_{u+1}}\right) \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u} \right) \left((1+\tau^{b}_{u+1}f_{p,u+1})+(1-\tau^{b}_{u+1}f_{i,u+1})r_{b,u+1}\right)
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_vn_tax}
\begin{split}
1 = \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}} + \lambda^{d}_{u}\right)\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right) + \lambda^{v}_{u}
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_ktau_tax}
\begin{split}
 \lambda^{\tau}_{u} = \left(\frac{1}{1+\theta_{u+1}}\right)\left[\left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u+1} \right)\left(f_{d,u+1}\delta^{\tau}_{u+1}+f_{ace,u+1}r_{ace,u+1}\right)\tau^{b}_{u+1} + \lambda^{\tau}_{u+1}(1-\delta^{\tau}_{u+1})\right]
 \end{split}
\end{equation}

\subsubsection{Optimal Investment Policy}

\ \\
\noindent\noindent \emph{User cost of capital}

Let $ucc_{t}$ denote the user cost of capital of the firm in period $t$.  We define $ucc_{t}$ such that it is equal to the entity-level-tax marginal cash flow from an additional dollar of investment:

\begin{equation}
ucc_{t} = (1-\tau^{b}_{t+1})\left(p_{t+1}MPK_{t+1}-\tau^{p}_{t+1}p^{k}_{t+1}\right)- (1-\tau^{b}_{t+1}) \frac{\partial c(B_{t+2},K_{t+1})}{\partial K_{t+1}}
\end{equation}

We can use Equation \ref{eqn:foc_k_tax} to rewrite the LHS:

\begin{equation}
ucc_{t} =  \left[\left({1+\theta_{u+1}}\right)q_{t} - (1-\delta)q_{u+1}\right] \left(\frac{1-\tau^{d}_{u+1}}{1-\tau^{g}_{u+1}} + \lambda^{d}_{u+1} \right)^{-1}
\end{equation}

Using Equation \ref{eqn:foc_i_tax} we have:

\begin{equation}
\begin{split}
ucc_{t} &=  \left[\left({1+\theta_{u+1}}\right)\left[\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}\right)\left[(1-f_{e,t}\tau^{b}_{t}-\tau^{ic}_{t})p^{k}_{t}+ (1-\tau^{b}_{t})p^{k}_{t}\left(\frac{\partial \Phi_{t}}{\partial I_{t}} + \Phi_{t}\right)\right]... \right.\right. \\
& \left.\left. -\lambda^{\tau}_{t}(1-\delta^{\tau}_{t})(1-f_{e,t})p^{k}_{t}\right] - (1-\delta)\left[\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}\right)... \right.\right. \\
& \left.\left. \times \left[(1-f_{e,t+1}\tau^{b}_{t+1}-\tau^{ic}_{t+1})p^{k}_{t+1}+ (1-\tau^{b}_{t+1})p^{k}_{t+1}\left(\frac{\partial \Phi_{t+1}}{\partial I_{t+1}} + \Phi_{t}\right)\right]... \right.\right. \\
& \left.\left. -\lambda^{\tau}_{t+1}(1-\delta^{\tau}_{t+1})(1-f_{e,t})p^{k}_{t+1}\right]\right] \left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1} \right)^{-1}
\end{split}
\end{equation}

Using Equation \ref{eqn:foc_ktau_tax} and iterating forward, we can find the value of $\lambda^{\tau}$ as:
\begin{equation}
\begin{split}
& \lambda^{\tau}_{t}=\underbrace{\prod_{\nu=t+!}^{\infty}\left(\frac{1}{1+\theta_{\nu}}\right)\lambda^{\tau}_{\infty}}_{=0 \text{ by transversality condition}} + \sum_{u=t+1}^{\infty} \prod_{\nu=t+1}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\\
&\implies  \lambda^{\tau}_{t}= \sum_{u=t+1}^{\infty} \prod_{\nu=t+1}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]
\end{split}
\end{equation}

Substituting in for $\lambda^{\tau}$ and multiplying through we have:

\begin{equation}
\begin{split}
ucc_{t} &=  \left({1+\theta_{u+1}}\right)\left[\left(\frac{\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}}{\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}}\right)\left[(1-f_{e,t}\tau^{b}_{t}-\tau^{ic}_{t})p^{k}_{t}+ (1-\tau^{b}_{t})p^{k}_{t}\left(\frac{\partial \Phi_{t}}{\partial I_{t}} + \Phi_{t}\right)\right]... \right. \\
& \left. -  \left( \sum_{u=t+1}^{\infty} \prod_{\nu=t+1}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\right) (1-\delta^{\tau}_{t})(1-f_{e,t})p^{k}_{t}\right] ...   \\
& - (1-\delta)\left[ \left((1-f_{e,t+1}\tau^{b}_{t+1}-\tau^{ic}_{t+1})p^{k}_{t+1}+ (1-\tau^{b}_{t+1})p^{k}_{t+1}\left(\frac{\partial \Phi_{t+1}}{\partial I_{t+1}} + \Phi_{t}\right)\right] ... \right. \\
& \left. - \left(  \sum_{u=t+2}^{\infty} \prod_{\nu=t+2}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right] \right)(1-\delta^{\tau}_{t+1})(1-f_{e,t})p^{k}_{t+1}\right]
\end{split}
\end{equation}

If taxes are equal to zero, adjustment costs are zero, and the dividend constraint is not binding then this simplifies to:

\begin{equation}
ucc_{t}= (r_{e,t}+ \delta)p^{k}_{t} - (p^{k}_{t}-p^{k}_{t})
\end{equation}

Which is the familiar user cost of capital in models without taxes and frictions affecting investment.  Where the cost of capital is equal to the market rental rate for capital  plus the rate of depreciation, less capital gains from holding capital.\\

\ \\
\noindent\noindent \emph{Optimality Condition for Investment}

We can use Equations \ref{eqn:foc_i_tax}, \ref{eqn:foc_k_tax}, and \ref{eqn:foc_b_tax} to find the optimality condition for investment as:

\begin{equation}
\begin{split}
&\underbrace{ \left[(1-\tau^{b}_{t}f_{e,t}-\tau^{ic}_{t})p^{k}_{t} + \left(\frac{\partial \Phi_{t}}{\partial I_{t}} + \Phi_{t}\right)(1-\tau^{b}_{t})\right]\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}\right)}_{\text{MC of investment}} = \\
& \left(\frac{1}{1+\theta_{t+1}}\right)\left[(1-\delta)q_{t+1}  +  \left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1} \right)\left[(1-\tau^{b}_{t+1})\left(p_{t+1}MPK_{t+1}- p^{k}_{t+1}\frac{\partial \Phi_{t+1}}{\partial K_{t+1}}I_{t+1}\right)  ... \right.\right. \\
& \left.\left.-(1-f_{c,t+1}\tau^{b}_{t+1}) \frac{\partial c(B_{t+2},K_{t+1})}{\partial K_{t+1}} \right] \right] ...\\
&  + (1-\delta^{\tau}_{t})(1-f_{e,t})p^{k}_{t}\left(\sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\right)
\end{split}
\end{equation}

We can solve for $q_{t}$ using Equation \ref{eqn:foc_i_tax} and repeated iteration of Equation \ref{eqn:foc_ktau_tax} to find $\lambda^{\tau}_{t}$:

\begin{equation}
\begin{split}
q_{t+1} & =  \left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}\right)\left[(1-f_{e,t+1}\tau^{b}_{t+1}-\tau^{ic}_{t+1})p^{k}_{t+1}+ (1-\tau^{b}_{t+1})p^{k}_{t+1}\left(\frac{\partial \Phi_{t+1}}{\partial I_{t+1}} + \Phi_{t+1}\right)\right]... \\
&  -  (1-\delta^{\tau}_{t+1})(1-f_{e,t+1})p^{k}_{t+1}\left(\sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\right)
\end{split}
\end{equation}

With this, we rewrite the condition for optimal investment as:

\begin{equation}
\begin{split}
&\underbrace{ \left[(1-\tau^{b}_{t}f_{e,t}-\tau^{ic}_{t})p^{k}_{t} + \left(\frac{\partial \Phi_{t}}{\partial I_{t}} + \Phi_{t}\right)(1-\tau^{b}_{t})\right]\left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}\right)}_{\text{MC of investment}} = \\
& \left(\frac{1}{1+\theta_{t+1}}\right)\left[(1-\delta)\left[\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}\right)\left[(1-f_{e,t+1}\tau^{b}_{t+1}-\tau^{ic}_{t+1})p^{k}_{t+1}+ (1-\tau^{b}_{t+1})p^{k}_{t+1}\left(\frac{\partial \Phi_{t+1}}{\partial I_{t+1}} + \Phi_{t+1}\right)\right]...\right.\right. \\
& \left.\left.  -  (1-\delta^{\tau}_{t+1})(1-f_{e,t+1})p^{k}_{t+1}\left(\sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\right)\right]... \right. \\
& \left. +  \left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1} \right)\left[(1-\tau^{b}_{t+1})\left(p_{t+1}MPK_{t+1}- p^{k}_{t+1}\frac{\partial \Phi_{t+1}}{\partial K_{t+1}}I_{t+1}\right)  ... \right.\right. \\
& \left.\left.-(1-f_{c,t+1}\tau^{b}_{t+1}) \frac{\partial c(B_{t+2},K_{t+1})}{\partial K_{t+1}} \right] \right] ...\\
&  + (1-\delta^{\tau}_{t})(1-f_{e,t})p^{k}_{t}\left(\sum_{u=t}^{\infty} \prod_{\nu=t}^{u}\left(\frac{1}{1+\theta_{\nu}}\right)\left[\left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}+\lambda^{d}_{u}\right)\left( f_{d,u}\delta^{\tau}_{u}+f_{ace,u}r_{ace,u} \right)\tau^{b}_{u}\right]\right)
\end{split}
\end{equation}

A few notes about this condition.  First, if dividend policy does not change from one period to the next (i.e., $\lambda^{d}_{t}=\lambda^{d}_{t+1}$ for all $t$), and if the ratio of the net of tax rates for dividend and capital gains income does not change (i.e., $\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}}=\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}}$ for all $t$), then dividend taxes have no impact on investment.  This corresponds to the ``new view" of dividend taxation.  In this case, dividend taxes have no effect on investment decisions whether that investment is financed by retained earnings or not.  The key is that the marginal source of finance is constant (i.e., $\lambda^{d}_{t}=\lambda^{d}_{t+1}$, for all $t$) .  Instead, dividend taxes are capitalized into the value of the firm, but has no effect on marginal investment decisions.  The second thing to note is that in the absence of taxes and investment frictions and with the prices of capital and output normalized to one, we get the familiar optimal condition for investment  $r=MPK-\delta$.

\subsubsection{Optimal Financial Policy}

\begin{proposition}
\label{prop:vn_div}
New equity issues and dividend distributions will not both be positive if the capital gains tax rate is less than the dividends tax rate (i.e., if $\tau^{g}_{u}<\tau^{d}_{u}$).
\end{proposition}

\begin{proof}
Suppose that $DIV_{u}>0$ and $VN_{u}>0$, then Equation \ref{eqn:foc_vn} simplifies to:
 \begin{equation}
\label{eqn:foc_vn_pos}
 1 = \left(\frac{1-\tau^{d}_{u}}{1-\tau^{g}_{u}}\right)\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right)
 \end{equation}

Which implies that :
  \begin{equation}
  \label{eqn:foc_vn_pos2}
 1-\tau^{g}_{u} = (1-\tau^{d}_{u})\left(1-\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\right)
 \end{equation}

But Equation \ref{eqn:foc_vn_pos2} can't hold if $\tau^{g}_{u}<\tau^{d}_{u}$, because so long as $\frac{\partial \Psi(VN_{u})}{\partial VN_{u}}\geq0$, then the left hand side of the equality exceeds the right hand side.  Thus, firms will never both issue equity and distribute dividends in the same period.
\end{proof}

In fact, we do observe firms in the data do both, and the behavior has been terms the ``dividend puzzle".  To model this, you need to suppose some capital market imperfections that our model abstracts from.

Note that if $\tau^{g}_{u}>\tau^{d}_{u}$, firms may issue new equity and distribute dividends.  If the marginal costs of new equity issues is increase, firms will issue new equity up to the point that the marginal cost of new equity (through dilution of after-tax capital gains to current share holders) is equal to the marginal benefit (the after-tax dividend income to current shareholders).  If marginal costs to new equity issues are flat or constant, we are in one of two cases.  The first is where costs are relatively high (relative to the differential in capital gains and dividend taxes) and firms never issues dividends and new equity in the same period.  The second is where costs are relatively low and no equilibrium exists.  In this case, the marginal benefits of new equity issues always exceed the marginal costs and so they firm issues infinite amounts of new equity to finance dividend distributions.\\

\ \\

\noindent\noindent \emph{The Marginal Cost of Finance}

\textcolor{red}{Is there a way to write the marginal cost of finance?  Is it always the same?  I see it changing as the source of financing changes between debt, equity, and retained earnings.}

If the firm's marginal source of finance is debt, then the marginal cost of finance is given by:

\begin{equation}
\begin{split}
mcf_{b,t} & = \left(\frac{1}{1+\theta_{t+1}}\right)\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}\right)\left((1-\tau^{b}_{t+1}f_{i,t+1})r_{b,t+1}+(1-\tau^{b}_{t+1}f_{p,t+1})\right)... \\
& + \left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}\right)(1-\tau^{b}_{t})\frac{\partial c(B_{t+1},K_{t})}{\partial B_{t+1}}
\end{split}
\end{equation}

\textcolor{red}{Can we determine when/if a firm will raise debt and distribute dividends?  It's a bit harder here since the firm can lend (i.e., hold negative debt), but there should be some condition on the benefits to a dollar inside of the firm versus a dollar of debt.  For example, if $mcf_{b,t}>1$, then the firm does not both issue debt and distribute dividends.}

\textcolor{red}{Since the opportunity cost of using retained earnings for investment is that it can't be lent out (where it earns a rate of return $r_{b,t}$), isn't the marginal cost of finance from retained earnings similar to the above?  Or at least something like the following (which explicitly shows that the cost of debt is asymmetric (i.e., the cost is zero when lending):}

\begin{equation}
mcf_{re,t} =  \left(\frac{1}{1+\theta_{t+1}}\right)\left(\frac{1-\tau^{d}_{t+1}}{1-\tau^{g}_{t+1}} + \lambda^{d}_{t+1}\right)(1-\tau^{b}_{t+1}r_{b,t+1}
\end{equation}

The marginal cost of equity finance is given by the dilution of shareholder value plus the costs due to financial frictions that lower the amount raised that can be used for investment:

\begin{equation}
mcf_{e,t} =  1+ \left(\frac{1-\tau^{d}_{t}}{1-\tau^{g}_{t}} + \lambda^{d}_{t}\right)\frac{\partial \Psi(VN_{t})}{\partial VN_{t}}
\end{equation}

If use external finance, the firm may use both debt and equity. If this is the case, then their marginal costs must be equivalent in equilibrium.

\textcolor{red}{HOW DOES THIS FINANCIAL POLICY FIT WITH INVESTMENT POLICY?  I think that the FOCs for investment and labor demand determine the amount of labor and capital.  Then financing is determined by what is needed finance the purchase of these factors of production. Where the firm using the cheaper source until it is exhausted or it's marginal cost equals that of the other sources.  However, it seems like there marginal costs of finance would be important in determining the investment policy (e.g., if financing is cheaper, then you invest more...).  Is that all contained in $\lambda^{d}_{t}$?}

\subsection{Firm Policy in the Steady State}

In the steady state, the first order conditions of the firm look like the following:

\begin{equation}
\label{eqn:foc_l_ss}
 \bar{p}\overline{MPL} - \frac{\partial \overline{TE}}{\partial \overline{EL}}= \bar{w}
\end{equation}

 \begin{equation}
\label{eqn:foc_i_ss}
\bar{q} + \bar{\lambda}^{\tau}(1-\bar{\delta}^{\tau})(1-\bar{f}_{e})\bar{p}^{k} =  \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d}\right)\left[\bar{p}^{k}(1 + \frac{\partial \overline{TE}}{\partial \bar{I}}\right]
\end{equation}

 \begin{equation}
\label{eqn:foc_k_ss}
\bar{q}_{u} = \left(\frac{1}{\bar{\theta}+\delta}\right) \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d} \right)\left[\bar{p}\overline{MPK} - \frac{\partial c(\bar{B},\bar{K})}{\partial \bar{K}}-\bar{\tau}^{p}\bar{p}^{k}-\frac{\partial \overline{TE}}{\partial \bar{K}} \right]
\end{equation}

 \begin{equation}
\label{eqn:foc_b_ss}
\left(1-\frac{\partial c(\bar{B},\bar{K})}{\partial \bar{B}}-\frac{\partial \overline{TE}}{\partial \bar{B}}\right)=   \left(\frac{1}{1+\bar{\theta}}\right) \left((1+\bar{r}_{b})+\frac{\partial \overline{TE}}{\partial \bar{B}}\right)
\end{equation}

 \begin{equation}
\label{eqn:foc_vn_ss}
 1 = \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d}\right)\left(1-\frac{\partial \Psi(\overline{VN})}{\partial \overline{VN}}\right) + \bar{\lambda}^{v}
\end{equation}

 \begin{equation}
\label{eqn:foc_ktau_ss}
 \bar{\lambda}^{\tau} = -  \left(\frac{1}{\bar{\theta}+\bar{\delta}^{\tau}}\right)\left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d} \right)\frac{\partial \overline{TE}}{\partial \bar{K}^{\tau}}
\end{equation}

Using these partial derivatives of the tax function with respect to the endogenous variables in the SS, we can rewrite the FOCs as:

\begin{equation}
\label{eqn:foc_l_tax_ss}
\begin{split}
 \bar{p}\overline{MPL} = \bar{w}
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_i_tax_ss}
\begin{split}
 & \bar{q} + \bar{\lambda}^{\tau}(1-\bar{\delta}^{\tau})(1-\bar{f}_{e})\bar{p}^{k} =  \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d}\right)\left[(1-\bar{f}_{e}\bar{\tau}^{b}-\bar{\tau}^{ic})\bar{p}^{k}\right]
\end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_k_tax_ss}
\begin{split}
\bar{q}_{u} = \left(\frac{1}{\bar{\theta}+\delta}\right) \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d} \right)\left[(1-\bar{\tau}^{b})\left(\bar{p}\overline{MPK}\right)-(1-\bar{f}_{c}\bar{\tau}^{b}) \frac{\partial c(\bar{B},\bar{K})}{\partial \bar{K}} \right]
\end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_b_tax}
\begin{split}
 \left((1-\bar{\tau}^{b}\bar{f}_{b})-(1-\bar{\tau}^{b}\bar{f}_{c})\frac{\partial c(\bar{B}_{u},\bar{K})}{\partial \bar{B}}\right)=  \left(\frac{1}{1+\bar{\theta}}\right) \left((1+\bar{\tau}^{b}\bar{f}_{p})+(1-\bar{\tau}^{b}\bar{f}_{i})\bar{r}_{b}\right)
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_vn_tax_ss}
\begin{split}
 1 = \left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d}\right)\left(1-\frac{\partial \Psi(\overline{VN})}{\partial \overline{VN}}\right) + \bar{\lambda}^{v}
 \end{split}
\end{equation}

 \begin{equation}
\label{eqn:foc_ktau_tax_ss}
\begin{split}
 \bar{\lambda}^{\tau} =  \left(\frac{1}{\bar{\theta}+\bar{\delta}^{\tau}}\right)\left(\frac{1-\bar{\tau}^{d}}{1-\bar{\tau}^{g}} + \bar{\lambda}^{d} \right)\bar{\tau}^{b}\left(\bar{f}_{d}\bar{\delta}^{\tau}+\bar{f}_{ace}\bar{r}_{ace}\right)
 \end{split}
\end{equation}

We also can write the laws of motion for the physical and fiscal capital stocks in the steady state as:

\begin{equation}
\label{eqn:lom_k_ss}
\bar{I}=\delta\bar{K}
\end{equation}

\begin{equation}
\label{eqn:lom_ktau_ss}
\bar{K}^{\tau}=(1-\bar{f}_{e})\bar{p}^{k}\bar{K}
\end{equation}

In equilibrium, firm value must be positive.  This implies that $\overline{DIV}>\overline{VN}$.  As shown in Proposition \ref{prop:vn_div}, if $\bar{\tau}^{g}<\bar{\tau}^{d}$, the firm will not both issue new equity and distribute dividends.  Therefore, if $\bar{\tau}^{g}<\bar{\tau}^{d}$ we know that $\overline{DIV}>0$ and $\overline{VN}=0$.  The means that $\bar{\lambda}^{v}>0$ and $\bar{\lambda}^{d}=0$.

\subsubsection{Solving for the Steady State}

By the above argument, we know that $\overline{DIV}>0$ and $\overline{VN}=0$.  Therefore $\bar{\lambda}^{d}=0$ .  We can thus solve for $\bar{\lambda}^{v}$ by Equation \ref{eqn:foc_vn_tax_ss} and $\bar{\lambda}^{\tau}$ by Equation \ref{eqn:foc_ktau_tax_ss}.  With these in hand, we can then solve for $\bar{q}(\bar{p}^{k})$ from Equation \ref{eqn:foc_i_tax_ss}.  Equations \ref{eqn:foc_l_tax_ss}, \ref{eqn:foc_k_tax_ss}, and \ref{eqn:foc_b_tax_ss} then imply $\bar{EL}$, $\bar{K}$, $\bar{B}$ as functions of $\bar{p}^{k}$ and $\bar{p}$.    We can then use the laws of motion (Equations \ref{eqn:lom_k_ss} and \ref{eqn:lom_ktau_ss}) to get $\bar{I}$ and $\bar{K}^{\tau}$ as functions of the input and output prices.  \textcolor{red}{The key is then to solve for the output prices as a function of the parameters and factor input prices ($\bar{r}_{b}$, $\bar{r}_{e}$ and $\bar{w}$).  To do this, we need to use the assumption of free entry and that prices equals marginal cost in equilibrium???}.  With the output price in hand, we use the fixed coefficient matrix relating industry outputs to industry inputs to find $\bar{p}^{k}$.  We are then able so solve the system of equations for given factor prices.

\section{The Problem of the Multinational Parent Corporation}

The problem of the multinational parent corporation will be defined similarly to that of the domestic corporation.  In particular, the functional forms for the production function and financial frictions will remain the same, though parameter values may differ.  What differs for the multinational parent is it's relations with foreign subsidiaries.  The parent provides intermediate inputs to the foreign subsidiaries and can choose the price at which these transactions occur.  This ability to engage in transfer pricing allows the multinational to lower it's worldwide tax liability by shifting net income to low tax jurisdictions.  Second, the parent can engage in more general income shifting by moving profits to tax havens.  The ability to shift income in this way captures the ability of corporations to shift income through other mechanisms that we do not explicitly model.  Finally, multinational corporations face a discrete location choice with respect to a firm-specific fixed factor of production.

\subsection{Firm Production}

Firm's combine capital, $K$, and effective labor, $EL$, with a location-specific fixed factor of production, $A$, and firm-specific fixed-factor of production, $H$, to produce output, $X$.  We can think of the location-specific fixed factor of production as ``location specific capital".  It is fixed in the sense that its supply is perfectly inelastic.  It is location specific in the sense that it is proportional to the size of the population in the firm's home country at time $t$. \textcolor{red}{CORTAX documentation at first suggests this factor is chosen optimally by the firm, but there is not first order condition for this choice shown.  The documentation does state that this factor is paid its marginal product.  So there are only economic profits before you account for the return to this factor of production.  I'm also not sure if we need this fixed factor of production to be proportional to the population.  CORTAX says yes so that you don't have productivity differential arising from differences in country size.  They consider multi-country model, but only steady state.  Do we need something similar so productivity doesn't depend upon population at time $t$?}  The firm-specific fixed factor of production can be thought of as intangibles, such as patents or trade secrets the firms has.  These intangibles earn economic rents and can easily be transfered to different tax jurisdictions (\textcolor{red}{Is this what we want to think of it as?  Then you'd think it could affect productivity not just in the country is is located.  Also, we need to be very careful about how to enter this into the model.  In particular, we don't want to have to keep track of the capital and labor entering into production functions in other counties as CORTAX does.}).  We write the amount of output produced in the home country as a function of this fixed factor and the value added, $VA$, from the input of capital and labor:

\begin{equation}
X_{t} = A_{t}H_{t}^{\alpha_{H}}(VA_{t})^{\alpha_{v}},
\end{equation}

\noindent\noindent where $\alpha_{v}$ is the share of output attributable to the firm's value added and $\alpha_{H}$ is the share of output attributable to the firm-specific capital. The location-specific fixed factor of production is given by:

\begin{equation}
A_{t} = (A_{0,t}\omega_{t}N_{t})^{1-\alpha_{H}-\alpha_{v}}
\end{equation}

\noindent\noindent Thus the input from fixed factor of production used by the firm is given by the level of total factor productivity (TFP), $A_{0,t}$, and a exogenous share of the population, $N_{t}$ where the share is given by the parameter $\omega_{t}$ (\textcolor{red}{Not sure if we want this to vary by time, or just across production industry.}).  The share parameters must sum to one.  That is, $\sum_{m=1}^{M} \omega_{m,t} = 1$.     We assume that TFP grows at the same rate across industry, with the growth rate given by $g_{a}$.  The value added is given by a CES function:

\begin{equation}
\label{eqn:prod_fun}
F(A_{0,t},K_{t},EL_{t})=VA_{t} =A_{0,t} \left[(\gamma_{})^{1/\epsilon_{}}(K_{t})^{(\epsilon-1)/\epsilon_{}}+(1-\gamma_{})^{1/\epsilon_{}}(e^{g_{y}t}EL_{t})^{(\epsilon_{}-1)/\epsilon_{}}\right]^{(\epsilon_{}/(\epsilon_{}-1))},
\end{equation}

\subsection{Firm Accounting}

The multinational corporation is going to maximize firm value, which is determined by its worldwide after-tax profit.  Thus we' will need to define domestic and foreign profits.

\subsubsection{Domestic Profits}

After-tax US profits from a financial accounting perspective are:

\begin{equation}
\label{eqn:profit_book_mnc_us}
\begin{split}
\Pi^{US,book}_{t} = & p_{t}X_{t}+\underbrace{(p_{row,t}-1)Q_{row,t}-c^{q}(Q_{row,t})}_{\text{Transfer pricing}}-w_{t}EL_{t}-\delta K_{t} -\Phi_{t}p^{k}_{t}I_{t}-(1+r_{b,t})B_{t}- c(B_{t+1},K_{t})...\\
& -\tau^{p}_{t}K_{t}-TE(\tilde{\Pi}^{US, tax}_{t})
\end{split}
\end{equation}

Transfer pricing operates through the multinational charging its subsidiaries in the rest of the world a price $p_{row,t}$ for one dollar of intermediate good.  The variable $Q_{row,t}$ denotes the quantity of intermediate goods (in dollars) that the firm sells/buys from its subsidiaries in the rest of the world.  There is a cost to transfer pricing, given by the function $c^{q}(Q_{row,t})$.

Note that total taxes, $TE$ are a function of taxable income after profit shifting, $\tilde{\Pi}^{US, tax}_{t}$. We define the firm's US profits from a tax accounting perspective as:
\begin{equation}
\label{eqn:profit_tax}
\begin{split}
\Pi^{US, tax}_{t}= & p_{t}X_{t}+\underbrace{(p_{row,t}-1)Q_{row,t}-c^{q}(Q_{row,t})}_{\text{Transfer pricing}}-w_{t}EL_{t}-f_{e,t}p^{K}_{t}I_{t}-\Phi_{t}I_{t}-f_{i,t}r_{b,t}B_{t}...\\
& -f_{c,t}c(B_{t+1},K_{t})+f_{p,t}\delta B_{t}+ f_{b,t}B_{t+1}-f_{d,t}\delta^{\tau}_{t}K^{\tau}_{t}-f_{ace,t}r_{ace,t}K^{\tau}_{t}-\tau^{p}_{t}p^{k}_{t}K_{t}
\end{split}
\end{equation}

We let $\theta$ be the amount of profits shifted overseas.  Thus, $\tilde{\Pi}^{US, tax}_{t}=\theta \Pi^{US, tax}_{t}$.  Shifting profits comes a a cost, $c^{ps}(\theta)$.  This cost function is a convex function so that the marginal cost of shifting income is increasing and will make it infinitely expensive to shift 100\% of profits.

\subsubsection{Foreign Profits}

Our model does not capture the the rich detail of production in each country.  Instead, we take the component of foreign profits due to foreign economic activity as exogenous.  We define two foreign jurisdictions.  The ``rest of the world" refers to non-tax haven countries.  Thus we bifurcate foreign economies into tax havens and non-tax havens.  We assume that transfer pricing activities tax place with corporate subsidiaries in the ``rest of the world", which we think of as trading partners.  Profit shifting activities represent interactions with tax havens.  We let pre-tax foreign earnings in period $t$ be defined as $EARN^{row}_{t}$ and $EARN^{h}_{t}$ for the rest of the world and tax haven jurisdictions, repsectively.  Foreign after-tax profits from an accounting perspective are thus defined as:

\begin{equation}
\label{eqn:profit_book_mnc_row}
\begin{split}
&\Pi^{row,book}_{t} =EARN^{row}_{t} - (p_{row,t}-1)Q_{row,t} - TE^{row}_{t}(\Pi^{row, tax}_{t})\\
&\text{and} \\
&\Pi^{h,book}_{t} EARN^{h}_{t} +  \theta\Pi^{US,book}_{t} - TE^{h}_{t}(\tilde{\Pi}^{h, tax}_{t}),
\end{split}
\end{equation}

where
\begin{equation}
\label{eqn:profit_tax_mnc_row}
\begin{split}
&\Pi^{row, tax}_{t} = EARN^{row}_{t} - (p_{row,t}-1)Q_{row,t}\\
&\text{and} \\
&\Pi^{h, tax}_{t} = EARN^{h}_{t} \\
&\text{and} \\
&\tilde{\Pi}^{h, tax}_{t}=   EARN^{h}_{t} + (1-\theta)\Pi^{US,tax}_{t},
\end{split}
\end{equation}

\subsubsection{Multinational Cash Flow}

The multinational's cash flow is defined by the sum of its profits at home and abroad:

\begin{equation}
\label{eqn:cash_flow_mnc}
\begin{split}
DIV_{t} = &  \underbrace{(1-\theta)\Pi^{US,book}_{t}}_{\text{After tax domestic profits}} + \underbrace{\Pi^{row,book}_{t}  + \Pi^{h,book}_{t}}_{\text{After tax foreign profits}} + B_{t+1} + VN_{t}
\end{split}
\end{equation}

Note that the above formulation makes some implicit assumptions about accounting rules.  The most relevant of which is that a dollar of taxable income shifted from the US equals one dollar of taxable income abroad.

The foreign tax functions are:

\begin{equation}
\label{eqn:foreign_tax_row}
TE^{row}_{t}(EARN^{row}_{t}- (p_{row,t}-1)Q_{row,t}) = \tau^{b,row}_{t}(EARN^{row}_{t} -  (p_{row,t}-1)Q_{row,t}),
\end{equation}

\begin{equation}
\label{eqn:foreign_tax_h}
TE^{h}_{t}(EARN^{h}_{t} + \theta\Pi^{US,tax}_{t}) = \tau^{b,h}_{t}(EARN^{h}_{t}  + \theta\Pi^{US,tax}_{t}),
\end{equation}

\noindent\noindent where $\tau^{b,row}_{t}$ and $\tau^{b,h}_{t}$ is the marginal effective tax rate on foreign profits in the non-tax haven and tax haven jurisdictions.  \textcolor{red}{Note about calibration: We likely calculate these as a weighted average of the corporate income tax rate on trading partners for firms in a given industry (for the rest of world) and to a rate amongst tax havens (probably zero).}

Letting $\Pi^{x,pre}_{t}$ denote pre-tax (and pre-transfer pricing) accounting profits in jurisdiction $x$ in period $t$, we can rewrite the firm's cash flow constraint as:

\begin{equation}
\label{eqn:cash_flow_mnc2}
\begin{split}
DIV_{t} = &  (1-\theta)\Pi^{US,pre}_{t} + (p_{row,t}-1)Q_{row,t}  - \tau^{b,US}_{t}((1-\theta)\Pi^{US,tax}_{t}) + \tau^{ic}_{t}p^{k}_{t}I_{t} ... \\
& + \Pi^{row,pre}_{t}- (p_{row,t}-1)Q_{row,t} - \tau^{b,row}_{t}\Pi^{row,tax}_{t} ...\\
& + \Pi^{h,pre}_{t}- \tau^{b,row}_{t}(\Pi^{h,tax}_{t} + \theta\Pi^{US,tax}_{t}) + B_{t+1} + VN_{t} \\
     = & \Pi^{US,pre}_{t} + EARN^{row}_{t} + EARN^{h}_{t} - ((1-\theta)\tau^{b,US}_{t} + \theta\tau^{b,h}_{t})\Pi^{US,tax}_{t} ...\\
     & + \tau^{b,row}(p_{row,t}-1)Q_{row,t} + \tau^{ic}_{t}p^{k}_{t}I_{t}   - \tau^{b,row}_{t}(EARN^{row}_{t}) - \tau^{b,h}_{t}(EARN^{h}_{t})  + B_{t+1} + VN_{t}
\end{split}
\end{equation}

\textcolor{red}{What about repatriation?  Do we need to wall off foreign profits from domestic dividends (or for use for domestic investment) unless they are subjected to the US tax?  Or should we assume they are freely available since the firm can use intracompany debt to move them?  If the latter, there should be some cost of this - a cost which is affected by policies on intracompany debt.  If the former, we'll need to keep track of the stock of foreign earnings.}

\textcolor{red}{Also, should we think about foreign tax credits in the above?  If repatriation, yes.  Then need to think about stock of earnings in tax havens and not...}

\subsubsection{Discrete Location Choice}

Recall the production function:

\begin{equation}
X_{i,t} = (A_{0,i,t}\omega_{i,t}N_{i,t})^{1-\alpha_{v}-\alpha_{H}}H_{i,t}^{\alpha_{H}}VA_{i,t}^{\alpha_{v}},
\end{equation}

\noindent\noindent where $i$ denotes the country and $H$ is the firm-specific capital that is mobile across countries.  We will assume that there are no adjustment costs associated with moving $H$.  This is helpful so that we do not need to keep track on the amount of firm-specific capital in the various tax jurisdictions.  It may therefore be best to think of this capital as firm-specific intangible capital like patents, brandnames, and managerial talent that may be relocated at relatively low cost. \textcolor{red}{One problem with this interpretation is that it would seem that the effect of $H$ could affect the firm's subsidiaries in all countries - regardless of where is was located.}

\textcolor{red}{\citet{DD2009} separate this decision from all others by showing that $H$ will be distributed in a way that is proportional to the tax rates and amount of capital and labor employed across countries.  Can we do this?  Seems like you need to choose $H$ jointly with $K$, and $EL$ since $H$ affects marginal productivities of these... But can you separate given the functional form of the production function?}

Note that we don't want to have to track the capital and labor employed abroad.  But with the functional form of this production function, we don't have to.  Consider:

\begin{equation}
\begin{split}
 EARN_{i,t}=p_{i,t}X_{i,t} = p_{i,t}(A_{0,i,t}\omega_{i,t}N_{i,t})^{1-\alpha_{v}-\alpha_{H}}H_{i,t}^{\alpha_{H}}VA_{i,t}^{\alpha_{v}} \\
\end{split}
\end{equation}

If we increase $H$ by a factor of $\lambda$ we increase earnings by $\lambda^{\alpha_{H}}$:
\begin{equation}
\begin{split}
X2_{i,t} = (A_{0,i,t}\omega_{i,t}N_{i,t})^{1-\alpha_{v}-\alpha_{H}}(\lambda H_{i,t})^{\alpha_{H}}VA_{i,t}^{\alpha_{v}} \\
X2_{i,t} = (A_{0,i,t}\omega_{i,t}N_{i,t})^{1-\alpha_{v}-\alpha_{H}}\lambda^{\alpha_{H}} H_{i,t}^{\alpha_{H}}VA_{i,t}^{\alpha_{v}} \\
X2_{i,t} = \lambda^{\alpha_{H}}(A_{0,i,t}\omega_{i,t}N_{i,t})^{1-\alpha_{v}-\alpha_{H}} H_{i,t}^{\alpha_{H}}VA_{i,t}^{\alpha_{v}} \\
X2_{i,t} = \lambda^{\alpha_{H}}X_{i,t}
\end{split}
\end{equation}

Thus, we can just increase foreign pre-tax earnings by the amount that $H$ is shifted to that jurisdiction.

\subsubsection{Why 3 ways to shift profits?}

There are three ways that multinational firms can shift income across tax jurisdictions:
\begin{enumerate}
\item Transfer pricing
\item Shifting of profits
\item Location of firm-specific capital
\end{enumerate}

There three all differ in how they affect the firm.  Transfer pricing and profit shifting affect firm profits in very similar ways.  The fundamental difference between the two in the model is the effective tax rate the shifted income faces.  We assume that transfer pricing is done with trading partners and therefore faces the tax rate $\tau^{b,row}$.  On the other hand, profit shifting is doing to a particularly low tax jurisdiction and faces a rate that applies to tax havens, $\tau^{b,h}$.  If the US corporate rate would drop, this relieves pressure on transfer pricing to a greater degree than profit shifting because of the differences in rates between tax haven and non-tax haven countries (the tax haven's having very low rates).

The third channel through which firms can shift profits is by locating firm-specific capital abroad.  The movement of this capital not only affects income, but affects firm productivity in domestic and foreign jurisdictions.  That is to say that this form of profit shifting will have direct equilibrium effects on the pre-tax returns to labor and capital.  It should also be the cast that this discrete locational choice is based on average tax rates, rather than marginal tax rates.  \textcolor{red}{Not sure if the model has is set up this way.}

\section{Multinational Subsidiaries}

I think we can get away with the exogenous foreign pre-tax earnings as noted above and we do not need to model foreign subs.  We can also probably get away with just one firm per production industry with a level of exogenous foreign activity that varies across industry.  We can also have the parameters of income shifting vary across industry to match observed income shifting activity across sectors.

    \section{Relating Firm Investment and Production Goods}\label{sec:prod_invest_map}

    Our model contains $M$ production industries, each of which chooses investment that is a composite good from these production processes.  We denote the quantity of production good $m$ in period $t$ as $X_{m,t}$.  We relate the output of the production sectors to their inputs using a fixed coefficient model. That is, each investment good is made up of a mix of the outputs of different production sectors.  This means that the composition of these investment goods do not respond to prices.  The weights that determine the mix for each consumption goods are given in the matrix $\Xi$.  Element $\xi_{j,m}$ of the matrix $\Xi$ corresponds to the percentage contribute of the output of industry $m$ in the production of the investment good for industry $j$.  The total supply of investment good $j$ in the economy at time $t$ is thus given by:

             \begin{equation} \label{eqn:mix_cons}
             I_{j,t} = \sum_{m=1}^{M}\xi_{j,m}X_{m,t}
    	\end{equation}

	And thus the price of a unit of investment good for industry $m$ at time $t$ is:

             \begin{equation} \label{eqn:mix_cons_price}
             p^{K}_{j,t} = \sum_{m=1}^{M}\xi_{j,m}p_{m,t},
    	\end{equation}

    Where $p_{m}$ is the price of output of production sector $m$ at time $t$.