address: *Princeton Plasma Physics Laboratory, Princeton University, Princeton, New Jersey 08543, USA*
author: C. Swanson, P. Jandovitz, and S. A. Cohen
*Princeton Plasma Physics Laboratory, Princeton University, Princeton, New Jersey 08543, USA*
date: December 7, 2017
title: Using Poisson-regularized inversion of Bremsstrahlung emission to extract full EEDFs from x-ray pulse-height detector data

# Abstract

We measured Electron Energy Distribution Functions (EEDFs) from below 200 eV to over 8 keV and spanning five orders-of-magnitude in intensity, produced in a low-power, RF-heated, tandem mirror discharge in the PFRC-II apparatus. The EEDF was obtained from the x-ray energy distribution function (XEDF) using a novel Poisson-regularized spectrum inversion algorithm applied to pulse-height spectra that included both Bremsstrahlung and line emissions. The XEDF was measured using a specially calibrated Amptek Silicon Drift Detector (SDD) pulse-height system with 125 eV FWHM at 5.9 keV.

# Introduction

X-ray diagnostics used in the study of laboratory and astrophysical plasmas generally fall into two categories: well energy-resolved but narrow energy range spectrometers, such as crystal spectrometers, and poorly energy-resolved but wide energy range spectrometers, such as pulse-height detectors. While crystal spectrometers may achieve relative energy resolution (ratio of resolution to energy) better than $10^{-4}$, they are typically limited to $10^{-2}$ (very narrow) in relative energy range (ratio of lowest energy to highest energy). Pulse-height detectors, on the other hand, may achieve $10^3$ in dynamic energy range, capturing useful data from below 100 eV to their maximum value, often well over 100 keV. However, their relative energy resolution is usually limited to $>2\%$ and may be much poorer.

While diagnostic analyses which rely on atomic line emission of x-rays are well suited by crystal spectrometers, analyses which rely on broad-spectrum emission, such as Bremsstrahlung, are better suited by pulse-height detectors. Furthermore, while line-emission analyses are restricted to a finite set of $N$ degrees-of-freedom, specifically line positions, intensities, and FWHMs, from which to draw $\leq N$ parameters about the target ions, *i.e.,* temperatures, densities, and velocities, broad-spectrum analyses have a 1-D continuous degree-of-freedom from which a 1-D continuous parameter such as an energy distribution function may be drawn about the incident electrons.

One application of pulse-height-detector measurements has been the RHESSI solar observation satellite. RHESSI includes nine Germanium pulse-height x-ray detectors (GeD) which are used to energy- and angularly-resolve x-ray emissions from solar flares. To determine the Electron Energy Distribution Function (EEDF) from the X-ray Energy Distribution Function (XEDF), the most accurate and useful algorithm thus far has been the specific variety of Tikhonov-regularized inversion described by Piana, *et al.* and favorably evaluated by Brown, *et al.* RHESSI represents a best-case scenario for high-quality pulse-height x-ray detectors: a) the RHESSI data is devoid of spectral lines; b) spans three orders-of-magnitude in energy; c) is energy-resolved to better than $1\%$; and d) has enough counts to make counting (Poisson) error a minor part of the total error.

Our own plasma physics research and other terrestrial fusion-related plasmas provide less ideal conditions for recording pulse-height x-ray spectra. The spectrum may be complicated by spectral lines, lower count rates, and narrower energy ranges than those observed by RHESSI. Under these more challenging conditions and in the range of interest, with a relative energy resolution of $\sim10\%$, there may be several spectral lines obscuring sections of the Bremsstrahlung spectrum, the detector range may span a factor of 100 in energy, and counting statistics may make up the majority of the uncertainty. Because of this, we have developed an algorithm to perform a spectral inversion of XEDF to EEDF which is more resilient to low resolution, spectral lines, and poor counting statistics. The difference in algorithms comes mostly from the cost-function. In Piana's Tikhonov-regularized inversion, a high-dimensional fit is performed to minimize a cost function which corresponds to finding the Maximum *A Posteriori* (MAP) solution given that the measurements are Gaussian random variables. In our Poisson-regularized inversion, a high-dimensional fit is performed to minimize a cost function which corresponds to finding the MAP solution given that the measurements are Poisson random variables with non-negative mean values. Accurate calibration of the detector across the entire energy range is essential.

In this study we use an Amptek X-123 Fast SDD , which is a Silicon Drift Detector (SDD) pulse-height x-ray detector to diagnose a plasma with a significant electron component at $\sim 300$ eV. The plasma is produced by a double-saddle antenna at one end of a tandem mirror plasma in the PFRC-II. Up to $\sim 500$ W are transmitted to produce a plasma which has a cold, denser bulk component and a hot, tenuous component. The origin of the hot component is discussed in our previous publication . Extracting EEDF data from XEDF data is critical to understanding the physics processes responsible for electron confinement, loss, and energization.

# Poisson-Regularized Inversion

Poisson-regularized inversion is most easily understood from the direction of Least-Squares method of curve fitting (LSF). It may be shown that the Least Squares solution to a fitting problem is the solution which has the Maximum *A Posteriori* (MAP) probability assuming that the measurements are Gaussian-distributed random variables centered on some function of the model vector. Bayes's Theorem is used to determine which model vector ($\vec{a}$) has the highest probability given the observation vectors ($\vec{b}$)

$$P(\vec{a}|\vec{b})=\frac{P(\vec{b}|\vec{a})\cdot P(\vec{a})}{P(\vec{b})}$$ where $P(q)$ is the probability of event $q$, and $P(q|p)$ is the probability of event $q$ given that event $p$ is true. Interpreting this in the context of spectral inversion, $\vec{a}$ is the vector of discretized EEDF values and $\vec{b}$ is the vector of observed x-ray counts.

This is an optimization problem in $\vec{a}$. Assuming that the prior ($P(\vec{a})$) is uniform, $P(\vec{a}|\vec{b}) \propto P(\vec{b}|\vec{a})$. In LSF, the measurements ($\vec{b}$) are assumed to have Gaussian probability density function centered on some function of the model vector $\vec{l}(\vec{a})$. Interpreting this as a spectral inversion problem, $\vec{l}(\vec{a})$ is the *expected* Bremsstrahlung measurement given a model EEDF, and the measurements are imperfect.

$$\label{eq:gauslikelihood}
P_{Gaus}(\vec{b}|\vec{a}) = \prod_i \frac{1}{\sqrt{2\pi \sigma_i}}e^{-\frac{(b_i-l_i(\vec{a}))^2}{2 \sigma^2_i}}$$

As the logarithmic function is monotonic in its argument, maximizing Equation with respect to $\vec{a}$ is the same as minimizing the negative logarithm (the log-likelihood)

$$\label{eq:gauscost}
min(-\ln P_{Gaus}(\vec{b}|\vec{a})) = min(\sum_i \frac{(b_i-l_i(\vec{a}))^2}{2 \sigma^2_i})$$

The $\vec{a}$ at which this is achieved is said to be the LSF solution or the $\chi^2$ minimum solution. Tikhonov regularization, as used by Piana for spectral inversion, combines this cost function and a set of priors that allows the absolute amplitude, slope, curvature, etc. to be constrained, if desired.

If we wished to find the equivalent of Equation for measurements $\vec{b}$ distributed as Poisson random variables around some function of the model $\vec{l}(\vec{a})$, we would find that

$$\label{eq:poislikelihood}
P_{Pois}(\vec{b}|\vec{a}) = \prod_i \frac{[l_i(\vec{a})]^{b_i} e^{-l_i(\vec{a})}}{b_i!}$$ $$min(-\ln P_{Pois}(\vec{b}|\vec{a}))=min(\sum_i l_i(\vec{a}) -b_i \ln(l_i(\vec{a})))$$ here $\ln b_i!$ has been neglected as it does not contribute to the optimization.

The XEDF ($\vec{l}(\vec{a})$) is linear in EEDF ($\vec{a}$). Thus, in discretized form the transformation is a matrix $\vec{l}(\vec{a})\rightarrow M\vec{a}$. In the language of matrices, we wish to minimize the following function

$$\label{eq:cost}
C(\vec{a})=\sum_i [(M\vec{a})_i - b_i \ln(M\vec{a})_i]$$ with respect to $\vec{a}$, where $\vec{a}$ is the vector of EEDF values, $\vec{b}$ is the matrix of measured XEDF values, and $M$ is the matrix which transforms EEDF into XEDF.

In practice we solve this optimization problem with a Quasi-Newton method that we implemented in the MATLAB language. As in Tikhonov regularization, add a small "smoothness" prior to the cost function,

$$C_{s}(\vec{a})=\sum_j (\frac{a_{j+1}-a_{j}}{a_j})^2 \frac{E_{corr}^2}{2\Delta E_e^2}$$ where $E_{corr}$ is some correlation energy and $\Delta E_e$ is the energy spacing of the EEDF vector. This is a Bayesian prior that neighboring EEDF points will be correlated. We chose $E_{corr}$ to be small, $\sim5$eV, to avoid introducing unphysical results. The addition of this smoothness prior ensures that, in regions of little information about the EEDF, it will behave in a plausible manner. Smoothness is not included in uncertainty computation.

Note that the number of elements in $\vec{a}$, which is the same as the number of columns in $M$, is arbitrary. The error of $a_j$ values will be discussed shortly. Choosing a small value of the dimensionality of $\vec{a}$ will decrease the uncertainty of each $a_j$ but not resolve features of the derived EEDF. Choosing a large value of the dimensionality of $\vec{a}$ will increase the uncertainty of each $a_j$ but resolve better the energy-space of the EEDF. Natural choices for the dimensionality of $\vec{a}$ are the number of measured points in $\vec{b}$ for maximum resolution, or the number that gives the energy spacing of $\vec{a}$ the same resolution as the energy-resolution of the measurement, to balance resolution and uncertainty.

This Poisson-regularized inversion is well-suited to XEDFs that suffer from poor counting statistics. If Tikhonov-regularized inversion is used in cases of low signal-to-noise ratio (SNR), positive-definiteness is not assured and the derived EEDF can be negative, a non-physical result. This is because the assumption that the measurement is Gaussianly distributed is only justified at high numbers of x-rays counted.

Poisson-regularized inversion is also well-suited to low-energy-resolution data. In pulse-height x-ray detectors, resolution is limited by the counting statistics of the number of electron-hole pairs which are produced by the incident x-ray. Thus, the response of the detector to a monoenergetic beam of x-rays is a mostly-Gaussian distribution of energies centered on the correct energy. This response function can be made into a response matrix when the response functions to many different energies are concatenated as the columns of a matrix. This will be discussed later. Multiplying this matrix $M_{res}$ into the EEDF - XEDF transformation $M_{Brem}$ yields a resolution-included response matrix $M_{res\cdot Brem}$ which allows the resolution of the detector to contribute to the derived EEDF and its reported uncertainties in a correct and self-consistent way. This procedure is not practiced in the most widely used Tikhonov-regularized inversions.

