# Anomaly Detection in Financial Time Series by Principal Component Analysis and Neural Networks +
## 6 Model Evaluation: Additional Results
### Sensitivity to Anomaly Amplitude  
Time series are manually contaminated as described in Section 3.2. The abnormal value \(S_{t_{j}}^{a_{j}}\) of the \(i\)-th time series results from a shock of the initial value of the time series denoted by \(S_{t_{j}}^{i}\) as stated in (9). We recall that the shock is represented by \(\delta\), whereas its amplitude \(|\delta|\) is uniformly drawn from \([0,\rho]\). Hence, \(\rho\) is the parameter that ultimately controls the amplitude of the anomaly. Since \(\rho\) is fixed by the user, it is interesting to investigate the sensitivity of the PCA NN approach's performance to the amplitude of the shock.  
The PCA NN approach evaluated in Sections 5.1 and 5.2 was calibrated on time series that were contaminated with the shock amplitude drawn from \(\mathcal{U}([0,\rho])\) with \(\rho=0.04\). For  
Figure 14: Precision–recall curve of the suggested model (in blue), the scores for the calibrated threshold (red plus), the no-skill model scores (green cross) for the training (**left**) and test sets (**right**).  
the data sets on which the model was calibrated and then evaluated, the anomalies were grouped according to the shock amplitude they resulted from. For the identification step, we distinguished four groups of contaminated times. For instance, the first line of Table 15 defines the first group of contaminated time series for which the anomaly resulted from the shock amplitude \(\in[0.309\times 10^{-2},1.46\times 10^{2}]\). For this first group with this specific range of amplitude, 77% of contaminated time series were identified during the PCA NN identification step.  
Similarly, for the localization step, we considered four groups of anomalies. The first line of Table 16 represents the anomalies with a shock amplitude \(\in[0.309\times 10^{-2},1.31\times 10^{-2}]\). A total of 86% of the anomalies belonging to this first group were correctly localized by the PCA NN localization step.  
The bounds defining each group were chosen to be the minimal value, 25%-quantile, 50%-quantile, 75%-quantile, and the maximum value over the shock amplitude. From the results in Tables 15 and 16, one can see that, except for the first group that represents the lowest shock amplitude, the detection ratios of the remaining groups are similar.  
The calibrated PCA NN approach's performance was then tested on new data sets contaminated with distinct values of \(\rho\). Figures 15 and 16 show that the \(F_{1}\)-scores are almost similar across the high values of \(\rho\) for both the training and test sets. Moreover, Figure 16 clearly shows the similar and high performance of the localization stage on both data sets, regardless of the value of \(\rho\).  
To conclude the section on the sensitivity of the model's performance to the amplitudes of the anomaly shocks, although it is clear that a lower performance was observed in the identification and localization of smaller amplitude shock anomalies, the detection ratio was still satisfactory for this category of anomalies.  
\begin{table}
\begin{tabular}{c c} \hline
**Amplitude Range (10\({}^{-2}\))** & **Detection Ratio** \\ \hline
[0.309, 1.31] & 0.86 \\
[1.31, 2.29] & 1.00 \\
[2.29, 2.88] & 1.00 \\
[2.88, 3.78] & 1.00 \\ \hline \end{tabular}
\end{table}
Table 16: Detection ratios of the correctly localized anomalies on the test set, with the anomalies grouped according to their shock amplitudes.  
\begin{table}
\begin{tabular}{c c} \hline
**Amplitude Range (10\({}^{-2}\))** & **Detection Ratio** \\ \hline
[0.309, 1.46] & 0.77 \\
[1.46, 2.34] & 0.91 \\
[2.34, 2.92] & 0.96 \\
[2.92, 3.78] & 0.98 \\ \hline \end{tabular}
\end{table}
Table 15: Detection ratios of the correctly identified contaminated time series in the test set, with the time series grouped according to their anomalies’ shock amplitudes.