  A stochastic approach for charge transport in diodes is developed in
consistency with the laws of electricity, thermodynamics, and
microreversibility. In this approach, the electron and hole densities are ruled
by diffusion-reaction stochastic partial differential equations and the
electric field generated by the charges is determined with the Poisson
equation. These equations are discretized in space for the numerical
simulations of the mean density profiles, the mean electric potential, and the
current-voltage characteristics. Moreover, the full counting statistics of the
carrier current and the measured total current including the contribution of
the displacement current are investigated. On the basis of local detailed
balance, the fluctuation theorem is shown to hold for both currents.