Poisson-regularized inversion also yields natural uncertainties and error bars in a self-consistent way that Tikhonov-regularized inversion does not. The systematic uncertainty of each point $a_j$ may be determined by finding the value of $a_j+\Delta a_j$ which increases $C(\vec{a})$ by the value $1/2$, equivalent to a $1\sigma$ deviation for Gaussian statistics. The statistical uncertainty of a section of the spectrum may be found the same way, except all points except $a_j$ are then optimized to minimize $C(\vec{a})$. It is this new $C$ which is must be larger than the old $C$ by $1/2$.

# Detector Response Function

The EEDF derived from Equation is sensitively dependent on the transformation matrix $M$. We call this matrix the response matrix, as it is the detector's response to the presence of a mono-energetic EEDF.

$M$ consists of three response matrices, multiplied together.

$$M=M_{res} \cdot M_{trans} \cdot M_{Brem}
\label{eq:M}$$ where $M_{Brem}$ is the Bremsstrahlung production matrix, $M_{trans}$ is the window transmission matrix, and $M_{res}$ is the resolution response matrix. They must be multiplied in this order, as these transformations are not commutative.

If the physics and detector are well known, then $M$ is specifiable analytically. In practice, all or some of $M_i$ matrix factors in Equation must be measured.

## $M_{Brem}$

$M_{Brem}$, a discretized transformation function, multiplies the EEDF to determine the XEDF that is produced by the plasma. This is relatively well-known in the non-relativistic case in which the Born approximation holds. The power into $\nu \rightarrow \nu+d\nu$ emitted by one electron interacting with a field of Coulomb potentials is

$$\label{eq:bremtransfreq}
\frac{dP}{d\nu}=\frac{32\pi^2}{3\sqrt{3}}n_i Z^2 r_e^3 m_e c^2 \frac{c}{v_1} G(v_1,v_2)$$ where $r_e$ is the classical electron radius, $m_e$ is the electron mass, $n_i$ is the number density of Coulombic scattering centers, $Z$ is the charge of the scattering center, $\nu$ is the frequency of the x-ray, and $G$ is the Gaunt factor, which in the energy range of interest can be approximated

$$\label{eq:elwert}
G=\frac{\sqrt{3}}{\pi}\frac{\nu_2[1-e^{-2\pi \nu_1}]}{\nu_1[1-e^{-2\pi \nu_2}]} \ln\frac{\nu_2+\nu_1}{\nu_2-\nu_1}$$ where $\nu_i^{-2}=\frac{\frac{1}{2}m_e v_i^2}{Z^2R_y}$, $v_1$ and $v_2$ are the electron velocities before and after the emission, and $R_y$ is Rydberg's constant. This is true only of fully ionized targets. Partially ionized targets will be considered in Section .

We are interested in the number of x-rays within an energy range $E_x \rightarrow E_x+\Delta E_x$ that hit an active area within a time period $\tau$ from a plasma with electron density $n_e$ and EEDF $f(E_e)$. Transforming Equation into these quantities, we get

$$\begin{gathered}
\label{eq:bremtrans}
b_i=\tau V \Delta E_x n_i n_e Z^2 \frac{32\pi^2}{3\sqrt{3}} \frac{(m_e c^2)^{3/2}}{h} r_e^3 \times \\ \int dE_e \frac{f(E_e) G(E_e,E_{x,i})}{E_{x,i}\sqrt{E_e}}
\end{gathered}$$ where $b_i$ is the number of x-rays that enter the detector in energy bin $i$, $\tau$ is the time that data is collected, $V$ is the effective volume from which every x-ray is collected, $\Delta E_x$ is the interval of energy that each energy bin spans, $E_{x,i}$ is the central energy of x-ray energy bin $i$.

Posing Equation in the language of transformation matrices,

$$\label{eq:M_Brem}
M_{Brem,i,j}=K \Delta E_e \frac{a_j G(E_{e,j},E_{x,i})}{E_{x,i} \sqrt{E_{e,j}}}$$ $$\vec{b}_{Brem}=M_{Brem}\vec{a}$$ where $K$ is the constant before the integral in Equation , $\Delta E_e$ is the discretization interval for $E_e$, $a_j$ is the $j$th element of the discretized EEDF vector, and $E_{e,j}$ is the electron energy associated with $a_j$.

Examples of the Bremsstrahlung response from monoenergetic electrons as predicted by Equation are depicted in Figure .

## $M_{trans}$

$M_{trans}$ is the transmission efficiency matrix that transforms the XEDF produced by the plasma to the XEDF which penetrates the detector window and is incident on the detector. As this process does not change the energy of the x-rays, $M_{trans}$ is a diagonal matrix. The value of element $M_{trans,i,i}=\vec{m}_{trans,i}$ is the value of the transmission efficiency of the window and detector at energy $E_{x,j}$.

This transmission efficiency is published for each pair of Amptek detectors and windows by Amptek. We used a X-123 FAST SDD detector with a Si$_3$N$_4$ C1 window. The Amptek C1 window is composed of a 90-nm layer of silicon nitride, a 250-nm layer of grounded aluminum, and a $78\%$-open grid made of 15-$\mu m$-thick silicon. The SDD is 500-$\mu m$ thick which limits the detector's upper energy.

The transmission efficiencies of this combination of window and detector are published, as depicted in Figure , or can be calculated from the given dimensions using NIST's database of x-ray attenuation coefficients, which tabulate calculations of Seltzer.

$$M_{trans}=Diag[\vec{m}_{trans}]$$ where $\vec{m}_{trans}$ is the vector of transmission efficiencies at energies $\vec{E_x}$.

The windows are manufactured with a $\pm10\%$ thickness tolerance of the silicon nitride film; when instructing how to determine line amplitudes for x-ray material assaying, Amptek instructs the user to first calibrate with a known source. In Section we extend this procedure to broad-spectrum x-ray emissions.

## $M_{res}$

The resolution of pulse-height detectors are limited by two phenomena: electrical (thermal, shot, etc.) noise of the counting electronics and counting statistics of the finite number of electron-hole pairs produced by the incident x-ray.

This latter produces a full-width-at-half-maximum (FWHM) which is proportional to the square root of the signal. This is so-called Fano noise and, in the Amptek X-123 FAST SDD detector, has form

$$FWHM_{Fano}=\sqrt{2.404eV \cdot E}$$ where all quantities are in eV.

The electrical noise is constant with respect to incident x-ray energy. According to the Amptek calibration procedures, the response function to a monoenergetic x-ray distribution is mostly Gaussian centered at the x-ray energy and with FWHM contributions from electrical and Fano noise. The FWHM of the electrical noise is measured each time data is recorded by first recording the measured XEDF from no x-ray signal, yielding a Gaussian near 0 eV with the correct FWHM.

$$FWHM(E_x)=\sqrt{FWHM^2_{elec}+FWHM^2_{Fano}(E_x)}$$

Thus the resolution response matrix $M_{res}$ which transforms the XEDF vector which is incident on the detector into the measured XEDF vector is many column vectors of discretized Gaussian values concatenated into rows, the central values and FWHMs of which depend on the row.

$$M_{res,i,j}=\frac{1}{\sqrt{2\pi\sigma(E_{x,j})}}e^{-\frac{(E_{x,i}-E_{x,j})^2}{2\sigma^2(E_{x,i})}}$$ where $\sigma(E_{x,i})=FWHM(E_{x,i}) /(2\sqrt{2\ln 2})$.

# Comparison with Piana *et. al.*

In order to illustrate the differences between the Poisson-regularized inversion of this paper and the Tikhonov-regularized inversion of Piana *et. al.*, we supposed a functional form for an EEDF, depicted in Figure a. From this EEDF, we generated a synthetic XEDF by applying the transformation matrix we found in Section , $\vec{m}_{true}=M\vec{f}_{true}$. For each energy bin $E_{x,j}$, a random value was generated from a Poisson distribution centered at $m_{true,j}$. This synthetic XEDF, $m_{Poisson}$, should be thought of data that could plausibly have come from a laboratory plasma. It incorporates the effect of Bremsstrahlung, window transmission, finite resolution, and counting statistics.

The specific functional form of $f_{true}$ was based on a Maxwellian distribution with density $n_e=5\times 10^8 /cc$ with temperature 320eV. We assumed a target of 0.30 mTorr Hydrogen gas. Data was "accumulated" for 45 minutes. These are all plausible conditions for the PFRC-II experiment. As can be seen in Figure , both the Poisson-regularized inversion and that of Piana captured this behavior as far as it persists in energy. Piana's EEDF exceeds $30\%$ discrepancy at 1600eV. Poisson-regularized EEDF does not exceed $30\%$ discrepancy until 2500eV, where the Maxwellian character ends.

To demonstrate resolution of sharp features, we added a jump in EEDF at 2500eV. As can be seen in Figure a, counting statistics (Poisson error) have become significant in this energy range. Despite this complication, both computed EEDFs show a jump of comparable amplitude at 2500eV, with similar artifacts due to resolution.

To demonstrate sensitivity, a tenuous beam was added. We chose 3550eV with density $n_{beam}=9\times 10^5 /cc$. In this energy range, the Poisson error in the synthetic XEDF are extreme, with variance $> 35\%$. There were only 67 synthetic x-rays "measured" above 3550eV. The Poisson-regularized EEDF clearly shows a beam centered at 3550eV, however the density excess is $15\%$ higher than the true density of the beam, and the FWHM of the beam is 250eV, larger than the 100eV of the true beam. However, the EEDF calculated from the algorithm of Piana showed no detectable beam-vs-background relationship from which a density could be calculated.

The ability to detect a beam of $\sim 0.1\%$ of the bulk density is potentially of great use. A beam of these beam parameters can be injected from an electron gun, providing a valuable diagnostic of confinement time and slowing down profile. A beam of these parameters can be a source of free energy for instabilities such as two-stream instability.

These data confirm the claim in Section that Poisson-regularized inversion is more suitable than Tikhonov-derived inversions in the case that the relevant EEDF feature is in an energy range in which uncertainties and resolutions are high. When the signal-to-noise ratio is low, the Tikhonov-derived Piana inversion produces unreliable results where Poisson-regularized inversion reproduces the energies and amplitudes of important EEDF features.

# Calibration

To calibrate the SDD, a gas-target x-ray tube was built using a 20-cm total length Pyrex cross with 5-cm inner diameter, depicted in Figure . At the far right port of the cross, a 0.010" diameter tungsten filament was heated by a DC power supply to thermionically emit electrons. The potential along the filament's length varied about 3 V with respect to ground. The electrons were extracted by a nearby stainless steel acceleration grid at +50 V and then accelerated into the gas target volume. At the left port of the cross, a triangular prism carbon target was biased up to 5 kV. So that the electrical potential and electron energy were constant in the gas target volume, a stainless steel drift-space liner was placed around the gas-target volume, with two 5-cm holes at the top and bottom to allow line-of-sight of the detector through the liner and pumping. This drift-space liner was biased at the carbon target voltage. Wrapped around the horizontal arms of the cross were 25 turns each of wire carrying 4 A of current, providing a $\sim4G$ axial magnetic field to contain the electron beam. The current collected by the carbon target and drift space liner was typically $100\mu A$.

At the bottom port of the cross, gas was fed into the gas target volume by an adjustable needle valve. A Leybold-Heraeus Turobovac 150 turbomolecular pump maintained a base pressure below $10^{-5}$ Torr, as measured by a Granville-Phillips ion gauge. The gas pressure was kept low enough that the thermionic current was not noticeably supplemented by current from ionization of neutral gas.

At the top port of the cross, the X-123 FAST SDD detector was mounted, with a grounded stainless steel 3-baffled collimator to restrict line-of-sight.

## Energy calibration

The energy scale of each detector must be calibrated for each combination of pulse-shaping parameters. At its most basic level, the data obtained in every run is a list of counts per energy channel, $\vec{b}$. The energies to which they correspond and the width of the energy bin are not specified. Amptek instructs the user to use known, calibrated signals from radioisotopes such as Iron-55 to calibrate this energy scale.

We supplemented this by using the gas-target x-ray tube that we constructed for this purpose. Using different fill gases with different $K-\alpha$ line energies we were able to calibrate the energy scale over a large range of energies, from the $K-\alpha$ line of Carbon at 277eV to the $K-\alpha$ line of Argon at 2958eV. We considered the position of six elemental $K-\alpha$ lines: Carbon from methane gas fill, Nitrogen from air gas fill, Oxygen from air gas fill, Neon from neon gas fill, Aluminum from x-ray fluorescence from aluminum foil, and Argon from air gas fill.

The detector has configurable time constants, including pulse rise time and flat top, that affect the tradeoff between resolution and count rate . The pulse peaking time and flat-top time also affected the energy calibration of the detector. We calibrated the energy scale of the detector under 7 peaking and flat-top time combinations applicable to our experiment. In each case the calibration function was found to be linear; that is the $N$th energy bin corresponded to energy $E=A+BN$. Energy calibrations performed months apart varied by $<0.5\%$.

## Transmission calibration

As depicted in Figure , we recorded the XEDF from the monoenergetic EEDF produced by the gas-target x-ray tube. Its shape differed slightly from the shape expected from the published x-ray transmission efficiency depicted in Figure . This is because the C1 window used in our detector was manufactured to some finite tolerance, which each of its thicknesses subject to some variation. The four free parameters that characterize the C1 window are: Silicon Nitride layer thickness (nominally 90nm), Aluminum backing thickness (nominally 250nm), Silicon grid thickness (nominally 15$\mu$m), and Silicon grid open fraction (nominally $78\%$).

As depicted in Figure , thicknesses and open fractions slightly different than this give improved fit with the measured XEDF. The best fit was produced by Silicon Nitride layer of 64nm, Aluminum layer of 244nm, Silicon grid thickness of 23$\mu$m, and Silicon grid open fraction of $80\%$.

The agreement between the calculated monoenergetic XEDF and measured XEDF gives us confidence in our Bremsstrahlung production model.

# Spectral Lines

$M_{Brem}$ from Equation was formulated only considering x-rays from Bremsstrahlung emission. Because of this, the presence of line radiation in the energy domain-of-interest will cause the algorithm to fail. See Figure a.

Because of the large, obvious unphysical features in the un-corrected EEDF, this method can be used to find spectral lines. The failure of a fit indicates that the measured x-ray spectrum could not have been produced by Bremsstrahlung only, and that a spectral line must be present.

To invert XEDFs with prominent spectral lines in the domain-of-interest, we also used the following procedure: We determined the energy range over which the spectral line extended. This corresponds to some range of $i$ values in Equation . We removed this interval from the summation in that equation. This method removes the unphysical features of the spectral line, and produces a plausible but uncertain EEDF in the vicinity of the excised line. To understand why this is the case, we must first discuss some of the properties of the reconstructed EEDF's dependence on the measured XEDF.

Normally the EEDF in some energy range $E_i$ is determined mostly by the local behavior of the XEDF in the vicinity of $E_i$ and partly by the behavior of the XEDF at lower energy than $E_i$. Both behaviors of the XEDF are "evidence" in the Bayesian sense of the word which specify the value and uncertainty of the EEDF. If a spectral line is excised with this method, however, EEDF values are determined by the XEDF only at lower energies. These EEDF points have larger uncertainty because the lower-energy XEDF points are less sensitively dependent on these EEDF values. Large EEDF features may produce only small XEDF changes when the energy range of interest is excised. This method is depicted in Figure b.

Spectral lines can also be removed "manually," by choosing for each line a candidate peak location ($E_p$), height ($h_p$), and width ($w_p$), subtracting that peak from the measured XEDF and varying $E_p$, $h_p$, and $w_p$ to minimize the XEDF deviation from a "smooth line" in the vicinity of the peak. Essentially, the resultant XEDF should appear, "by eye," as though there were no spectral line. Because of the shape of $M$, small differences in the XEDF correspond to large differences in the EEDF, so care must be taken not to introduce artificial excursions from the correct EEDF. This method has the benefits of corroborating the SDD's energy resolution and measuring the impurity content. This method has the drawback that human bias is introduced. This method is depicted in Figure c.

The Gaussian peaks removed to create Figure c were centered at 2964.5 eV and 3196.6 eV, very close to Argon spectral lines, indicating that our energy calibration is correct to $0.2\%$. The peaks had FWHMs of 91.4 eV and 93.4 eV, within Amptek's specifications for this range. The XEDF falls over this energy range while the EEDF appears flat. This is not a contradiction, as a constant EEDF means that more and more electrons can produce x-rays of a given energy as that energy decreases. The dip in EEDF at 3600 eV may be due to an effect discussed in Section : the complicated behavior of the Gaunt factor of Avdonina and Pratt around an electron shell energy. We will explore this Argon-impurity discharge more in a later publication.

The most correct way to add spectral line considerations is to include a model for their production from a general EEDF. This model would modify the x-ray response function $M_{Brem}$. This requires the concentrations of the emitting gases to be known. For our plasmas, the correct model is the collisional radiative model, which is non-linear in the EEDF and requires knowledge of particle confinement, cannot be subjected to this analysis. We did not implement this feature.

# Partially ionized high-Z targets

For all data and analyses presented in this paper, we do not consider the presence of other electrons bound to the target species. When we consider spectral lines, we assume they arise from a minority impurity which does not contribute significantly to the continuum Bremsstrahlung spectrum. This is a good assumption in the case of a Hydrogen plasma, as in order to produce a 200eV x-ray, an electron must get much closer to the nucleus than the Bohr radius of the 13.6eV bound electron. From the perspective of a high-energy incident electron, even a neutral Hydrogen atom is an ion.

The most complete model of Bremsstrahlung emissions from partially ionized targets is partial-wave computation, but Avdonina and Pratt have produced a phenomenological model . This model is mostly correct except for the XEDF emitted at energies near an electron shell energy. If a high-Z, partially ionized gas were the target, the correct procedure would be to use the Gaunt factor from Avdonina and Pratt, rather than the one given in Section . We will explore high-Z target gas results in later publications.

High-Z target gases of very small partial pressure may contribute to the Bremsstrahlung emissions a non-negligible amount. At higher energies than the k-shell energy, for example, the Hydrogen-like potential which causes the incident electron to emit Bremsstrahlung is enhanced by Z, the atomic number of the target nucleus. This enhances Bremsstrahlung emission by Z$^2$. A plasma which is $99\%$ hydrogen gas and $1\%$ water by partial pressure has $32\%$ of its Bremsstrahlung emissions above 543eV come from electrons incident on Oxygen nuclei.

# Apparatus

The PFRC-II experiment is a magnetic confinement experiment at the Princeton Plasma Physics Laboratory. It can be run either in Rotating Magnetic Field mode as an FRC, or in double tandem mirror mode as a high mirror ratio, low $\beta$ mirror. The experiments discussed here were performed with in the double tandem mirror mode. It is depicted in Figure .

Gas is introduced into the Source End Cell (SEC) by an adjustable needle valve. The SEC contains a 30-cm-long, 3.8-cm inner-diameter Pyrex pipe with a 12-cm-long double-saddle antenna operated at 27 MHz and capable of exciting a helicon mode. In the experiments discussed here, the antenna is driven in a non-helicon mode, transmitting 200W-500W to the plasma, steady-state or square-wave modulated at 1-10 kHz. An electrically floating stainless steel cup terminates the Pyrex pipe. It is from this antenna and vacuum vessel arrangement that the superthermal electrons are produced, as discussed in a previous publication.

The SEC is connected to the Center Cell (CC) by a 2-cm inner diameter, 3-cm-long nozzle bore which is also the magnetic maximum. This magnetic maximum is operated typically around 2 kG. The CC is an 85-cm-long Lexan vacuum vessel with 23-cm inner diameter. The magnetic field at the midpoint of the CC is typically 70 G.

On the downstream side of the CC is the Far End Cell (FEC), which contains a 5-cm-diameter tantalum paddle which is electrically floating. All field lines which traverse the nozzle bore terminate on this paddle.

Each chamber is continuously pumped by a turbomolecular pump. Pressure ratios are typically 40:20:1 SEC:CC:FEC. Pressures are monitored by Baratron capacitive manometers and Granville Phillips ion gauges. Hydrogen is the typical working gas; argon, helium, and neon are also commonly used. The base pressure is below $10^{-6}$ Torr.

Magnetic fields are provided by independent, water cooled sets of nozzle and main (Helmholtz) electromagnetic coils.

Langmuir probes in the SEC, CC, and FEC can be used to measure the bulk electron density and temperature in each chamber. Two Amptek X-100 SiPIN and one Amptek X-123 FAST SDD x-ray detectors can be mounted in the SEC and in the midplane of the CC. During the experiments described here, the SDD was mounted with line-of-sight to the midpoint of the CC.

Typical bulk parameters for the tandem mirror mode are $T_e=4\text{eV}, n_e=1\cdot10^{11} /\text{cm}^3$. Maxwellian fits to the x-ray spectra yield parameters of the super thermal population of $T_e=300\text{eV}, n_e=3\cdot10^{9} /\text{cm}^3$ in the CC. XEDFs measured simultaneously in the SEC and CC show that the CC XEDF extends to higher energy and has a hotter effective temperature.

# Results

One raw XDEF spectrum and its inverted EEDF are shown in Figure , obtained with 350 W of forward RF power being deposited into the antenna and hydrogen plasma. The gas pressure in the CC was 0.43 mTorr and $1.4\cdot 10^{-5}$ Torr in the FEC. The magnetic field in the midplane of the CC was 70 G and 2.2 kG at the nozzle. The floating potential of the tantalum paddle in the FEC was -1.2 kV.

The raw spectrum shows N and O K-$\alpha$ x-rays, necessitating the removal of that portion of the spectrum as in Section . Figure shows a mostly exponential EEDF. This population of electrons could well be thermal with an effective temperature of 340 eV. If this Maxwellian distribution continued down to 0 eV, this population would have a density of $6.7\cdot 10^9/\text{cm}^3$. The low-energy portion of the spectrum is made uncertain by the presence of the N, O lines, but it appears that this Maxwellian behavior does not extend down to 500eV in EEDF, instead becoming "colder" and steeper at this energy.

By increasing the pressure in the FEC to $4.9\cdot10^{-5}$Torr, a factor of 3.5 larger than in Figure , the floating potential of the Tantalum paddle in the FEC becomes far less negative, -20 V, and the paddle glows cherry red hot.

The increase in potential and power flow to the Tantalum paddle is indicative of a fast-electron created cold plasma in the FEC. Before the pressure was increased, the fast electron population was sufficient to balance the bulk ion current to the paddle, keeping its floating potential at -1.2 kV and keeping the power in the bulk plasma from heating the paddle. After the pressure was increased, we suspect that the fast electrons produced a plasma whose larger density was sufficient to set the paddle floating voltage to the measured -20 V, allowing power in the bulk plasma to heat the paddle. Characterizing this fast-ion produced plasma more fully with Langmuir probes will be the result of a later publication.

The EEDF derived from this configuration is shown in Figure . It displays a very different EEDF; at higher energies than 1800 eV, the EEDF has a much sharper fall than the low pressure condition, with an e-folding energy of 220 eV. This may be attributed to the effect of the Tantalum paddle no longer providing any electrostatic confinement of particles in the FEC. At energies lower than 1800 eV, the EEDF shallowed, appearing flat. Flattening of the EEDF can arise from collisional slowing-down of a beamlike distribution. More measurements are required to determine difinitively whether the flatness comes from acceleration of electrons at lower energy or slowing of electrons at higher energy.

# Conclusion

We have developed an algorithm for the spectral inversion of Bremsstrahlung x-ray energy distribution functions (XEDFs) from plasma into electron energy distribution functions (EEDFs). It is better suited than the current state-of-the-art to low resolution, low count rate, low dynamic energy range conditions contaminated by spectral lines. Because the motivation for the algorithm is a log-likelihood optimization from $N$ Poisson variables, we call this inversion a Poisson-regularized inversion.

This inversion has been used to measure the EEDF from a super-thermal population of electrons in the center cell (CC) of the PFRC-II device running as a low-power RF double tandem mirror. We find conditions of both thermal-like distributions and strongly non-thermal distributions.

Poisson-regularized spectral inversion will be used to probe the acceleration and dynamics of these super-thermal electrons in the PFRC-II device.

## Acknowledgment

We would like to thank Bruce Berlinger for technical experimental assistance. We would also like to thank Manfred Bitter, Kenneth Hill, and Eugene Evans for helpful comments. This work was supported, in part, by DOE Contract No. DE-AC02-76-CHO-3073 and its Program in Plasma Science and Technology.


abstract: We present a dissenting view of some aspects of the work of the Crystal Barrel collaboration.
author: D.V.Bugg$^{a}$ and A.V.Sarantsev$^{b}$
*a) Queen Mary and Westfield College, London E14NS, UK*
*b) St.Petersburg Nuclear Physics Institute, Gatchina, 188350 Russia*
title: Comment on the review paper of Amsler

We have found through the World Wide Web a review article Claude Amsler has submitted to Reviews of Modern Physics and entitled "$\bar pp$ Annihilation and Meson Spectroscopy with the Crystal Barrel", HEP-EX/9708025. We have major disagreements of both history and scientific fact concerning this review. This page summarises the points on which we disagree.

The article has not been approved by the collaboration. It is the private view of Amsler. In our view, it misrepresents the historical sequence of discoveries. The review presents in detail a point of view developed by Zurich members of the collaboration. They are entitled to express their opinions. However, it seriously misrepresents much other work within the collaboration and fails to reference many papers and experimental facts which conflict with the Zurich line. We appreciate that disagreements can occur, but we believe that there is a responsiblity to expose these disagreements in a review article. Otherwise, the reader could be misled into believing the disagreements have been resolved in favour of the view being expressed; that is not the case here.

One of the important results cited by Amsler is the discovery of three $0^+$ mesons; (a) $f_0(1500)$, now regarded as the prime candidate for the $0^+$ glueball, (b) $f_0(1300-1370)$ and (c) $a_0(1450)$. We wish to set straight the actual history of this discovery. There were two crucial steps. The first was the production during 1990-1992 of data on channels $3\pi ^0$, $\eta \pi ^0 \pi ^0$ and $\eta \eta \pi ^0$ by Mainz and Karlsruhe groups. The second step was a Coupled Channel analysis by QMWC and St. Petersburg groups, using the N/D method and showing that all these three channels could be fitted consistently with the three $0^+$ resonances mentioned above. The latter work was done in August 1992, during a visit to Queen Mary and Westfield College by Anisovich and Sarantsev from St. Petersburg. Their visit was specifically in order to carry out this analysis of the Crystal Barrel data and was cleared in advance with the Steering Committee of the collaboration. For the purposes of this work, they are seen officially as visitors to Queen Mary and Westfield College. The work was reported to the collaboration at its meeting in September 1992, as may be verified from the minutes of the collaboration. After much discussion and checking by both the Mainz group and by Michael Kobel (CERN), it was cleared for publication at the collaboration meeting in July 1993. The analysis was presented at the Marseille conference at the end of that month. It was also presented shortly afterwards at the NAN conference in Moscow. Reference to the first two presentations are not given by Amsler. They are: (a) Hadron Spectroscopy, D.V. Bugg, Int. Europhysics Conf. on High Energy Physics, Marseille, France, ed. J. Carr and M. Perrottet, (Editions Frontieres, Gif-sur-Yvette, France, 1994), p717. (b) V.V. Anisovich, Proc. Second Biennial Workshop on Nucleon-Antinucleon Physics (NAN93), Phys. of Atomic Nuclei 57 (1994) 1595. Subsequently, this Coupled-Channel analysis was published in four steps: (c) V.V. Anisovich et al., Phys. Lett. B323 (1994) 233, (d) C. Amsler et al., Phys. Lett. B333 (1994) 277 (e) V.V. Anisovich et al., Phys. Rev. D50 (1994) 1972 (f) D.V. Bugg et al., Phys. Rev. D50 (1994) 4412. The last of these references is not given by Amsler.

What has happened since 1995 is that two competing analyses have developed and the available statistics have increased roughly tenfold. The Zurich group have developed a Coupled Channel Analysis using the K-matrix approach and based only on Crystal Barrel data. The first Zurich Coupled Channel Analysis was submitted for publication on May 29, 1995 and published roughly 1–1.5 years behind references (a)-(f) above. It appeared as Amsler et al., Phys. Lett. B355 (1995) 425.

We do not object to Amlser presenting the Zurich line, but it should be made clear that there is a difference of opinion and there exists an alternative treatment of the Crystal Barrel data from within the collaboration itself. An important paper giving the most recent analysis of the UK side of the collaboration is that of Abele et al., Nucl. Phys. A609 (1996) 562. Some of our conclusions are significantly different to those of the Zurich group. We include in our analysis Argonne and BNL data on $\pi ^- \pi ^+ \to K^0_SK^0_S$ and GAMS data on $\pi ^- \pi ^+ \to \pi ^0 \pi ^0$. For the $\pi \pi$ S-wave we have refitted the actual published moments of the CERN-Munich experiment. These additional data are all fitted by the Abele et al. paper, where they are shown to be entirely consistent with Crystal Barrel data, but better in certain points of detail. The Abele et al. paper finds a very different mass, $1300 \pm 15$ MeV for what Amsler calls $f_0(1370)$. It also comes out with a much narrower width. The same result was obtained in the framework of the K-matrix approach (see refs. (h),(i) below). Branching ratios are evaluated in the Abele et al paper in a different way to Zurich work and this leads to substantially different results, which have a strong bearing on the physics interpretation placed on the resonances by theorists.

Subsequent papers by Anisovich et al., listed below, bear strongly upon the interpretation of Crystal Barrel data, The analysis has been extended using the T-matrix approach, then the K-matrix. This work adds a considerable volume of data from other experiments, namely CERN-Munich, GAMS, VES and data on $\pi ^-\pi ^+ \to K\bar K$ from Brookhaven and the Argonne. An important feature of this work is that it has removed the inconsistency between Crystal Barrel and GAMS by demonstrating that the GAMS $f_0(1590)$ in explained by interference between a broad background amplitude and $f_0(1500)$. References are as follows: (g) V.V. Anisovich, A.A. Kondashov, Yu.D. Prokoshkin, S.A. Sadovsky and A.V. Sarantsev, Phys.Lett., B355 (1995) 363. (h) V.V. Anisovich and A.V. Sarantsev, HEP-PH/9603276; Phys.Lett., B382 (1996) 429. (i) V.V. Anisovich, Yu.D. Prokoshkin and A.V. Sarantsev, HEP-PH/9610414, Phys.Lett. 389 (1996) 388.

Apart from the $0^+$ mesons, other resonances discovered by the collaboration have been $a_2(1650)$, $\eta _2(1645)$ and $\eta _2(1875)$, (though there was some earlier evidence for the latter from CELLO and Crystal Ball). New resonances seem to us to be one of the "achievements of the Crystal Barrel collaboration" and should appear in a balanced review of the experiment. This work is not presented in the review, but is listed without comment in the references. These resonances have both been confirmed in a recent preprint by the Omega group at CERN, hep-ex/9707021, to be published shortly in Physics Letters.


author: Junming Yang$^{*}$; Yaoqi Li$^{*}$; Xuanyu Chen$^{*}$; Jiahang Cao$^{*}$; Kangkang Jiang$^{*}$
bibliography: main.bib
date: 2019.08.25
title: **Deep Learning for Stock Selection Based on High Frequency Price-Volume Data**

# INTRODUCTION

Training a practical and effective model for stock selection has been a greatly concerned problem in the field of artificial intelligence. Because of the uncertainty and sensitivity of the finance market, there are many factors which may influence the stock price such as significant events, society's economic condition or political turmoils. Many scholars have been applied various methods of machine learning to find a fitting model for the stock price time-series data with nonlinearities, discontinuities, and high-frequency multi-polynomial components. To handle these complicated components and make a precise prediction, a lot of scholars choose to use machine learning to create a model.

## Related Work

Shunrong Shen et al. proposed data from different global financial markets with SVM (support vector machine) and reinforce learning to predict stock index movements in the U.S. market. Kai Chen et al. introduce the application of LSTM (Long Short-Term Memory) in stock index prediction by using low-frequency data. Hailin Li et al. compared actor-only and actor-critic reinforce learning methods for presenting reinforcement-oriented schemes to forecast short-term stock price movements. Furthermore, Yue Deng et al. constructed a new model DDRL(deep direct reinforce learning) which combined direct reinforce learning, deep recurrent neural network, and fuzzy learning.

## Background

Even though some of the models from previous works have been achieved good performance in the U.S. market by using low-frequency data and features, training a suitable model with high-frequency stock data is still a problem worth exploring. There is another challenge for stock trading novices without experience in this field. Although there are existing low-frequency features created by some experts, constructing useful high-frequency features with high-level information is difficult for us. Moreover, many existing features which are calculated by the U.S. stock market index different from the China stock market. Therefore, we prefer to apply methods without constructing features by ourselves. In this paper, we introduce two machine learning algorithms LSTM (long short-term memory) and CNN (convolutional neural network) to find the most beneficial strategy of stock trading in China stock market.

## Summary

Through the high-frequency price data of the past period (one day or several days), we construct two models which can predict the expected return rate of the stock on the day, and select the stock with the highest expected yield at the opening to maximize the total return. The organization of the rest paper is as follows: Section 2 presents general concepts, advantages and detailed constructions for the two models and our preparation of processing data. Section 3 describes hyperparameter selection, regularization and how we train our models. Section 4 compares the accuracy, thermodynamic diagram and the result of backtesting to analyze their advantages and weakness. At last, we summarize our work and indicate several future attempts.

# METHODOLOGY

## Long Short-Term Memory

One of a special kind of RNN(Recurrent Neural Network) is called Long Short-Term Memor(LSTM) which was first proposed by Hochreiter and Schmidhuber in 1997. Gers et al. advanced its structure by introducing forget gate in 2000. after a few years, H.Sak et al. and W.Zaremba et al. improved the framework of LSTM and added more details. Nowadays, LSTM is widely used in the field of natural language processing and emotion analysis.

### Basic Theorem

The traditional neural network always widely used in image processing and other problems without significant effects caused by time series. However, there are some situation depending on time series such as natural language processing and predicting stock price. In this process, we prefer to receive new information and also maintain preceding information because understanding earlier events can help us study current material. RNN address this issue by using networks with loops to allow information to preserve.

If we unfold RNN, we can get Figure a chain-like sequence of neural networks which are intimately related to time series. Even though we can connect earlier information to the present task, we may need long-term memory to inform the understanding of current work. Considering two stocks with similar price tendency in the present week, according to data from this week, we are hesitated to buy which one. If we know in the last month, one of them hit limit up while another fell staying, then we can decide to buy the go up staying stock based on the understanding of information from previous days. Therefore, LSTM solves this problem and works tremendously well on time-series with long-term information problems. According to the basic model of RNN, if we unfold the structure of one layer RNN, we can easily assume it as a deep feedforward neural network with one dense layer which shares the same weight. By appending more neural network layers and gates, LSTM adequate to handling long-term dependencies.

### Advantages of LSTM

Comparing to other artificial neural networks, RNN has an advantage in figuring out problems which are sensitive to time series such as language translation and emotion analysis. Even though their purpose is to learn long-term dependency, some shreds of evidence prove that recurrent neural network troubled in learning and keeping long-term memory. Fortunately, by imitating the human being's memory mechanism, LSTM solved this problem appropriately. To learn how to classify meaningful information and remove useless memory, LSTM separate unit state into long-term memory state and short-term memory state and add the gate system. Based on the previous study, LSTM is more effective than traditional RNN because not only can it converge quickly, also it can solve the problem of vanishing gradient and exploding gradient. Moreover, considering the feature that LSTM can maintain long-term memory, it is sensitive to the long-term dependency of data.

### Structure of LSTM

In Figure , it shows that the LSTM unit state has two vectors: $\mathbf{h}_{(t)}$ and $\mathbf{c}_{(t)}$ which represent short-term memory state and long-term memory state. Each cell has three gates (fully connected layer) at $t$ time: $\mathbf{f}_{(t)}$ (forget gate), $\mathbf{i}_{(t)}$ (input gate) and $\mathbf{o}_{(t)}$ (output gate). The active function of the gates is the Logistic function whose output is in the range of $0$ to $1$. The gates uses element-by-element multiple to control how many data should be maintained.

> -   $\mathbf{h}_{(t)}$: short-term memory states
>
> -   $\mathbf{c}_{(t)}$: long-term memory states
>
> -   $\mathbf{x}_{(t)}$: a vector corresponding to input time series
>
> -   $\mathbf{f}_{(t)}$: decide which part of $\mathbf{c}_{(t-1)}$ from the previous $t-1$ time can be stored in current $\mathbf{c}_{(t)}$
>
> -   $\mathbf{g}_{(t)}$: analyze $\mathbf{x}_{(t)}$ and $\mathbf{h}_{(t)}$
>
> -   $\mathbf{i}_{(t)}$: decide which part of the output returned by $\mathbf{g}_{(t)}$ should be added to current $\mathbf{h}_{(t)}$
>
> -   $\mathbf{o}_{(t)}$: decide which part of current $\mathbf{c}_{(t)}$ should be regarded as current $\mathbf{h}_{(t)}$ and the output $\mathbf{y}_{(t)}$ of the cell at $t$ time

Their computational formulas are as follows: $$\begin{aligned}
\mathbf {i}_{(t)}&={\sigma}(
\mathbf {W}_{xi}^{T}\cdot \mathbf {x}_{(t)} +
\mathbf {W}_{hi}^{T}\cdot \mathbf {h}_{(t-1)} + \mathbf {b}_{i})\\
\mathbf {f}_{(t)}&={\sigma}(
\mathbf {W}_{xf}^{T}\cdot \mathbf {x}_{(t)} +
\mathbf {W}_{hf}^{T}\cdot \mathbf {h}_{(t-1)} + \mathbf {b}_{f})\\
\mathbf {o}_{(t)}&={\sigma}(
\mathbf {W}_{xo}^{T}\cdot \mathbf {x}_{(t)} +
\mathbf {W}_{ho}^{T}\cdot \mathbf {h}_{(t-1)} + \mathbf {b}_{o})\\
\mathbf {g}_{(t)}&={\tanh}(
\mathbf {W}_{xg}^{T}\cdot \mathbf {x}_{(t)} +
\mathbf {W}_{hg}^{T}\cdot \mathbf {h}_{(t-1)} + \mathbf {b}_{g})\\
\mathbf {c}_{(t)}&=\mathbf {f}_{(t)} \otimes \mathbf {c}_{(t-1)}
+ \mathbf {i}_{(t)} \otimes \mathbf {g}_{(t)}\\
\mathbf {y}_{(t)}&=\mathbf {h}_{(t)} = \mathbf {o}_{(t)}
\otimes \tanh(\mathbf {c}_{(t)})
\end{aligned}$$

$\sigma$ represents the function as follows: $$\sigma(x)=\frac{1}{1+e^{-x}}$$

$\tanh$ represents the function as follows: $$\tanh(x)=\frac{\sinh x}{\cosh x}=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}$$

The weight matrix $\mathbf {W}$ and the bias $\mathbf {b}$ will be generated by Back propagation algorithm.

### LSTM Model Construction

Here, we use $\bm{x}_{it}$ to represent the feature vector of stock $i$ at time $t$. We treat a time series $\{\bm{x}_{it}\}\ (t=1,2,\ldots,T)$ as an instance to be the input of our LSTM network which can predict the profit $y$ of the next day. To consider this problem reasonably, we make this problem to be a classification problem. Hence, we create a classification model depended on LSTM network in Figure .

The LSTM layer of this model has been introduced carefully in the previous section. In the dropout layer, each cell has a certain probability to stop working in each training process to avoid over-fitting of the model. Therefore, when predicting, all neurons participate in the work to maximize the role of the model. Earlier experiments have confirmed that the addition of this layer has a good performance on regularization. The Dense layer has no activation function and outputs the score of the probability that the predicted instance belongs to each category. The score is then converted to the corresponding probability by the softmax layer. In this process, softmax layer use the equation as follows: $$P_{i}=\frac{e^{i}}{\sum_{j}e^{j}}$$ In this equation, $P_{i}$ and $i$ represent the probability and score respectedly that the predicted instance belongs to certain category. The category with the highest probability is regarded as the prediction made by the model on the instance category.

## Convolutional Neural Network

### Basic Theorem

The convolutional neural network is an advanced neural network with the ability of multilayer back-propagation supervised learning networks which first proposed by Y. LeCun in 1995. CNN achieves some degree of distortion and deformation by using three architectural ideas: local receptive fields, shared weights, and spatial subsampling(convolution). Local receptive fields are inspired by the cortical structure of animal vision that only part of their neurons works in the process of sensing the external environment. The reason for using local receptive fields is that the correlation of the adjacent pixels in the image is relatively close and each cell only needs to perceive the local area without connecting to the whole picture. By applying the connecting method of shared weights and local receptive fields, CNN reduces the number of parameters.

Similar to other neural networks, CNN also has an input layer, an output layer, and several hidden layers. These three types of layers are the core components for implementing the feature extraction of CNN. By using the gradient descent method to adjust the weight parameters in the network layer by layer, the model minimizes the loss function and improves the accuracy of the network through frequent iterative training. The low hidden layer of the convolutional neural network is composed of a convolutional layer and a maximum pool sampling layer. And there are hidden layer and logistic regression classifier of the full-connected layer corresponding to the traditional multi-layer perceptron. The input of the first fully connected layer is always a featured image with spatial and temporal dependencies obtained by feature extraction from the convolutional layer and the sub-sampling layer. The last layer of the output layer is a classifier that can be classified using logistic regression or SVM(support vector machine) or other methods.

### CNN Model Construction

As introduced above, through convolution between a convolution kernel and various regions of a two-dimensional input (e.g. a picture), Convolutional Neural Networks (CNN) can convert primary features of each region into higher-level features, serving as a feature extraction tool. Such function of CNN can be utilized to deal with our task. That is because the data input of a stock in one day is a two-dimensional one, one dimension being the set of features and the other being the time periods in a day; the input data are described in Table from later section. When it comes to the shape of convolution kernels, it is for certain that we do not need to use the common shapes in image identification like 3$\times$`<!-- -->`{=html}3 or 5$\times$`<!-- -->`{=html}5. When dealing with high frequency price-volume data, the shape of convolution kernels should be designed according to specific purposes.

E. Hoseinzade and S. Haratizadeh introduced a CNN structure to make predictions of stock price with a set of low frequency features. CNN framework proposed by this paper is inspired by their structure. That is because our task and data structure are very similar to those of theirs. The difference is that they use low frequency data with time period being day instead of minutes and features being low frequency ones like EMA10. The framework of theirs will be demonstrated in details when comparing with ours in following sections.

### CNN Framework Proposed

#### Convolutional Layer

In the framework by E. Hoseinzade and S. Haratizadeh , the first layer is a convolution layer in which convolution kernels are utilized to extract high-level features. And in CNN framework proposed by this paper, the same first layer is used. Specifically, since we use 11 price-volume features under the frequency of 15 minutes, convolution kernels with shape of 1$\times$`<!-- -->`{=html}11 are utilized. Each of those filters covers all the daily variables and can combine them into a single higher-level feature (i.e. high-level features). Such kernels can construct different combinations of primary variables using this layer. It is also possible for the network to drop useless features by setting their corresponding weights in the kernels equal to zero. So, this layer works as a feature extraction or feature selection module.

After the search of hyperparameters, we eventually decide to use 40 kernels, which takes both the training cost of the model and the prediction effectiveness into account. Through this convolution layer, we obtain 40 high-level features, which are extracted from 11 primary features. And the two-dimensional data structure changes from 16$\times$`<!-- -->`{=html}11 (time-period $\times$ original features) to 16$\times$`<!-- -->`{=html}40 (time-period $\times$ high-level features).

#### Fully Connected Layers

In these layers, the 16$\times$`<!-- -->`{=html}40 data generated by the CNN layer are flattened into a final feature vector. This feature vector is then converted to a final prediction through 2 fully connected layers (2 hidden layers). And the output layer has 4 neurons, with SoftMax function utilized as the activation function, intended to give the probability of a big rise, a small rise, a big drop, a small drop of a stock respectively, and then calculate the expectation of its daily return today to make stock purchase advice. The whole framework is demonstrated in Figure

# EXPERIMENT

## Data Processing

### Sources of Data

We have chosen the closing price, opening price, highest price, lowest price, trading volume, transaction amount, number of transactions, commission ratio, volume ratio, commission purchase, commission sale of the China A-share market. These 11 volume-price features are used as elements to describe the state of the stock. In order to train with market-represented stocks and reduce data inconsistency (such as stock suspension) and noise, we selected the constituents of the CSI300 Index, denoted as $I$, as the source of the sample data set. The model uses two types of data, every 15 minutes of data and every 120 minutes of data. The sample data is exhibited as in Table and .

### Time Period of Data

As for sample set, we choose the data in Figure from July 1,2014 to December 31, 2018, denoted as $M$, during which Chinese stock market witnessed periods of sharp rise, sharp fall, slight rise and slight fall, providing sufficient samples for each of our four labels. Since our ability of computation is insufficient, when we adjusted the model, we only used data from January,2019 to May,2019, denoted as $N$.

### Data Normalization

To speed up the convergence of the neural network and to eliminate the negative influence of the dimension of the feature data on the model \[2\], the feature vector $\bm{x}$ of each stock $i$ at each time $t$ is normalized by the equation as follows: $$\begin{aligned}
\bm{x}&=(x_{1},x_{2},\ldots,x_{11})\\
\quad x'_{k}&=\left\{\begin{array}{ll}

\displaystyle \frac{x_{k}-\mathop{\min}\limits_{t\in T}\{x_{k}\}}
{\mathop{\max}\limits_{t\in T}\{x_{k}\}-\mathop{\min}\limits_{t\in T}\{x_{k}\}}

&\qquad\quad\textrm{if }\
\mathop{\max}\limits_{t\in T}\{x_{k}\}-\mathop{\min}\limits_{t\in T}\{x_{k}\}\neq 0\vspace{2ex}\\

0&\qquad\quad\textrm{if }\
\mathop{\max}\limits_{t\in T}\{x_{k}\}-\mathop{\min}\limits_{t\in T}\{x_{k}\}=0

\end{array}\right.\\
\bm {x}'&=(x'_{1},x'_{2},\ldots,x'_{11})\\
\forall i&\in I,\ t\in T,\ k=1,2,\ldots,11\\
\end{aligned}$$ then convert $y$ from the rate of return to the category.

### Label Selection

We divide the daily rate of return into four categories: a big rise, a small rise, a big drop, a small drop. To avoid the problem of category imbalance, we use the sample to estimate the whole dataset. By taking the daily rate of return of all A-shares from June, 2014, to December, 2018 (closing price minus opening price) as a sample $J$, we calculate its quartile as the division point of the classification.

| $\mathbf{Labels}$ | $\mathbf{Fall\ Sharply }$ | $\mathbf{Fall\ Slightly}$ | $\mathbf{Rise\ Slightly}$ | $\mathbf{Rise\ Sharply}$ |
|:---|:--:|:--:|:--:|:--:|
| $\mathbf{Yields\ Interval}$ | $-10\%\sim-1.06\%$ | $-1.06\%\sim+0.04\%$ | $+0.04\%\sim+1.32\%$ | $+1.32\%\sim+10\%$ |

Labels selected

### Division of Training Set and Test Set

```latex
\begin{threeparttable}
        \begin{tabular}{cccccccccccc}
            \toprule
            $\mathbf{Time}$&$\mathbf{Close}$&$\mathbf{Open}$&$\mathbf{Highest}$&$\mathbf{Lowest}$&$\mathbf{Volume}$&$\mathbf{Amount}$&$\mathbf{NOT}$\tnote{1}&$\mathbf{CR}$\tnote{2}&$\mathbf{VR}$\tnote{3}&$\mathbf{CP}$\tnote{4}&$\mathbf{CS}$\tnote{5}\\
            \midrule
            09:45\tnote{6}&9.72&9.74&9.79&9.72&$2.38\times10^{6}$&$2.32\times10^{7}$&1327&1.77&1.43&$1.45\times10^{8}$&$5.93\times10^{7}$\\
            10:00&9.61&9.73&9.73&9.60&$3.63\times10^{6}$&$3.51\times10^{7}$&1716&2.30&1.81&$1.16\times10^{8}$&$4.85\times10^{7}$\\
            \vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots&\vdots\\
            15:00&9.70&9.70&9.71&9.68&$2.21\times10^{6}$&$2.14\times10^{7}$&728&0.21&0.89&$8.61\times10^{7}$&$1.54\times10^{8}$\\
            \bottomrule
        \end{tabular}

        \begin{multicols}{2}
            \begin{tablenotes}
            \footnotesize
            \item[1]number of transactions
            \item[2]commission ratio
            \item[3]volume ratio
            \item[4]commission purchase
            \item[5]commission sale
            \item[6]Chinese stock market opening time: \\9:30$\sim$11:30 and 13:00$\sim$15:00
            \end{tablenotes}
        \end{multicols}
    \end{threeparttable}
```

| $\mathbf{Time}$ | $\mathbf{Close}$ | $\mathbf{Open}$ | $\mathbf{Highest}$ | $\mathbf{Lowest}$ | $\mathbf{Volume}$ | $\mathbf{Amount}$ | $\mathbf{NOT}$ | $\mathbf{CR}$ | $\mathbf{VR}$ | $\mathbf{CP}$ | $\mathbf{CS}$ |
|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|:--:|
| 11:30 | 9.67 | 9.74 | 9.79 | 9.58 | $1.37\times10^{7}$ | $1.32\times10^{8}$ | 7429 | 1.75 | 1.03 | $1.13\times10^{9}$ | $4.23\times10^{8}$ |
| 15:00 | 9.70 | 9.70 | 9.71 | 9.68 | $2.21\times10^{6}$ | $2.14\times10^{7}$ | 728 | 0.21 | 0.89 | $8.61\times10^{7}$ | $1.54\times10^{8}$ |

Data Example 2        (Stock: SH600000    Date: Jan $2^{th}$, 2019)

We use the first 80% of the data set of dates as a training set and the rest 20% as a test set to avoid data snooping. The training set and the test set are compared during the training. The accuracy of the above can be used to determine whether the model is over-fitting or not. Our data set is shared by LSTM model and CNN model in the entire section. There are some differences in our training set: we still use $M$ as the data set. The LSTM model uses two types of data. The first is the time series of the price data for each 15 minutes of the previous day, 240 minutes or 16 steps in total, and the second is the price data for every 120 minutes in the first 10 days, which is a time series of 20 steps; CNN model uses one type of data, which is the volume data for every 15 minutes for the first five days.

## Experiment of the LSTM model

### Hyperparameter Selection for Loss Function and Optimizer

Because the model is to process classification problem, we chose the cross-entropy cost function as the loss function: $$Loss=-\frac{1}{m}\sum_{j=1}^{m}\sum_{i=1}^{n}y_{ji}\log(\hat{y}_{ji})$$

In this equation, $m$ is the total number of samples; $n$ is the total number of categories; $y_{ij}$ represents the real category (only 0 or 1), and $\hat{y}_{ij}$ is the probability of the corresponding category output by the softmax layer.

For the optimizer, we selected Adam, Adadelta, and RMSProp three adaptive optimizers for testing (learning rate is 0.001). The performance of different optimizers is represented in Figure . The test uses batch gradient descent method: there are 30 samples per batch and all samples do 50 iterations. Also, all the following tests are the same.

We use the early stopping to avoid overfitting at the $30^{th}$ epoch. The Confusion matrix thermograms of the three models which are normalized by index and are represented in Figure .

As can be seen from the graph, the Adadelta optimizer is inferior, and Adam optimizer and the RMSProp optimizer are equally effective. Therefore, according to this result, we chose Adam optimizer in our model.

### Regularization

Regarding the regularization method, we compared the performance of the same data using the dropout layer and L2 regularization (weight decay). L2 regularization adds a regular term to the loss function: $$C=C_{0}+\frac{\lambda}{2n}\sum_{w}w^{2}$$

where $C$ is the objective function, $C_{0}$ is the original penalty function—the cross-entropy cost function,$w$ is the parameter of the model, $n$ is the total number of model parameters, $\lambda$ is a hyperparameter. We have tried different parameters for lambda and plot the result in Figure .

Moreover, in Figure , we can see the confusion matrix thermogram for the three models at the $30^{th}$ epoch with using the early stopping to avoid overfitting is as follows, which is normalized by index.

Depend on the result showed in the graph, we can conclude that although L2 regularization can effectively avoid overfitting, using the dropout layer can make the model converge to a better solution fast. Hence, our model decides to use the dropout layer for regularization.

### Keep Probability of the Dropout Layer

Drop probability of the dropout layer The keep probability determines the probability that each data entering the dropout layer will be retained. We use different keep parameter parameters to test on $I$ to see its effect on the model in Figure .

The confusion matrix thermogram for the three models at the $30^{th}$ epoch ,with using the early stopping to avoid overfitting, normolized by index, are represented in Figure :

It can be seen from the graph that when keep probability is 0.8, it is better than 0.7, 0.9. The accuracy of the model prediction is higher, so we choose keep probability$=$`<!-- -->`{=html}0.8.

### Training the LSTM Model

We consider that the previous day's trading situation has a greater impact on the day, and the model should have a more sensitive and subtle understanding of it, which means that higher frequency data should be used for training. Moreover, the model should not ignore the long-term influence of fluctuations during the past several days. Then, it needs to use longer time intervals to learn the correlation between the data of the present day and several days before. Therefore, under the same network structure, we input two different forms of data, and train two prediction models, regarded as model $S$ and model $L$, that have a different emphasis on the stock market approach. And then we combine the prediction results of the two models to get the final output. The first type chooses the input data as the time series of the price data per 15 minutes of the previous day, 240 minutes in total, same as 16 steps. The training model predicts the next day's return $y$, and the second uses the price per 120 minutes in the first 10 days. The data with 20 steps predicts the next day's return $y$.

The training results are as follows:

It can be seen from the Figure that both models are valid compared to the random selection of 25% accuracy. And the model $L$ is better predicted than the model $S$. The confusion matrix thermodynamics of the two models at the $20^{th}$ epoch are in Figure , which are normalized by columns.

The brighter areas of the image are concentrated near the diagonal, which again demonstrates the validity of the model. The areas in the lower right and the upper left corner are the brightest, which indicates that the model has a more accurate prediction of the situation of sharply rise and fall, specifically, the precision ratio is higher. The darker area in the middle indicates that the model does not distinguish between small rises and small falls. Overall, we use the early stop strategy to set the checkpoint to use the two models at the $20^{th}$ epoch as the final model to predict.

## Experiment of the CNN Model

The CNN framework proposed here use the same date input as LSTM, so the data processing part is identical. Moreover, cross-entropy cost function is chosen as the loss function and Adam as the optimizer, the same as LSTM. See 3.3.1 and 3.3.2 for details. In following sections, the paper mainly focuses on the comparisons of different structures of framework, special regularization method for CNN and the expansion of input data. Experiment results are presented to help develop our theories.

### The Difference and Improvements from Framework by E. Hoseinzade and S. Haratizadeh

In this section, the difference between two frameworks is explained. Experiment results are employed to conclude that the CNN framework proposed here performs better. And we try to develop theories why.

From the framework in Figure , it can be seen that Ehsan Hoseinzade and Saman Haratizadeh's framework is more complicated, with 3 convolution layers, 2 pooling layers and one fully connected layer. As mentioned before, the first convolution layer has the same function as that our framework, which is to extract high-level features from primary ones. And the second convolution layer is to generate durational features by aggregating the information in consecutive time periods. So, convolution kernels of 3$\times$`<!-- -->`{=html}1 is utilized, which generate new durational features containing information from 3 consecutive time periods. Such design is inspired by the observation that most of the famous candle-stick patterns like Three Line Strike and Three Black Crows try to find meaningful patterns in three consecutive days. The third layer is a pooling layer that performs a 2$\times$`<!-- -->`{=html}1 max pooling, that is a very common setting for the pooling layers. Next, the third convolution layer is similar to the second one, intended to further extract durational features. It is followed by another same max pooling layer and a fully connected layer. In the very beginning, we chose to apply similar framework in our task, using 2 convolution layers to extract high-level features and durational features respectively, followed by a max pooling layer and finally a fully connected layer.

However, during experiments, we find that the average pooling layer performs better than a max pooling one. Better performance means higher accuracy rate in the test set in this section and those below. In Figure , we find that the removal of pooling layer leads to even better performance. Therefore, we assume that pooling layer is not suitable for our task, omitting too much information. So, we remove the pooling layer. After that, we find that the removal of the second convolution layer also leads to better performance. Our assumption is as follows: The idea of such layer is inspired by candle-stick patterns like Three Line Strike. It is a good idea to combine information of past consecutive 3 days to predict daily return today. But it should be noticed here that the time span of each time period that is combined with others should match that of the time period being predicted. For instance, it may be effective to combine information of 3 consecutive 15-minute periods to predict the price direction in the next 15-minute period. But such effectiveness might not be valid when the whole daily return of today is being predicted. So, we remove the second convolution layer. So far, there remain one convolution layer and a fully connected layer in our semi-finished framework. After experiment, we discover that adding another fully connected layer lead to better performance. Such change increases the depth of the framework and thus better capture the information hidden in the data. However, we also find that increasing the number of fully connected layers to 3 or more does not lead to obvious improvement. So, we decide to employ 2 fully connected layers, the number of neurons being 250 and 100 respectively and ReLU function as activation function.

### Comparison with DNN

We compare our convolution $+$ 2 fully connected layers framework with a framework with only 2 fully connected layers, and the result is in favor of ours. In Figure , this demonstrates that it is effective to use one convolution layer to extract high-level features.

### Regularization-SpatialDropout

In our CNN framework, besides commonly used dropout method in fully connected layers, our regularization methods also include SpatialDropout, a dropout method designed for CNN. Ordinary dropout method randomly chooses some components of input data without any fixed spatial patterns and turn them to zero, while SpatialDropout randomly chooses some rows or columns of input data and turn them to zero. According to Figure , such method is proved to be effective in image identification.

In our framework, when training our model, in each batch we employ such method to randomly choose 3 columns in input data and turn them to zero. That means we drop 3 out of 11 primary price-volume features and use 8 randomly left features to construct high-level features in each batch of the training set. Through this method, the model can learn to use different combinations of 8 primary features to construct high-level ones. It enhances CNN's ability to extract different features. In addition, the dropout methods themselves can be comprehend as a low-cost ensemble strategy, whose essence is similar to random forest. Specific to our task, SpatialDropout forces the framework to utilize randomly left features to approach the best model. In this way, each primary feature is supposed to make contribution to the final model, which prevents our model from placing extra emphasis on some primary features in the training set, and thus, from overfitting.

### Input Data of Five Days VS. One Day

After accomplishing improvements mentioned above, the accuracy on the test set is still not satisfying. We assume that the input data of one day is not sufficient to make predictions on the daily return today. Therefore, we consider elongating the time span on input data. Finally, we decide to 15-minute price-volume data in 5 past consecutive days to predict the daily return today. In Figure , the experiment result shows that it indeed improves the accuracy on the test set. We think this is because such elongation enables the model to better recognize the trends of features, which contributes to better predictions.

### Selection of Final Framework

In the end, we determine to use CNN+2Dense as the final framework and feed it with 15-minute price-volume trading data in 5 past consecutive days.

The performance in test set is presented in (Figure ,) , from which we can see that the accuracy approaches 42%, compared to 25% if the stocks are randomly chosen.

## Make Stock Purchase Advice

In the section of model construction, we mentioned that the softmax layer outputs the corresponding probability that the current sample belongs to four categories, and the one with the highest probability is its prediction result. In practical applications, we hope that the model not only predicts the classification of the sample but also want it can comprehensively consider the benefits and risks to directly give stock purchase advice. To achieve this purpose, we use the formula as follows: $$E=\frac{1}{2}\sum_{model\,1,2}
p(S\in \{Class\ k\})\,\bar w(Class\ k)$$ $S$ represents the input sample, and $\bar{w}(Class\ k)$ represents the mean of all the yields belonging to category $k$ in sample $J$, which we use to represent the expected rate of return for each category. $E$ represents the final prediction of the sample yield. The formula takes into account the possible rise and fall of the sample and the predictions of the two models. After sorting the final predicted rate of return, the higher the top-ranked stock, the more recommended it is.

# CONCLUSION

## Result Analysis

Finally, we connect the LSTM model and the CNN model to the backtesting framework, using the CSI300 Index as the baseline, and simulate trading from January 16, 2019 to May 31,2019. The specific trading operation is as follows: regarded $I$ as the stock pool, we trade according to the purchase proposal given by the model— considering the transaction fee, we only consider buying no more than 20 stocks with an predicted profit of 0.14% or more. The funds are allocated on average, and the portfolio are changed daily. Our results are represented in Figure , and Table .

|  | $\mathbf{LSTM\ \ model}$ | $\mathbf{CNN\ \ model}$ |
|:--:|:--:|:--:|
| $\mathbf{Time\ Begin}$ | 2019-01-16 |  |
| $\mathbf{Time\ End}$ | 2019-05-31 |  |
| $\mathbf{Baseline\ Simple\ Interest\ Rate}$ | $16.02\%$ |  |
| $\mathbf{Transaction\ Number}$ | $88$ | $93$ |
| $\mathbf{Winning\ Rate}$ | $51.14\%$ | $51.61\%$ |
| $\mathbf{Profit\ in\ Rate}$ | $31.36\%$ | $35.30\%$ |
| $\mathbf{Fee\ Cost\ in\ Rate}$ | $15.09\%$ | $15.69\%$ |
| $\mathbf{Net\ Profit\ in\ Rate}$ | $16.27\%$ | $19.61\%$ |
| $\mathbf{Maximal\ Draw\ Down\ in\ Rate}$ | $21.27\%$ | $25.43\%$ |
| $\mathbf{Interest/MDD\ (Rate)}$ | $79.48\%$ | $82.91\%$ |

Result of the backtest

It can be seen that both models have obvious outperform baselines regardless of the handling fee, which explains their effectiveness from another perspective. The model slightly outperforms the baseline when considering the handling fee. And the curves of the two models are more intense than the baseline changes, which means that they tend to make more aggressive decisions when trading. Therefore, it can be concluded that our model is effective in dealing with stock return prediction with high frequency primary price-volume data.

## Future Work

Through the above tests and analysis, we found that our two models have the advantages of fast convergence, strong generalization ability, and no need for construction factors. However, the accuracy of prediction still has a gap between our expectations. In the application of stock forecasting, LSTM and CNN are unable to achieve their superiority in the field of natural language processing and image processing. In future research, we want to utilize strengths of LSTM and CNN to construct a new model that combines CNN and LSTM. Specifically, we hope to use CNN's ability to automatically extract high-level features and enhance important features to construct factors. After CNN generating time series about high-level factors, this time series is then used as an input to the LSTM. Moreover, LSTM's sensitivity to time series is used to predict future stock price movements. This new model may overcome the difficulties of constructing factors and enhance our model's ability of prediction.

Also, the data used in our a set are price-volume features per 15 minutes and 120 minutes. Because of insufficient computing power, we did not use data per 1 minute or 5 minute. These higher frequency data can capture subtle information and tendency in stock market more precisely. Therefore, in the future, we can use price-volume features per 1 minute as our dataset to obtain more primary features and improve prediction accuracy.

Besides, because in our case we trade stocks everyday, it will generate a lot of unnecessary transaction fees. Considering the expense of transaction fees, we want to apply reinforce learning to maximize future profits. Moreover, it is easy to construct the environment of the complicated and sensitive stock market without constructing features by ourselves. Hence, reinforce learning is a feasible attempt in the future.

## Conclusion

This paper applies neural network of deep learning to construct two models of LSTM and CNN to forecast the expected return rate of the stock today, and to maximize the total return by adapting an appropriate strategy. We analyze the performances of LSTM and CNN and verify their effectiveness and rationalities for the application of forecasting stock prices. Although, these two models have overcame some difficulties, there is still a possibility of advancement such as avoiding unnecessary transaction fees. In our later works, we will focus on solving these problems.

## Acknowledgement

We would like to express sincere appreciations to Maxwell Liu from ShingingMidas Private Fund, Xingyu Fu from Sun Yat-sen University for their generous guidance throughout the project. Also, we are grateful to Kangkang Jiang from Sun Yat-sen University for his assistance all the way. Without their supports, we cannot complish such a challenging task.


abstract: The energy-momentum relationship of electrons on the surface of an ideal topological insulator forms a cone - a Dirac cone, which, when warped (no longer described by the Dirac equation), can lead to unusual phenomena such as enhanced electronic interference around defects and a magnetically ordered broken symmetry surface. A detailed spin-texture and hexagonal warping maps on Bi$_2$Te$_3$ are presented here.
author: M.Z. Hasan; H. Lin; A. Bansil
date: 2024-10-01
title: Spin-textures, Berry's phase and Quasiparticle Interference in Bi$_2$Te$_3$: A Topological Insulator with Warped Surface States

PRL-Viewpoints: Physics **2**, 108 (2009).

http://physics.aps.org/articles/v2/108

Unlike common ordered states of matter such as the crystalline solids and magnets characterized by some broken symmetry, the topological states of quantum matter are characterized by boundary properties that are highly robust or stable in the presence of disorder, fluctuations, and perturbations . The first example of a two-dimensional topological insulator was provided by the quantum Hall effect in an electron gas , which has no distinct three-dimensional topological generalization . Recent theoretical and experimental work indicates that strong spin-orbit coupling in insulators can produce a three-dimensional topological insulator, which is a completely new state of matter . This state is characterized by a surface Berry's phase, realized via an odd number of Dirac cones protected against disorder such as alloying . This is in sharp contrast to the case of graphene, which possesses an even number of Dirac cones.

The thermoelectric Bi-Sb alloys discovered to be topological last year provided the first example of a truly three-dimensional topological insulator . The experimental discovery of another thermoelectric family followed the Bi$_2$X$_3$ (X=Se,Te) series - harboring the same topological insulator states with a simpler surface spectrum . The large band gap (0.3 eV) topological insulator Bi$_2$Se$_3$ features a nearly ideal Dirac cone , but in the smaller band gap (0.15 eV) material Bi$_2$Te$_3$, with trigonal crystal potential, the cone is warped . Even though the cone is deformed with hexagonal symmetry, the Berry's phase quantifying the topological invariant remains unchanged, consistent with its topological order . Now, in an article appearing in the current issue of Physical Review Letters , Liang Fu of Harvard University in the US presents a perturbation calculation, which yields a hexagonal modulation of the surface states analogous to the existence of a nonlinear term in the spin-orbit interaction in the bulk crystal. (See Fig. 1 for an illustration using our results of a full-potential, self-consistent computation in Bi$_2$Te$_3$.) This leads to a number of remarkable predictions concerning the unusual physical properties induced by the warping of the surface states, which are distinct from the simpler "hydrogen-atom" version of the topological insulator discovered previously .

The spin and linear momentum of an electron on the surface of a topological insulator are locked-in one-to-one, as revealed in recent spin-resolved photoemission measurements : the electron is forbidden from moving backwards or taking a "U-turn" an effect that hinders its localization . This can be realized in a real material if the spins of electrons lying on the Dirac cone, but away from the apex (the Dirac node), rotate around in a circle at the Fermi level. Spins arranged in this way lead to a geometrical quantum phase known as Berry's phase with a value of $\pi$ . The work of Fu effectively shows that in the presence of a hexagonally deformed cone, the spins must acquire finite out-of-the-plane components to conserve the net value of Berry's phase, thus preserving the bulk topological invariant. The resulting finite value of the out-of-the-plane component opens up new possibilities for observing spectacular quantum effects.

Fascinating classes of new particles such as a Majorana fermion, or a magnetic monopole image, or a massive spin-textured Dirac particle can live on the surface of a topological insulator if a finite gap can be induced in the surface band with the chemical potential near the Dirac node . One approach is to create an interface between the topological insulator and a more conventional material such as a magnet or a superconductor, which can induce an energy gap in the Dirac bands. Alternatively, a magnetic field can be applied perpendicular to the sample surface. Until now it had been thought that a parallel magnetic field would neither open a gap nor lead to a surface Hall effect. However, when the surface states are warped significantly in a truly bulk insulating sample, as the work of Fu shows, a parallel magnetic field would open up a gap in the surface spectrum, enabling quantum Hall experiments to be carried out using relatively modest magnetic fields (less than 7 tesla) accessible in a typical laboratory setting. This is an exciting prospect since such experiments have so far not been possible because very high magnetic fields are needed for opening a gap.

In a truly bulk insulating sample, where the chemical potential is such that the hexagonal warping of the Fermi surface survives, one would expect to see a rare realization of the quantum Hall effect on the surface without the presence of Landau levels. In this way, one could observe a half-integer quantum of conductance per surface, which has not been possible so far in any known two-dimensional electron gas, including graphene, and thus allow experimental tests of currently debated scenarios for unusual antilocalization-to-localization transitions on a topological insulator . Presently realized Bi$_2$Te$_3$ is quite bulk-metallic with small resistivity , whereas spin-orbit insulators with high bulk resistivity values coupled with surface carrier control are needed to realize a functional topological insulator with which many more interesting experiments could be possible. Recent progress in making highly resistive Bi$_2$Se$_3$ coupled with surface carrier control heralds the potential dawn of a topological revolution. Similar improvements in sample resistivity are also called for in Bi$_2$Te$_3$.

The hexagonal warping of the surface cone and the resulting deviations from a circular Fermi surface provide a natural explanation for the enhanced magnitude of surface electronic interference effects recently reported around crystalline defects in Bi$_2$Te$_3$ . For a circular Fermi surface (Fig. 1, left), the electronic states at the Fermi surface cannot backscatter since in a fully spin-polarized band a consequence of time-reversal symmetry is that there are no available states into which electrons can scatter elastically. As a result, interference effects around the defects are small. With hexagonal warping, however, new electronic scattering channels open up, connected by various simple nesting vectors on the Fermi surface (see Fig. 1), and consistent with recent scanning tunneling measurements, the scattering due to defects becomes enhanced .

The ideal topological insulators displaying a perfect Dirac cone dispersion cannot support the formation of charge- or spin-density waves. However, in the presence of hexagonal or other forms of deformations of the surface band, such ubiquitous ordering instabilities are no longer forbidden, but rather present a competing ground state, which can circumvent the topological protection. Since electrons with opposite momenta possess opposite spins, a spin-density-wave state is favored if the Fermi surface has parallel segments that can be nested, as is seen to be the case for hexagonal deformation (see Fig 1, right). As one goes around the hexagonal Fermi surface, electrons will experience rapid changes in the out-of-the-plane spin component ($\sigma_z$) to maintain their overall Berry's phase value at $\pi$ , making the resulting spin-density wave appear quite exotic. A stripelike one-dimensional order on the topological surface may also be energetically possible.

Even more complex spin-density-wave orderings could be supported by other topological insulators that presently lack a tractable theoretical model. For example, Bi$_{1-x}$Sb$_x$ alloys display a central hexagonally deformed Dirac cone and additional surface states of complex character . Despite the complexity of its five surface bands and hexagonal warping, the Bi$_{1-x}$Sb$_x$ alloy topological insulator precisely exhibits $\pi$ Berry's phase and antilocalization just like the "hydrogen-atom" single-surface-Dirac-cone systems . This is a remarkable manifestation and demonstration of a deep and profound principle of physics - topological invariance. Thus the power and beauty of the topological order and invariance in nature are rather firmly established by studying systems that have complex "geometries," i.e., complex and warped surface states as in the Bi$_{1-x}$Sb$_x$ alloy series or Bi$_2$Te$_3$.

The most remarkable property of topological surface states is that they are expected to be perfect metals in the sense that they are robust and stable against most perturbations and instabilities towards conventional ordered states of matter. The warping of the surface states, even though it opens up interesting possibilities for studying this unusual state of matter in detail, ironically also opens up competing channels which provide a route for departure from the much sought after paradigm of perfect topological stability of the spin-textured metal . Most topological insulators lying hidden in nature are likely to harbor complex and warped surface states as in Bi$_{1-x}$Sb$_x$ and Bi$_2$Te$_3$.

Interestingly, even though the first three-dimensional topological insulators and their spin-textures carrying nontrivial Berry's phases were discovered only recently, we already have new materials emerging with physical properties lying in a regime where quantum effects associated with competing orders such as the spin-density waves can be foreseen. Parallel progress in theoretical modeling, hand-in-hand with experimental advances in spin-sensitive measurement methods, will likely be essential for unraveling and eventually exploiting the exotic spin textures and other beautiful properties of topological quantum matter .