\documentclass[mathematics,article,accept,pdftex,moreauthors]{Definitions/mdpi} 

\usepackage{verbatim}
\usepackage{pgfplots}
\usepackage{flafter}
\usepackage{underscore}
\usepgfplotslibrary{groupplots}
\pgfplotsset{width=10cm,compat=1.9}
\usepackage{makecell}
\usepackage{tcolorbox} 

\usepackage{listings}    
\usepackage{comment}
\usepackage{subcaption}
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\usepackage{graphicx}
\usepackage{float}

\tcbuselibrary{listings,breakable}


\lstset{
  language=Python,
  basicstyle=\ttfamily\small,
  keywordstyle=\color{blue!70!black},
  commentstyle=\color{gray},
  stringstyle=\color{orange!60!black},
  showstringspaces=false,
  frame=single,
  breaklines=true,
  tabsize=4,
  columns=fullflexible
}
\newcommand{\aname}{{{\it ForExAI}}}

\firstpage{1} 
\makeatletter 
\setcounter{page}{\@firstpage} 
\makeatother
\pubvolume{1}
\issuenum{1}
\articlenumber{0}
\pubyear{2026}
\copyrightyear{2024}
\externaleditor{Academic Editor(s): Name}
\datereceived{29 April 2024} 
\daterevised{1 June 2024}
\dateaccepted{4 June 2024} 
\datepublished{ } 

\hreflink{https://doi.org/}

\Title{\aname: Time Series Inference and News Article Analysis Lead to Profitable Foreign Exchange Trading}

\TitleCitation{\aname: Time Series Inference and News Article Analysis Lead to Profitable Foreign Exchange Trading}

\newcommand{\orcidauthorA}{0000-0002-7036-3312}
\newcommand{\orcidauthorB}{0000-0003-2985-9241}
\newcommand{\orcidauthorC}{0000-0000-0000-000X}

\Author{Beakal Lemeneh $^{1,\dagger}$, Eli Hadad $^{2,\dagger}$\orcidB{}, Allen George Ajith $^{3,\dagger}$, Yanbo Hou $^{4,\dagger}$, Charlie Zha $^{5,\dagger}$, Massimo Scarozza $^{6,\dagger}$, Zakaria Baannou $^{7,\dagger}$, Ermiyas Liyeh $^{8,\dagger}$, Anthony Tomasic, and Dennis Shasha $^{9,}$*$^{,\dagger}$\orcidA{}}

\AuthorNames{Beakal Lemeneh, Eli Hadad, Allen George Ajith, Yanbo Hou, Charlie Zha, Massimo Scarozza, Zakaria Baannou, Ermiyas Liyeh, Anthony Tomasic, and Dennis Shasha}

\AuthorCitation{Lemeneh, B.; Hadad, E.; Ajith, A.G.; Hou, Y.; Zha, C.; Scarozza, M.; Baannou, Z.; Liyeh, E.; Tomasic, A.; Shasha, D.}

\address{$^{1}$ \quad \hl{}NYU Langone Health, 550 1st Ave, New York, NY 10016 USA; Beakal.Lemeneh@nyulangone.org

$^{2}$ \quad
Universidade Presbiteriana Mackenzie - Centro de Ciências Sociais Aplicadas, Rua da Consolação 930, Sao Paulo, SP - 01302-907 - Brazil; eli.hadad@mackenzie.br 

$^{3}$ \quad  \hl{}Courant Institute of Mathematical Sciences, 251 Mercer Street, New York, NY 10012 USA; allen.ajith@nyu.edu

$^{4}$ \quad  \hl{}University of Waterloo, 200 University Ave W, Waterloo, ON N2L 3G1 CANADA; y82hou@uwaterloo.ca

$^{5}$ \quad  \hl{}Courant Institute of Mathematical Sciences, 251 Mercer Street, 
New York, NY 10012 USA; lz2609@nyu.edu

$^{6}$ \quad  \hl{}Baruch College, 55 Lexington Ave, New York, NY 10010 USA; massimo.scarozza@baruchmail.cuny.edu

$^{7}$ \quad  \hl{}International University of Rabat, Technopolis Rabat-Shore, Rabat-Salé Ring Road, 11000 Sala el Jadida, Morocco; zakaria.baannou@uir.ac.ma

$^{8}$ \quad  \hl{}University of Rochester, 500 Joseph C. Wilson Blvd, Rochester, NY 14627 USA; eliyeh@u.rochester.edu 

$^{9}$ \quad  \hl{}Carnegie Mellon University, 5000 Forbes Ave., Pittsburgh, PA 15213 USA; tomasic@cs.cmu.edu  \\
$^{10}$ \quad \hl{}Courant Institute of Mathematical Sciences, 251 Mercer Street, New York, NY 10012 USA; des1@nyu.edu}

\corres{Corresponding: des1@nyu.edu}

\abstract{Forecasting foreign exchange rates over long time periods depends on economic fundamentals. Short-term predictions, by contrast, depend largely on emotions, governmental announcements, the flow of capital, and expert commentary. This paper proposes a suite of novel methods, collectively referred to as \aname, to predict foreign exchange rates based on time series analysis and news article analysis. The time series analysis is based on classical statistical time series techniques, such as ARIMA, as well as machine learning methods using neural networks.
Separately, \aname\  uses Large Language Models to analyze news articles based on two kinds of prompts: (i) expert-written based on econometric considerations, (ii) existing prompts documented in the literature. Our findings on time series of exchange rates indicate that there are signals in the time series that can be captured even by simple methods like ARIMA(1,1,1), as well as novel machine learning methods on the time series of foreign exchange rate trades. Further, and this is our main conceptual contribution, a judicious use of the Kelly criterion can enhance both profits and the Sharpe ratio. Finally, an ensemble approach, in some cases, delivers slightly higher profit and also lower volatility, leading to a higher Sharpe ratio.
Regarding news article analysis, shorter prompts yield far better results than complex ones derived from expert knowledge. The contribution of this work is to show which methods work to forecast complex time series, as well as the relative virtues of different versions of the Kelly criterion and ensemble approaches. The results make a pragmatic contribution as well. While we measure profits by ignoring transaction costs, one implication is that these algorithms and workflows could be directly deployed by market-makers, since market-makers avoid transaction costs. In addition, our results point to further areas of research for traders. 
}

\keyword{high-frequency trading; foreign exchange; forecasting; transformers; N-BEATS; N-HiTS; ARIMA; Large Language Models; Expert prompts; Zero-shot learning; Event-driven algorithmic trading 
} 

\JEL{C45; C53; C63; G12}

\begin{document}

\section{Introduction}
\label{introduction}

Foreign exchange (FX) markets move more than 7.5 trillion United States Dollars (USD) each day, making them the most liquid but also one of the most volatile financial domains in the world \cite{bis2022}. Price dynamics are driven not only by their own autocorrelated technical patterns but also by exogenous macroeconomic events that are reported through global news outlets.

Statistical forecasting methods such as ARIMA \cite{box2015time} and neural networks capture autoregressive patterns yet ignore the semantic signals embedded in breaking headlines. In contrast, natural language processing (NLP) models that infer sentiment from news or social media often react after large moves have already materialized, so it is a struggle to convert their sentiment to profitable trades.

Motivated by these complementary shortcomings, we present \aname, a suite of forecasting frameworks that models both univariate time series inference and real‑time news article analysis to predict the direction of profitable trades. 

We study the currency pairs  USD/BRL (US dollar vs. Brazilian Real) and USD/CNY (US dollar vs. Chinese Yuan) markets over a 12-month period testing period. Note that the Brazilian Real trades relatively freely in foreign exchange markets, whereas the Yuan is relatively more regulated~\cite{von2024internationalization}. Our results show that \aname\ delivers statistically significant gains in total profit and profit-per-trade, for both exchange rates, assuming no transaction costs. Such results are useful both for further investigation for traders and for market makers because they do not have to pay transaction costs. 

\subsection{Contributions of \aname}

As a system, \aname\ makes the following contributions:
\begin{itemize}
\item
Studies the behavior and profitability of several high-capacity LLM-based time series models, several neural network-based forecasters for time series, mean reversion and trend techniques, as well as several Large Language Models for news sentiment,
\item 
Unifies these approaches through an ensemble model that explicitly learns each model's contribution,
\item 
Assesses the performance taking positions based on two variants of the  Kelly criterion as well fixed positions, and 
\item 
Compares and contrasts performance with state-of-the-art Natural Language systems for which code is available.
\end{itemize}

This paper describes the design choices made in the construction of \aname\ and experimentally documents the impact of these choices on trading performance. 

\section{Base Time Series Methods}

This section describes the forecasting and classification methods used to generate predictive signals for the trading strategies detailed in Section~\ref{sec:model-driven-strategies}, based solely on time series data (i.e., without looking at news) consisting of sequences of exchange rates.
We use several time series forecasting models that learn the next-step \emph{mid-price} from some subsequence of prices up to the current time:   classical econometric approaches such as ARIMA, (ii)  neural network architectures (N-BEATS, N-HiTS, and TCN); and (iii) large pre-trained foundation models (Chronos--Bolt and Toto) applied in a zero-shot forecasting setting without task-specific fine-tuning. The predicted mid-prices from these models serve as the basis for the model-driven trading strategies (Section~\ref{sec:model-driven-strategies}), which use the direction of the predicted price movement to determine whether to buy, sell, or hold a currency position.

\subsection{Classical Forecasting Models}

Traditional econometric models such as ARIMA and GARCH have served as foundational tools for modeling the autocorrelated structure of financial time series \cite{box2015time}. These models excel at capturing linear dependencies and volatility clustering, respectively, but struggle to generalize in the presence of non-stationarity or regime shifts.
When embedded in trading strategies, forecasts from an ARIMA(1,1,1) specification typically do not generate profits that are statistically different from random trading, reflecting the near-martingale behavior of financial results.

The Autoregressive Fractionally Integrated Moving Average (ARFIMA) model \cite{granger1980introduction} \cite{hosking1981fractional} \cite{beran2017statistics} is an extension of the standard ARIMA class of models, specifically designed to capture long memory and persistence in time series data. While traditional ARMA models are suited for short-memory processes where the influence of past shocks decays exponentially, and ARIMA models handle non-stationarity through integer differencing, 
many series in finance and economics exhibit a persistence that is stronger than an ARMA process but is still mean-reverting, unlike a unit-root process.

In ARFIMA models with $0<d<0.5$, convergence to the unconditional mean occurs slowly due to long memory. Therefore, although ARFIMA forecasts may display greater persistence at short and medium horizons, dynamic multi-step predictions eventually become flat, similarly to dynamic ARIMA models. This behavior is a direct consequence of the long-memory structure described in \cite{granger1980introduction}, \cite{hosking1981fractional} and \cite{baillie1996long}, rather than a limitation of estimation or model specification. For these reasons,  we  use  a static ARIMA model only.

\subsection{Neural Network-based Forecasting Models}\label{sec:forecastingmodels}

We consider two categories of neural network-based forecasting models: (i) models that are trained on the training dataset of the time series dataset, and (ii) large pre-trained foundation models applied in a zero-shot setting without task-specific retraining (though with hyperparameter selection).

\subsubsection{Models Requiring Training}\label{sec:trainedmodels}

The models requiring training include N-BEATS, N-HiTS, and the Temporal Convolution Network (TCN). Our experimental methodology replicates our previous work \cite{forecast6020024}, but we briefly summarize it here for completeness.

\textbf{N-BEATS}: N-BEATS \cite{oreshkin2019n} is a deep feedforward forecasting model built from a sequence of residual blocks that iteratively refine predictions. Each block produces two outputs: a “backcast,” which reconstructs the input window, and a “forecast,” which contributes to the final prediction \cite{oreshkin2019n}. This residual design helps isolate trend and seasonal components, enabling the model to progressively capture unexplained patterns while maintaining interpretability and strong predictive accuracy \cite{oreshkin2019n}. Our implementation uses one block and two stacks, each block consisting of five fully connected layers of width 512 with dropout (0.2).

\textbf{N-HiTS}: N-HiTS \cite{challu2023nhits} extends N-BEATS by introducing a hierarchical structure that models temporal patterns at multiple resolutions. By analyzing the time series at coarse and fine scales, the model captures both short-term fluctuations and longer-term dynamics \cite{challu2023nhits}. It also incorporates interpolation layers to enhance robustness and smoothness in the forecasts \cite{challu2023nhits}. Our implementation has one block and two stacks of five layers each, using feed-forward layers of width 512 and dropout 0.2.

\textbf{Temporal Convolution Network (TCN)}: TCNs \cite{lea2017temporal,bai2018empirical,electronics8080876} apply one-dimensional convolutions in a causal and dilated fashion, ensuring that each prediction depends only on past inputs while efficiently covering long time horizons. Residual and skip connections stabilize deep architectures, allowing the model to learn complex temporal dependencies without gradient degradation \cite{lea2017temporal,bai2018empirical,electronics8080876}. Our implementation uses eight convolutional layers with 64 filters and a kernel size of 3. A dilation base of 2 and weight normalization are applied, with dropout 0.2 for regularization.

\subsection{Zero-Shot Models}\label{sec:zeroshotmodels}

In contrast to the trained models, Chronos--Bolt and Toto are applied in a zero-shot forecasting setting. These models are large-scale, pre-trained time series foundation models, and we evaluate their out-of-the-box generalization to our data without fine-tuning.

\subsubsection{Chronos--Bolt}

 As described in detail in the related work section Section~\ref{sec:T5forTimeSeries}, Chronos--Bolt \cite{ansari2024chronoslearninglanguagetime} represents an evolution over the original Chronos framework (the Chronos authors request that the same paper reference be used for both Chronos and Chronos--Bolt) and serves as our initial benchmark in this category. In our experiments, we have used the 204M parameter Transformer-based model.

We ingest raw mid-price sequences, delegating the handling of non-stationarity to the model's intrinsic Instance Normalization layer. Given a historical context window $C$, the length of which is optimized via hyperparameter search in Section \ref{sec:exp1}, the input is standardized using its local moments. Consequently, the model operates within a normalized space defined by: $\hat{r} = \frac{r - \mu_{context}}{\sigma_{context}}$ where $\mu_{context}$ and $\sigma_{context}$ represent, respectively, the mean and standard deviation of the input window (which is the  time period and data that Chronos--Bolt looks at to make a prediction). This adaptive standardization enables the handling of local volatility without need for external scaling.

Chronos--Bolt generates probabilistic forecasts via a regression-based head, targeting a specific set of quantile levels defined during training  $\{0.10, 0.20, \dots, 0.90\}$.
This allows predictions to extend beyond the observed input range when supported by the underlying trend. For our trading signal, we isolate the median forecast ($0.50$ quantile) as the deterministic prediction, $\hat{r}_{pred}$. To recover the final price estimate, the inverse affine transformation is applied using the context statistics: $r_{pred} = \hat{r}_{pred} \cdot \sigma_{context} + \mu_{context}$.  Recall that $\mu_{context}$ and $\sigma_{context}$ are derived exclusively from the input window, thus can change as the time series evolves.

\subsubsection{Toto Foundation Model for Financial Time Series Forecasting} 

Toto \cite{cohen2024toto} is a large-scale 115M parameter foundation model for time-series forecasting that, like Chronos--Bolt \cite{ansari2024chronoslearninglanguagetime}, operates in a zero-shot setting. Toto is designed to generalize across diverse temporal domains without any task-specific fine-tuning. As such, it employs an internal instance normalization strategy similar to that of Chronos--Bolt to handle distributional shifts.  Consequently, we provide raw mid-price sequences to the model, relying on its internal mechanism to standardize inputs based on the local context statistics. This approach ensures that the model adapts to the specific volatility of the input window without requiring training set access.

During inference, Toto generates multiple probabilistic samples for each forecast point. In our experiments, we set the sampling parameter to 64 time steps. We then used the median prediction across samples as the final point forecast. We set the time interval to 60 seconds to reflect the one-minute spacing in our forex data.

\section{Event-Based News-Reading Forecasting Methods}\label{LLM-news}

\subsection{News Article Classification Prompts for the Chinese Yuan vs.~U.S.~Dollar}\label{all-prompts}

There are three news prediction prompts for the Chinese Yuan (CNY) vs.~U.S.~Dollar (USD): a Naive prompt, a Naive+ prompt,
and an Expert prompt. All prompts ask the LLM to classify a news article into three categories: 
\begin{itemize}
    \item $y = 1$: Expected CNY appreciation (exchange rate of CNY against USD increase)
    \item $y = -1$: Expected CNY depreciation (exchange rate of CNY against USD decrease)  
    \item $y = 0$: Neutral sentiment or conflicting signals
\end{itemize}

The Naive prompt specifies the minimal prompt to predict an article's impact on an exchange rate. This prompt serves as a baseline.

\begin{tcolorbox}[title=Naive Prompt, colback=white, colframe=black]
    Provide a sentiment analysis for the following article regarding the specified currency pair. Indicate whether each headline is positive 1, negative -1, or neutral 0 for the specified currency pair. Your response is only 1, 0, or -1
\end{tcolorbox}

\subsubsection{Naive+ Prompt}

The Naive+ prompt extends the Naive prompt with a reference to the relevant currency. This prompt allows for comparing and contrasting with the performance of the Naive prompt. Informally, we hypothesize that additional detail in the prompt will improve performance.

\begin{tcolorbox}[title=Naive+ Prompt, colback=white, colframe=black]
    Act as an expert of forex trading holding USD and CNY. Based on the article \{article\}, will you buy USD, sell USD or hold in the short term? Answer in one token: buy, sell, or hold.
\end{tcolorbox}

\subsubsection{Expert Prompt}

The Expert prompt is derived from discussions with one of the co-authors (E.H.), who is an economist. The prompt is designed to operationalize analyst-like behavior. The prompt is tailored specifically to the CNY/USD currency pair, targeting foreign-exchange analysis in offshore Chinese yuan and U.S. dollars. The Expert prompt includes illustrative examples, which are used to shape outputs and to enforce consistent labeling behavior across tasks.

The Expert prompt's construction follows a fixed, explicit sequence. First, a role is specified to establish the model’s standpoint and expected voice. Second, a task is defined to delimit the objective and scope of the response. Third, background information is provided in the form of abbreviations to standardize terminology and reduce ambiguity. Finally, multiple examples are appended, including news items mapped to corresponding labels and lexical cues in which specific words trigger specific labels. These elements are then combined to form the Expert prompt, integrating role specification, task definition, abbreviation-based background, and example-driven guidance into a single, deployable instruction.
\begin{tcolorbox}[title=Expert Prompt, colback=white,colframe=black,breakable,fontupper=\small]
\section*{Role Definition}
You are an AI analyst for the FX strategy team at JPMorgan Chase, specializing in foreign exchange trading and multi-market event analysis. Your task is to evaluate news texts immediately, determine their impact on the short-term CNY/USD movement, and return the final impact along with a brief transmission chain explanation. Your analysis should focus on global capital flows, U.S.–China policy dynamics, and cross-market arbitrage perspectives.

\section*{Task Requirements}
\begin{itemize}
    \item Analyze the keywords in the news and classify them under the factors listed below.
    \item Based on the identified keywords and their corresponding transmission paths, determine the impact on CNY:
    \begin{itemize}
        \item \texttt{1} (beneficial for CNY)
        \item \texttt{-1} (detrimental for CNY)
        \item \texttt{0} (unclear signal or insufficient information)
    \end{itemize}
    \item The output must be a single line JSON with one field:
    \begin{itemize}
        \item \texttt{"impact"}: the final judgment
    \end{itemize}
    \item Example output format:
\begin{verbatim}
{"impact": "1"}
\end{verbatim}
\end{itemize}

\section*{Abbreviations}
\begin{itemize}
    \item GDP: Gross Domestic Product
    \item CPI: Consumer Price Index
    \item PPI: Producer Price Index
    \item PMI: Purchasing Managers’ Index
    \item NFP: Non-Farm Payrolls
    \item VIX: Volatility Index
    \item Fed: Federal Reserve
    \item PBoC: People’s Bank of China
    \item RRR: Reserve Requirement Ratio
    \item FOMC: Federal Open Market Committee
    \item QE: Quantitative Easing
    \item QT: Quantitative Tightening
\end{itemize}

\section*{Classification and Labels}
\subsection*{General Economic Indicators}
\begin{itemize}
    \item China GDP Increase $\rightarrow$ label: 1
    \item China GDP Decrease $\rightarrow$ label: -1
    \item Stable China GDP $\rightarrow$ label: 0
    \item U.S. GDP Increase $\rightarrow$ label: -1
    \item U.S. GDP Decrease $\rightarrow$ label: 1
    \item Stable U.S. GDP $\rightarrow$ label: 0
    \item China CPI/PPI Higher than Expected $\rightarrow$ label: -1
    \item China CPI/PPI Lower than Expected $\rightarrow$ label: 1
    \item U.S. CPI Higher than Expected $\rightarrow$ label: 1
    \item U.S. CPI Lower than Expected $\rightarrow$ label: -1
    \item China PMI > 50 $\rightarrow$ label: 1
    \item China PMI < 50 $\rightarrow$ label: -1
    \item China PMI = 50 $\rightarrow$ label: 0
\end{itemize}

\subsection*{Central Bank \& Monetary Policy}
\begin{itemize}
    \item Fed Rate Hike $\rightarrow$ label: -1
    \item Fed Rate Cut $\rightarrow$ label: 1
    \item PBoC Rate Hike $\rightarrow$ label: 1
    \item PBoC Rate Cut $\rightarrow$ label: -1
    \item China RRR Cut $\rightarrow$ label: -1
    \item China RRR Raise $\rightarrow$ label: 1
    \item Fed QE $\rightarrow$ label: 1
    \item Fed QT $\rightarrow$ label: -1
\end{itemize}

\subsection*{Currency Market Dynamics}
\begin{itemize}
    \item CNY/USD breaks support (CNY appreciates) $\rightarrow$ label: 1
    \item CNY/USD breaks resistance (CNY depreciates) $\rightarrow$ label: -1
    \item PBoC sets Yuan Fixing stronger than expected $\rightarrow$ label: 1
    \item PBoC sets Yuan Fixing weaker than expected $\rightarrow$ label: -1
\end{itemize}

\subsection*{U.S. Specific Economic Terms}
\begin{itemize}
    \item Strong NFP $\rightarrow$ label: -1
    \item Weak NFP $\rightarrow$ label: 1
    \item FOMC Hawkish $\rightarrow$ label: -1
    \item FOMC Dovish $\rightarrow$ label: 1
\end{itemize}

\subsection*{China Specific Economic Terms}
\begin{itemize}
    \item China Stimulus $\rightarrow$ label: -1
    \item China Property Crisis $\rightarrow$ label: -1
    \item Capital Outflow Control Tightened $\rightarrow$ label: 1
    \item Capital Control Relaxed $\rightarrow$ label: -1
\end{itemize}

\subsection*{Geopolitical \& Trade Relations}
\begin{itemize}
    \item Trade Tensions Escalate $\rightarrow$ label: -1
    \item Trade Agreement Reached $\rightarrow$ label: 1
    \item U.S. Tariffs Increased $\rightarrow$ label: -1
    \item U.S. Tariffs Lowered $\rightarrow$ label: 1
\end{itemize}

\subsection*{Global Economic Context}
\begin{itemize}
    \item Global Slowdown $\rightarrow$ label: -1
    \item Global Rebound $\rightarrow$ label: 1
    \item High Oil Prices $\rightarrow$ label: -1
    \item Low Oil Prices $\rightarrow$ label: 1
\end{itemize}

\subsection*{Market Sentiment \& Risk Indicators}
\begin{itemize}
    \item Risk-off Sentiment $\rightarrow$ label: -1
    \item Risk-on Sentiment $\rightarrow$ label: 1
    \item VIX Spikes $\rightarrow$ label: -1
    \item VIX Falls $\rightarrow$ label: 1
\end{itemize}

\section*{Output Format}
\begin{itemize}
    \item Output must be a valid JSON string:
\begin{verbatim}
{"impact": "1"}
\end{verbatim}
    \item Only the \texttt{impact} field is allowed
    \item Values: \texttt{"1"}, \texttt{"-1"}, or \texttt{"0"}
\end{itemize}

\section*{Examples}
\begin{itemize}

    \item News: Offshore Yuan Climbs to Over a 1-Year High...

    Output: \texttt{\{"impact": "1"\}}

    \item News: PBoC to cut RRR by 50bps...

    Output: \texttt{\{"impact": "-1"\}}

    \item News: Trump administration likely to worsen US-China ties...

    Output: \texttt{\{"impact": "-1"\}}


    \item News: Investors await Thursday's GDP data...

    Output: \texttt{\{"impact": "0"\}}
\end{itemize}
\end{tcolorbox}

Note that these three prompts (Naive, Naive+, Expert) are used to predict the influence of single news articles on exchange rates. In Section~\ref{sec:tune}, we use training data to tune the hold period hyperparameter (in minutes)  for fixed-position size trading. Based on this analysis, we select the best-performing news event model for the USD/CNY exchange rate. 


\subsection{News Article Classification for the Brazilian Real vs.~U.S. Dollar}
\label{allen-prompts}

Focusing on the Brazilian Real (BRL)/United States Dollar (USD) exchange rate, we formulate sentiment classification as a three-class problem predicting exchange rate movement direction (up, down, or neutral) given news articles. We assess performance through profitability analysis, comparing trading strategies based on model predictions against market benchmarks.   

Given a news article, we use an LLM infers the expected direction of BRL movement. We formulate this as a three-class classification problem:
\begin{equation}
f_{\text{LLM}}(a) \rightarrow y \in \{\text{Down}, \text{Neutral}, \text{Up}\}
\end{equation}
where the predicted classes correspond to expected BRL/USD exchange rate movements:
\begin{itemize}
    \item \textbf{Up}: Expected BRL appreciation (USD/BRL rate decreases)
    \item \textbf{Down}: Expected BRL depreciation (USD/BRL rate increases)  
    \item \textbf{Neutral}: No significant movement or conflicting signals
\end{itemize}

\subsubsection{Choice of LLM Architecture}
In our initial experimentation, we evaluated several LLM architectures, including Llama 3.3 70B Instruct, Mistral Nemo Instruct 2407, and Gemini 2.5 Flash, assessing them across classification accuracy, computational efficiency, and output consistency. 
We adopted Gemini 2.5 Flash for all experiments based on its strong performance in preliminary evaluations on training data and practical advantages, including API accessibility and ease of deployment.

\subsubsection{Prompt Engineering Methodology}
We design a systematic prompt engineering strategy developed in collaboration with a financial expert (co-author E.H.), progressing through three distinct approaches with increasing levels of task specification and domain knowledge:

\paragraph{Basic Zero-Shot (P0):} Simple prompts establishing the basic role and task.

\begin{tcolorbox}[title=Zero Shot Prompt, colback=white, colframe=black, breakable, fontupper=\small]
You are an analyst working to get market movement signals for the BRL/USD foreign exchange market.

Analyze the provided Portuguese news content and assign a sentiment score:
\begin{itemize}
    \item +1 indicates that BRL is expected to rise (BRL strengthens vs USD)
    \item -1 indicates that BRL is expected to fall (BRL weakens vs USD)
    \item 0 indicates neutral sentiment, insignificant or conflicting signals
\end{itemize}

\textbf{News Heading:} \{heading\}\\
\textbf{News Content:} \{content\}

Analyze step-by-step, then conclude:
\begin{itemize}
    \item Reasoning: [Analyze the key economic factors and their likely impact on BRL/USD]
    \item Sentiment: [your score: -1, 0, or +1]
\end{itemize}
\end{tcolorbox}

\paragraph{Expert-Guided Zero-Shot (P1):} Comprehensive prompts developed with domain expert input, defining the classification task with financial criteria. These criteria include market drivers such as US Federal Reserve policy, Brazilian fiscal measures, trade balance, and commodity factors, with specific rules for each variable.

\begin{tcolorbox}[title=Expert-Guided Zero-Shot, colback=white, colframe=black, breakable, fontupper=\small]
You are a sentiment classifier for the foreign exchange market, focusing on BRL/USD. Analyze the provided news input and assign a sentiment score based on actionable insights:
\begin{itemize}
    \item +1 indicates that BRL is expected to rise.
    \item -1 indicates that BRL is expected to fall.
    \item 0 indicates neutral sentiment or conflict in news signals.
\end{itemize}

Base your assessment on the following actionable insights:

\textbf{Actionable Insights:}
\begin{itemize}
    \item If US Fed policy signals hawkishness (e.g., interest rate hikes or tightening liquidity), then BRL goes down. (Score: -1)
    \item If US Fed policy signals dovishness (e.g., interest rate cuts or easing monetary policy), then BRL goes up. (Score: +1)
    \item If US economic indicators (GDP, unemployment, CPI) are robust and stable, then BRL goes up. (Score: +1)
    \item If US economic indicators show weakness, such as high unemployment or rising CPI (inflation), then BRL goes down. (Score: -1)
    \item If Brazil implements proactive fiscal measures (active revenue measures, effective policy negotiations), then BRL goes up. (Score: +1)
    \item If Brazil shows fiscal indiscipline (policy abandonment, lack of compensatory measures, increased spending), then BRL goes down. (Score: -1)
    \item If the trade balance and commodity prices are positive (e.g., strong surplus, rising commodity prices), then BRL goes up. (Score: +1)
    \item If the trade balance and commodity prices are negative (e.g., deficits, falling commodity prices), then BRL goes down. (Score: -1)
    \item Better than expected Brazil GDP growth announcement: +1
    \item Worse than expected Brazil GDP growth announcement: -1
    \item If the Brazilian real depreciates sharply against major currencies, then investor confidence falls and BRL goes down. (Score: -1)
    \item If there is increased political risk or policy uncertainty, then sentiment turns negative and BRL goes down. (Score: -1)
    \item If the Central Bank signals a strong, credible commitment to anchor inflation and tighten policy effectively, then BRL goes up. (Score: +1) Otherwise, if its credibility is questioned, then BRL goes down. (Score: -1)
    \item If fiscal deficits widen or public debt becomes unsustainable, then BRL is expected to fall. (Score: -1)
    \item If foreign direct investment slows or capital outflows increase, then BRL goes down. (Score: -1)
    \item If multiple actionable insights conflict or signals are mixed, then neutral sentiment. (Score: 0)
\end{itemize}

\textbf{Multiple Indicators:}
\begin{itemize}
    \item A news article may contain multiple indicators pointing to different sentiment signals
    \item If multiple indicators point in the same direction, this increases confidence in the sentiment score
    \item When reporting sentiment, list all applicable indicators and their individual scores before providing the final sentiment assessment
\end{itemize}

\textbf{Key Market Drivers (for Actionable Insights):}
\begin{itemize}
    \item \textbf{1. US/External Factors:} Fed rates/policy changes (hawkish = -1; dovish = +1; mixed = 0); US economic indicators (GDP, unemployment, CPI; strong = +1; weak = -1)
    \item \textbf{2. Brazil Fiscal Measures:} Proactive fiscal actions $\rightarrow$ +1; Fiscal indiscipline $\rightarrow$ -1
    \item \textbf{3. Trade \& Commodity Factors:} Positive trade balance and rising commodity prices $\rightarrow$ +1; Negative trade balance and falling commodity prices $\rightarrow$ -1
    \item \textbf{4. Additional Brazil-Specific Factors:} Sharp depreciation of the real $\rightarrow$ -1; Increased political risk $\rightarrow$ -1; Central Bank Credibility (Credible $\rightarrow$ +1, Lack thereof $\rightarrow$ -1); Widening deficit $\rightarrow$ -1; Slowing FDI $\rightarrow$ -1
\end{itemize}

\textbf{News Heading:} \{heading\}\\
\textbf{News Content:} \{content\}

Analyze step-by-step, then conclude:
\begin{itemize}
    \item Reasoning: [Analyze the key economic factors and their likely impact on BRL/USD]
    \item Sentiment: [your score: -1, 0, or +1]
\end{itemize}
\end{tcolorbox}

\paragraph{Expert Framework with Examples (P2):} The expert-guided prompt enhanced with few-shot learning using curated examples per class selected to demonstrate the application of the actionable insights across diverse market scenarios, including fiscal policy changes, monetary policy shifts, and commodity price movements. After initial experimentation on the training data with 1, 3, and 5 examples per class, we selected 1 example per class as it best balanced performance with minimal computational overhead.

\begin{tcolorbox}[title=Expert Framework with one example per class, colback=white, colframe=black, breakable, fontupper=\small]
You are a sentiment classifier for the foreign exchange market, focusing on BRL/USD. Analyze the provided news input and assign a sentiment score based on actionable insights:
\begin{itemize}
    \item +1 indicates that BRL is expected to rise.
    \item -1 indicates that BRL is expected to fall.
    \item 0 indicates neutral sentiment or conflict in news signals.
\end{itemize}

Base your assessment on the following actionable insights:

\textbf{Actionable Insights:}
\begin{itemize}
    \item If US Fed policy signals hawkishness (e.g., interest rate hikes or tightening liquidity), then BRL goes down. (Score: -1)
    \item If US Fed policy signals dovishness (e.g., interest rate cuts or easing monetary policy), then BRL goes up. (Score: +1)
    \item If US economic indicators (GDP, unemployment, CPI) are robust and stable, then BRL goes up. (Score: +1)
    \item If US economic indicators show weakness, such as high unemployment or rising CPI (inflation), then BRL goes down. (Score: -1)
    \item If Brazil implements proactive fiscal measures (active revenue measures, effective policy negotiations), then BRL goes up. (Score: +1)
    \item If Brazil shows fiscal indiscipline (policy abandonment, lack of compensatory measures, increased spending), then BRL goes down. (Score: -1)
    \item If the trade balance and commodity prices are positive (e.g., strong surplus, rising commodity prices), then BRL goes up. (Score: +1)
    \item If the trade balance and commodity prices are negative (e.g., deficits, falling commodity prices), then BRL goes down. (Score: -1)
    \item Better than expected Brazil GDP growth announcement: +1
    \item Worse than expected Brazil GDP growth announcement: -1
    \item If the Brazilian real depreciates sharply against major currencies, then investor confidence falls and BRL goes down. (Score: -1)
    \item If there is increased political risk or policy uncertainty, then sentiment turns negative and BRL goes down. (Score: -1)
    \item If the Central Bank signals a strong, credible commitment to anchor inflation and tighten policy effectively, then BRL goes up. (Score: +1) Otherwise, if its credibility is questioned, then BRL goes down. (Score: -1)
    \item If fiscal deficits widen or public debt becomes unsustainable, then BRL is expected to fall. (Score: -1)
    \item If foreign direct investment slows or capital outflows increase, then BRL goes down. (Score: -1)
    \item If multiple actionable insights conflict or signals are mixed, then neutral sentiment. (Score: 0)
\end{itemize}

\textbf{Multiple Indicators:}
\begin{itemize}
    \item A news article may contain multiple indicators pointing to different sentiment signals
    \item If multiple indicators point in the same direction, this increases confidence in the sentiment score
    \item When reporting sentiment, list all applicable indicators and their individual scores before providing the final sentiment assessment
\end{itemize}

\textbf{EXAMPLES:}

\textbf{BULLISH (+1):}\\
"Para o acumulado de 2023, o consenso é de crescimento de 3,0\% do PIB, com projeções entre 2,8\% e 3,2\%."\\
Chain-of-Thought: Strong GDP growth consensus attracts foreign investment and strengthens BRL.\\
Current: +1

\textbf{BEARISH (-1):}\\
"Em meio aos impactos da guerra na Ucrânia e de uma possível recessão nos Estados Unidos - com impactos sobre a economia global -, o Banco Central continuou a apertar os cintos na política monetária."\\
Chain-of-Thought: Global economic uncertainty from Ukraine war and US recession fears creates external pressure requiring tighter monetary policy, typically negative for emerging market currencies.\\
Current: -1

\textbf{NEUTRAL (0):}\\
"O Copom reúne-se a cada 45 dias. No primeiro dia do encontro, são feitas apresentações técnicas sobre a evolução e as perspectivas das economias brasileira e mundial."\\
Chain-of-Thought: Procedural information about central bank meetings without policy implications creates no market expectation changes.\\
Current: 0

\textbf{Analyze step-by-step, then conclude:}
\begin{itemize}
    \item Reasoning: [Analyze the key economic factors and their likely impact on BRL/USD]
    \item Sentiment: [your score: -1, 0, or +1]
\end{itemize}
\end{tcolorbox}

Similar to our proposed USD/CNY prompts, in Section~\ref{sec:tune}, we use training data to tune the hold period hyperparameter (in minutes) for fixed-position size trading. Based on this analysis, we select the best-performing news-event model for the USD/BRL exchange rate. 

\subsection{Comparative News-Event Model Baselines}
\label{sec:Fatouros_Comparison}

To establish a comparative baseline for news-event trading, we adopt the prompt engineering framework proposed by Fatouros et al.~\cite{fatouros2023transforming}, originally evaluated on FinBERT and GPT-3.5. For our experiments, we employ Llama 3.1 8B Instruct \cite{grattafiori2024llama3herdmodels} as the generative backbone. While Fatouros et al. utilized six distinct prompts, we restrict our evaluation to the four instance-level (an instance is a single headline) prompts listed below. We exclude the remaining two prompts, which group all the headlines of a given day, because we wanted to compare the approaches on single articles. (In \cite{fatouros2023transforming}, the authors report that no single prompt performed best everywhere, so this exclusion doesn't eliminate their best-performing approach.)
During inference, we utilize a temperature setting of 0.20, dynamically substituting the template variables (prefixed with \$) with the corresponding ticker symbol and headline text. In instances where the model output deviates from the expected token vocabulary, the sample is assigned a 'neutral' label.

\begin{tcolorbox}[title=Prompt 1, colback=white,colframe=black]
\begin{tabular}{@{}p{\dimexpr\linewidth\relax}@{}}
Act as a financial expert holding \$ticker. How do you feel about the headline \$headline? Answer in one token: positive, negative, or neutral.
\end{tabular}
\end{tcolorbox}

\begin{tcolorbox}[title=Prompt 2,colback=white,colframe=black]
\begin{tabular}{@{}p{\dimexpr\linewidth\relax}@{}}
Act as a financial expert. Classify the sentiment for \$ticker based only on the headline \$headline. Answer in one token: positive, negative, or neutral. 
\end{tabular}
\end{tcolorbox}

\begin{tcolorbox}[title=Prompt 3,colback=white,colframe=black]
\begin{tabular}{@{}p{\dimexpr\linewidth\relax}@{}}
Act as a sentiment analysis model trained on financial news headlines. Classify the sentiment of the headline \$headline. Answer in one token: positive, negative, or neutral.
\end{tabular}
\end{tcolorbox}

\begin{tcolorbox}[title=Prompt 4, colback=white,colframe=black]
\begin{tabular}{@{}p{\dimexpr\linewidth\relax}@{}}
Act as an expert at forex trading holding \$ticker. Based only on the headline \$headline, will you buy, sell or hold \$ticker in the short term? Answer in one token: positive for buy, negative for sell, or neutral for hold position.
\end{tabular}
\end{tcolorbox}


\label{sec:swissbank_comp}

A second sentiment analysis approach is the prompt engineering framework proposed by Ballinari and Maly~\cite{repec:snb:snbwpa:2025-11}. Their study provides a comparative analysis spanning rule-based lexical systems (Loughran-McDonald, VADER), domain-specific encoders (FinBERT), and the generative Llama 3.1 8B Instruct model, evaluating the latter in both zero-shot and task-specific fine-tuned configurations.
 For our experiments, we utilize the Llama 3.1 8B Instruct model with its official off-the-shelf weights. Following default settings, inference is conducted at a temperature of 0.6. We dynamically populate the template placeholders (denoted by \$) with the specific ticker, title and body text of each news entry to generate directional labels for the target currency.

 Note that, following the usage of comparative models in the literature, the trading strategy for these models is "hold until the close of the day." In contrast, for our prompts in Section~\ref{sec:tune}, we treat the hold period as a hyperparameter and tune it for each prompt. 


\begin{tcolorbox}[title=Ballinari and Maly Prompt, colback=white, colframe=black]
Title: \$title\\
Text: \$text\\

Instructions:\\
Objective: For each mentioned currency, answer the following questions:\\
- What has been the current/past movement of the currency (appreciation, depreciation, or unchanged)?\\
- What is the future expectation for the currency (appreciation, depreciation, or unchanged)?\\
You must answer these two questions for each of the following currencies mentioned in the article:\\
USD_past: "appreciation, depreciation, or unchanged",\\
USD_future: "appreciation, depreciation, or unchanged",\\
{\$second_currency}_past: "appreciation, depreciation, or unchanged",\\
{\$second_currency}_future: "appreciation, depreciation, or unchanged"\\

Output Format:\\
- Important: Provide your answer in separate rows for each currency as shown above. Do not combine multiple currencies in the same row.\\
Each currency should have its own line with "_past" or "_future" specified.\\

Example:\\
- If the article states, "The USD is expected to appreciate," the output should be:\\
USD_past: "unchanged",\\
USD_future: "appreciation"\\
- If the article states, "USD/{\$second_currency} depreciated last week," the output should be:\\
USD_past: "depreciation",\\ {\$second_currency}_past: "appreciation"\\
- If only future movements are mentioned for a currency, the past movement should be labelled as "unchanged" and vice versa.\\

Currency Pair Interpretation:\\
- If currencies are discussed in pairs, interpret as follows:\\
- If "USD/{\$second_currency} appreciated," label USD_past as "appreciation" and {\$second_currency}_past as "depreciation".\\
- If "USD/{\$second_currency} depreciated," label USD_past as "depreciation" and {\$second_currency}_past as "appreciation".
\\Synonyms:
\\- Recognize the following synonyms for each currency:
\\- **EUR**: EUR, Euro
\\- **USD**: USD, Dollar, Dollars, US Dollar, US-Dollar, U.S. Dollar, US Dollars, US-Dollars, U.S. Dollars, Greenback
\\- **BRL**: BRL, Brazilian Real, Real, Reais, R\$\$, Pila, Prata, Mango, Pau, Conto, Réis, Brazilian currency.
\\- **CNY**: CNH, CNY, Chinese Yuan, Yuan, Renminbi, RMB, ¥, CN¥, Redback, Kuài, Offshore Yuan, Offshore Chinese Yuan, Offshore Renminbi, People's Currency.
\\- **JPY**: JPY, Yen, Japanese Yen
\\- **GBP**: GBP, Pound, Pounds, Sterling, British Pound, British Pounds
\\- **AUD**: AUD, Australian Dollar, Australian Dollars, Aussie
\\- **CAD**: CAD, Canadian Dollar, Canadian Dollars
\\- **CHF**: CHF, Swiss Franc, Swiss Francs, Swissie
\\- **NZD**: NZD, New Zealand Dollar, New Zealand Dollars, Kiwi
\\- **NOK**: NOK, Norwegian Krone, Norwegian Kroner
\\- **SEK**: SEK, Swedish Krona, Swedish Kronor
\end{tcolorbox}

\section{Datasets}
We use three main datasets: foreign exchange price data, financial news articles, and a collection of news articles, a subset of which are labeled by an expert.
Prices reflect short-term market dynamics (within a few minutes), while news may take longer to have an effect, and its effect may last longer. 

\subsection{FX price data}
The foreign exchange price data were obtained from \url{https://massive.com} \cite{massive}, which provides historical and real-time financial market data. For this study, we focus on two major currency pairs involving the U.S. dollar: USD/CNY (U.S. dollar vs. Chinese Yuan) and USD/BRL (U.S. dollar vs. Brazilian Real). 

Both the bid (buy) and ask (sell) prices were collected at each trade to compute the mid-price, as defined in Equation~\ref{eq:mid_price}. The resulting mid-price series serves as the primary signal for both model training and inference during trading simulations. The data were collected at a resolution of at most one minute.

The overall sample covers the period from January 1, 2024 to July 31, 2025. Specifically, the training dataset spans January 1 – June 30, 2024 (used to train the models described in Section~\ref{sec:trainedmodels}); the validation dataset spans July 1 – July 31, 2024 (used to select the best model through a hyperparameter search over the input context length across all models described in Section~\ref{sec:forecastingmodels}); and the test dataset spans August 1, 2024 – July 31, 2025 (used to run the selected model as a forecaster with the trading strategies described in Section~\ref{sec:tradingstrategies} to generate the out-of-sample results presented in Section~\ref{sec:result-perf} for both currency pairs).
For testing, trading was simulated between 9 a.m.~and 5 p.m.~U.S.~Eastern time, when the markets are most active.


\subsection{News Articles}


Brazilian Real    
News Articles: The articles used in our experiments span the period from January 12, 2024, to July 30, 2025, comprising a total of 20,543 articles. These articles were scraped, cleaned, and aggregated from Bom Dia Mercado (Good Morning Market, \url{www.bdm.com.br}), a Brazilian financial news wire service. The dataset contains articles with corresponding timestamps at minute-level granularity. The dataset was divided as follows: 769 articles from January 12, 2024 through June 30, 2024 were used for training, and the remaining 19,774 articles in the dataset from August 1, 2024 through July 30, 2025 were used for testing.

Chinese Yuan News Articles: The news articles for our experiment were collected between January 19, 2024, and July 30, 2025.  In total, 2,683 news articles for the currency pair U.S. Dollar and Yuan were obtained over this period, with timestamps recorded at the minute level. We divide the dataset into a training set containing 826 articles from January 19 to June 30, 2024, and a test set containing 1,857 articles from August 1st, 2024, to July 30, 2025.  The news articles themselves were drawn from the LSE Thomson Reuters newswire service \cite{lsethomsonreuters}. 

\section{Time Series-based Trading Strategies }
\label{sec:tradingstrategies}

Time series-based trading strategies look only at the time series of exchange rates, not at news articles or other quantitative indicators. These strategies act on the \emph{mid-price}, defined as the average of the bid and ask quotes:
\begin{equation}\label{eq:mid_price}
r_t = \frac{askPrice_t + bidPrice_t}{2},
\end{equation}
where $r_t$ denotes the mid-price of the USD/CNY or USD/BRL exchange rate at time $t$, 
$askPrice_t$ is the ask price at time $t$, and $bidPrice_t$ is the bid price at time $t$. Here, Currency A is the base currency (USD) and Currency B is the quote currency (CNY or BRL). A ``buy'' action corresponds to going long on USD (buying Currency A, selling Currency B), while a ``sell'' action corresponds to going short on USD (selling Currency A, buying Currency B). The holding time is one minute. In an environment with transaction costs, holding times may be extended if the current position (e.g., long on currency X and short on currency Y) is still suggested by the model at the end of the holding period.

At each time step $t$, the fractional change in mid-price is computed as:
\begin{equation}\label{eq:mid_price_delta}
\Delta_t = \frac{r_t - r_{t-1}}{r_{t-1}}.
\end{equation}


\subsection{Rule-Based Strategies}\label{sec:rule-based-strategies}

The strategies Mean Reversion and Trend operate purely on previously observed changes in exchange rates. They rely on rule-based heuristics that predict that exchange rate changes will reverse or that they will continue.

\subsubsection{Mean Reversion Strategy}\label{sec:mean-reversion-strategy}

The mean reversion strategy assumes that deviations from recent trends are temporary and prices will revert to their previous states. The trading decision is defined as:
\begin{equation}\label{eq:mean_rev_rule}
d_t =
\begin{cases}
\text{sell} & \text{if } \Delta_t > \Delta_{t-1}, \\
\text{buy} & \text{if } \Delta_t < \Delta_{t-1}, \\
\text{no trade} & \text{otherwise}.
\end{cases}
\end{equation}

\subsubsection{Trend Strategy}\label{sec:trend-strategy}

The trend-following strategy assumes that price movements will persist in the same direction. The decision rule is the opposite of mean reversion:
\begin{equation}\label{eq:trend_rule}
d_t =
\begin{cases}
\text{sell} & \text{if } \Delta_t < \Delta_{t-1}, \\
\text{buy} & \text{if } \Delta_t > \Delta_{t-1}, \\
\text{no trade} & \text{otherwise}.
\end{cases}
\end{equation}

\subsection{Model-Driven Strategies}\label{sec:model-driven-strategies}

The second group of strategies consists of machine learning models as described in Section \ref{sec:forecastingmodels}, either directly or as part of an ensemble system. These models infer the next mid-price based on historical context.

Formally, given the past $n$ timesteps, a model $f(\cdot)$ forecasts the mid-price at $t+1$:
\begin{equation}\label{eq:forecast_pred}
\hat{r}_{t+1} = f(r_t, r_{t-1}, \dots, r_{t-n+1}),
\end{equation}
where $f(\cdot)$ corresponds to machine learning (ML) models and large language models (LLMs) adapted for time series forecasting, detailed in Section~\ref{sec:forecastingmodels}, and $n$ represents the input context length of the model.

The predicted percentage change is:
\begin{equation}\label{eq:forecast_pred_rate}
\hat{\Delta}_{t+1} = \frac{\hat{r}_{t+1} - r_t}{r_t}.
\end{equation}

The trading rule is as follows:
\begin{equation}\label{eq:forecasting_rule}
d_t =
\begin{cases}
\text{buy} & \text{if } \hat{\Delta}_{t+1} > 0, \\
\text{sell} & \text{if } \hat{\Delta}_{t+1} < 0, \\
\text{no trade} & \text{if } \hat{\Delta}_{t+1} = 0.
\end{cases}
\end{equation}

Note that our method applies no threshold beyond zero, because the predicted percentage changes $\hat{\Delta}_{t+1}$ are typically extremely small. This makes it difficult to define a meaningful non-zero cutoff. Therefore, any positive predicted change is treated as an upward movement and any negative predicted change as a downward movement.

\subsection{Ensemble Strategy}\label{sec:ensemble-strategy}

The ensemble strategy consolidates the predictive signals produced by the previously described strategies, using a regression model to infer the next price movement directly from the real-valued percentage changes predicted by each strategy.

At each time step $t$, let $\hat{\Delta}^{(\mathrm{MR})}_{t+1}$ denote the predicted percentage change generated by the mean reversion strategy. The trend strategy is not included, as its predicted price change is exactly the negative of mean reversion and would therefore add no new information. Let $\hat{\Delta}^{(i)}_{t+1}$ denote the predicted percentage change produced by the $i$-th forecasting model, where $i \in \{1, \dots, m\}$ and the forecasting models are described in Section~\ref{sec:forecastingmodels}.

The ensemble feature vector at time $t$ is constructed by concatenating these real-valued predictions:
\begin{equation}\label{eq:ensemble_input_new}
\mathbf{x}_t = 
\left[
\hat{\Delta}^{(\mathrm{MR})}_{t+1},
\;
\hat{\Delta}^{(1)}_{t+1},
\hat{\Delta}^{(2)}_{t+1},
\dots,
\hat{\Delta}^{(m)}_{t+1}
\right].
\end{equation}

A regression function $g(\cdot)$, implemented as a Ridge Linear Regressor, is trained to map this feature vector to the actual percentage change in mid-price observed at the next timestep:
\begin{equation}\label{eq:ensemble_regression_target}
\hat{\Delta}^{(\mathrm{ens})}_{t+1} = g(\mathbf{x}_t).
\end{equation}
The model is trained using historical data, where the supervision signal is the realized mid-price change:
\begin{equation}\label{eq:realized_change}
\Delta_{t+1} = \frac{r_{t+1} - r_t}{r_t},
\end{equation}
computed using mid-prices outside market hours to avoid lookahead bias.

The resulting predicted change $\hat{\Delta}^{(\mathrm{ens})}_{t+1}$ is then converted into a trading action. As with the model-driven strategies, no explicit threshold is applied because predicted changes are typically extremely small in magnitude:
\begin{equation}\label{eq:ensemble_decision_rule}
d_t =
\begin{cases}
\text{buy} & \text{if } \hat{\Delta}^{(\mathrm{ens})}_{t+1} > 0, \\
\text{sell} & \text{if } \hat{\Delta}^{(\mathrm{ens})}_{t+1} < 0, \\
\text{no trade} & \text{if } \hat{\Delta}^{(\mathrm{ens})}_{t+1} = 0.
\end{cases}
\end{equation}

\section{Time Series-based Trading: Kelly-Based Position Sizing} \label{sec:kelly-position-size}

The Kelly fraction is computed dynamically to adjust position sizes based on the observed performance of each trading strategy.

For each strategy (e.g., mean reversion, Chronos--Bolt) we maintain and update after every trade:
\begin{itemize}
    \item $numWins$, $numLosses$: counts of winning and losing trades,
    \item $totalGains$: sum of positive profits,
    \item $totalLosses$: sum of absolute losses.
\end{itemize}
Thus, $numWins$, $numLosses$, $totalGains$, and $totalLosses$ all change after each new trade.

From these running statistics, after trade $t$ we estimate:
\begin{align}
    \hat{p}_t &= \frac{numWins_t}{numWins_t + numLosses_t}, \\
    \hat{q}_t &= 1 - \hat{p}_t, \\
    \bar{G}_t &= \frac{totalGains_t}{numWins_t}, \\
    \bar{L}_t &= \frac{totalLosses_t}{numLosses_t}, \\
    b_{t} &= \frac{\bar{G}_t}{\bar{L}_t}.
\end{align}
Here $b_{t}$ is the empirical win–loss ratio based on realized trades.

To incorporate the model's prediction for the current trade, we also keep track of predicted gains. Let
\begin{align}
    \hat{g}_t &= \text{model-predicted gain for trade } t, \\
    \bar{g}_t &= \frac{1}{t} \sum_{s=1}^{t} \hat{g}_s
\end{align}
be the running average of all predicted gains up to and including trade $t$ (even for trades that ultimately lose). We then define a prediction-based weight
\begin{equation}
    h_t = \frac{\hat{g}_t}{\bar{g}_t},
\end{equation}

The Kelly fraction for trade $t$ is then 
\begin{equation}
    f_t^{\text{Kelly}} = \hat{p}_t - \frac{\hat{q}_t}{h_t \cdot b_t}.
    \label{eq:classic-kelly}
\end{equation}

In practice, we separate the procedure into a short ``warm-up'' phase and a Kelly-driven phase. For the first $N = 120$ trades, we do not trust the early estimates of $\hat{p}_t$, $\bar{G}_t$, and $\bar{L}_t$ (because there are too few wins and losses), so we use a fixed, small fraction,
\begin{equation}\label{eq:kelly_fixed_fraction}
    f_t = 0.5\% = 0.005, \qquad t \le N,
\end{equation}
solely to accumulate enough data to stabilize $numWins$, $numLosses$, $totalGains$, and $totalLosses$.

After this warm-up period ($t > N$), we switch to the model-weighted Kelly fraction \eqref{eq:classic-kelly} to size positions:
\begin{equation}\label{eq:q_kelly}
    f_t =
    \begin{cases}
        f_t^{\text{Kelly}}, & \text{if } f_t^{\text{Kelly}} > 0, \\
        0, & \text{if } f_t^{\text{Kelly}} \le 0.
    \end{cases}
\end{equation}
The Kelly formula can produce negative values when either the probability of losing is high, or the win–loss ratio is unfavorable. In those cases, we set the Kelly fraction to 0 and trade nothing.

\subsection{Active vs.~Passive Kelly}\label{active-passive-kelly-definition}

We call a strategy that changes $\hat{p}_t$,  $\hat{q}_t$, $\bar{G}_t$, and $\bar{L}_t$ only when equation  model actually trades {\em  Active Kelly}. That is, only when  Equation \ref{eq:q_kelly} is in the case  $f_t^{\text{Kelly}} > 0$, do any of $\hat{p}_t$,  $\hat{q}_t$,    $\bar{G}_t$, or $\bar{L}_t$.

However, even when a method under Kelly trades nothing, it could still keep track of whether its predictions were correct or not. That would influence $\hat{p}_t$ and $\hat{q}_t$. Thus, if a prediction were correct, that could increase $\hat{p}_t$ even though no trade happens. However, for the purpose of the calculations of $\bar{G}_t$ and $\bar{L}_t$, $numWins_t$ and $numLosses_t$ are affected only by situations in which an actual trade based on the prediction takes place.  We call a strategy that changes $\hat{p}_t$ and  $\hat{q}_t$, though  not $\bar{G}_t$, and $\bar{L}_t$ even when Kelly suggests a zero bet  {\em Passive Kelly}.

Formally, we keep track of another two variables $numWinsAll_t$ and $numLossesAll_t$ that are updated every time a prediction is made, regardless of whether $f_t^{\text{Kelly}} > 0$. In contrast, $numWins_t$ and $numLosses_t$ are updated only when $f_t^{\text{Kelly}} > 0$. The update rules then proceed as follows:

\begin{itemize}
\item
$numWins$, $numLosses$: counts of winning and losing trades,
\item 
$numWinsAll$, $numLossesAll$: counts of winning and losing predictions
\end{itemize}

\begin{align}
    \hat{p}_t &= \frac{numWinsAll_t}{numWinsAll_t + numLossesAll_t}, \\
    \hat{q}_t &= 1 - \hat{p}_t, \\
    \bar{G}_t &= \frac{totalGains_t}{numWins_t}, \\
    \bar{L}_t &= \frac{totalLosses_t}{numLosses_t}, \\
    b_{t} &= \frac{\bar{G}_t}{\bar{L}_t}.
\end{align}

That is, only the calculation for $\hat{p}_t$ changes, which causes the calculation for  $\hat{q}_t$ to change. The calculations for $\bar{G}_t$ and $\bar{L}_t$ remain the same because we don't want to dilute the gain calculations with zero-position-sized trades.

\section{News Article-time Trading: Position Size and Hold Period}
\label{position-sizing}

Our LLM models for news analysis predict only the direction of a currency exchange rate change based on the content of the article. These predictions are converted into a fixed-sized and fixed-hold period trading strategy.  We use a fixed-sized bet rather than a variable Kelly-based method because news article analysis predicts only a direction, not a predicted gain, so using the Kelly criterion is not appropriate. For time series predictions, our models predict exchange rate prices. These price predictions are converted into a variable-sized trading and a variable-hold strategy.

\subsection{Fixed Position Size and Hold for News Analysis} 
\label{fixed-position-size}

In the fixed position scheme, each trade (long or short) is executed with a constant position size of
\begin{equation}\label{eq:q_fixed}
q_{fixed} = 10,000 \ \text{USD}.
\end{equation}

There are three other policy decisions with respect to fixed-sized and fixed-hold trading on news articles. 
\begin{enumerate}
    \item If multiple events occur during the same time period, a single trade is executed on the basis of the majority vote. If there is no majority, no trade is executed.
    \item If an event occurs while an existing trade is executing, a new independent trade is executed. Thus, multiple trades may be executed simultaneously and may be in different directions.
    \item At the end of the trading day (5 pm), all trades are closed, regardless of the remaining hold time. In other words, no trades are held beyond 5 pm.
\end{enumerate}


\section{Evaluation Metrics for the Experiments Based Purely on the  Exchange Rate Time  Series}
\label{sec:metrics}

For time series trading, to obtain stable and comparable estimates across strategies and currency pairs, each trading strategy was executed \(J = 10\) times, where each run (\(j = 1, \dots, J\)) represents a complete trading simulation. This repetition helps account for stochastic variation due to model initialization and sampling effects in the models and configurations selected from Section~\ref{sec:exp1},
ensuring that the reported results reflect consistent, expectation-based performance rather than outcomes from a single random realization. We then aggregate the resulting outcomes.

For News article trading, we execute the trading simulation only once, since all parameters are fixed.

We report three evaluation metrics: the \emph{average cumulative profit} (ACP), the \emph{average profit per trade} (APPT), and the \emph{monthly Sharpe ratio} (MSR) computed from per-trade returns.

Let $\pi^{(j)}_{t,s}$ denote the profit of strategy $s$ at time $t$ in run $j \in \{1, \dots, J\}$. Because of randomness, some runs may bet at time $t$ and others may not. So, let the total number of trades over all runs (between $1$ and $J$) and all times (between $1$ and $T$) be $TotTrade(J,T) $.  The average profit per trade (APPT) for strategy $s$ for all runs and all times up to $T$ is then: 
\begin{equation}
\mathrm{APPT}_{s} =
(\sum_{t=1}^{T} \sum_{j=1}^{J} \pi^{(j)}_{t,s})/TotTrade(J,T) .
\end{equation}

The average cumulative profit ($ACP_s$) for method $s$ is simply the total profit divided by $J$:

\begin{equation}
\mathrm{ACP}_{s} =
(\sum_{t=1}^{T} \sum_{j=1}^{J} \pi^{(j)}_{t,s})/J .
\end{equation}

For the Monthly Sharpe ratio, profits are first aggregated at the monthly level. Let $\mathcal{T}_m$ denote the set of time indices belonging to month $m$, and define the monthly profit for run $j$ as
\begin{equation}
P^{(j)}_{m,s} = \sum_{t \in \mathcal{T}_m} \pi^{(j)}_{t,s}.
\end{equation}

We then compute the average monthly profit across runs:
\begin{equation}
\bar{P}_{m,s} = \frac{1}{J} \sum_{j=1}^{J} P^{(j)}_{m,s}.
\end{equation}

Let $\mu_s$ and $\sigma_s$ denote the mean and standard deviation of $\bar{P}_{m,s}$ across all months. The Monthly Sharpe ratio is defined as
\begin{equation}
\mathrm{MSR}_s = \frac{\mu_s}{\sigma_s}.
\end{equation}


\section{Validation Measurements of Trading Strategies}
\subsection{Statistical Significance of Average Cumulative Profits}\label{sec:pvalue}

To evaluate whether the observed profits of each trading strategy reflect predictive power rather than random chance, we performed a non-parametric significance analysis. For a given strategy \( M \) and currency \( C \), we first collected the trade directions produced by \( M \) on the test dataset across all runs, including \emph{buy}, \emph{sell}, and \emph{no trade}. From these directions, we estimated the empirical probabilities \(p_{\mathrm{buy}}, p_{\mathrm{sell}},\) and \(p_{\mathrm{nt}}\) (with \(p_{\mathrm{buy}} + p_{\mathrm{sell}} + p_{\mathrm{nt}} = 1\)). We then constructed a randomized trader that, at each time point \(t\), sampled an action from this categorical distribution: it bought currency \(C\) with probability \(p_{\mathrm{buy}}\), sold with probability \(p_{\mathrm{sell}}\), and placed no trade with probability \(p_{\mathrm{nt}}\). This design preserves both the overall directional bias and the trading frequency of \( M \) on the test set, while removing any dependence on future price movements. For Kelly-based strategies, the bet size at time \(t\) was computed using the same execution rules as in \( M \), based on the randomized trader's performance history up to time \(t\).


We simulated \( N = 10{,}000 \) such randomized trading trajectories for each strategy to construct a null distribution of profits, denoted as \(\{ P^{(i)}_{\mathrm{null}} \}_{i=1}^{N}\). Each trajectory was evaluated using the same execution framework as used in the experiments described in Section~\ref{sec:result-perf}. The observed final average cumulative profit of method \( M \) is denoted by \( P^{\mathrm{obs}}_M \). 

The Monte Carlo \(p\)-value is then computed as
\begin{equation}
pValue(M) = \frac{1 + \sum_{i=1}^{N} \mathbf{1}\!\left[P^{(i)}_{\mathrm{null}} \ge P^{\mathrm{obs}}_M\right]}{N + 1},
\end{equation}
where \(\mathbf{1}[\cdot]\) is the indicator function. Intuitively, this p-value calculation counts the number of times the random trading process yields a higher profit than method $M$'s profit and divides that by $N$, the number of random trajectories. (The $+1$ correction is to avoid p-values of $0$.)
A smaller \(pVal(M)\) indicates stronger evidence that the observed profit by method $M$ is statistically significantly better than a random strategy.

To further assess the robustness of \( M \)’s performance, we computed a \(95\%\) confidence interval for its mean profit using nonparametric bootstrap resampling. Specifically, we resampled with replacement from the individual trade profits achieved by \( M \) to generate bootstrap replicates of the mean profit. This procedure provides an empirical estimate of uncertainty around the observed performance, following standard resampling procedures in statistical inference \citep{efron1993introduction, good2005permutation}.

\section{Model Tuning Procedures and Results for Forecasting Models}
\label{sec:exp1}

We adopted the same training process for all forecasting models described in Section~\ref{sec:trainedmodels}. Each model (N-BEATS, N-HiTS, and TCN) was trained using the Adam optimizer~\cite{kingma2017adammethodstochasticoptimization} with a learning rate of $10^{-4}$, a batch size of 1024, and for 50 epochs on a single NVIDIA A100 GPU. The mean squared error (MSE) loss function was used across all models.

All forecasting models, including the zero-shot foundation models, share two key hyperparameters: the prediction length and the size of the input context window ($C$). Since our objective is to predict the next mid-price, the prediction length was fixed to one step. To identify the optimal input context size, we evaluated several values, $C \in {16, 32, 64, 128, 256}$.

After training the models described in Section~\ref{sec:trainedmodels} using various input context lengths, we evaluated their performance on the validation dataset (July 2024) alongside the zero-shot models, Chronos--Bolt and Toto. 

For each currency pair, we ran a complete trading simulation using the model-driven and ensemble strategies described in Section~\ref{sec:model-driven-strategies} and~\ref{sec:ensemble-strategy}, respectively. The goal was to identify, for each model, the input context length that produced the highest average total profit on the validation data. This context length was then selected as the optimal configuration for that model and used in the final trading experiments on the test dataset. 

To ensure a fair comparison across models and account for randomness in model initialization (for trained models) and sampling (for zero-shot models), each trading simulation was repeated ten times for every model–context pair. The resulting total profits were averaged to obtain stable and representative performance estimates.

The resulting best parameter values on the validation dataset are shown for USD/CNY under active Kelly in Table~\ref{table:CNY_val_profit} and under passive Kelly in Table~\ref{table:CNY_val_profit_passive_kelly}, and for USD/BRL under active Kelly in Table~\ref{table:brl_val_profit} and under passive Kelly in Table~\ref{table:brl_val_profit_passive_kelly}. For our experimental results, each forecasting model is paired with its optimal input chunk length as selected on the validation split. It is important to note, however, that these validation-optimal configurations do not necessarily correspond to the models that ultimately perform best on the out-of-sample test period. As shown later in the trading-performance tables (Tables~\ref{tab:avg_profit_per_trade_usdCNY},~\ref{tab:avg_profit_per_trade_usdCNY_passive_kelly},\ref{tab:avg_profit_per_trade_usdbrl}, and\ref{tab:avg_profit_per_trade_usdbrl_new_kelly}), models such as Toto, Ensemble, and Chronos--Bolt compete closely on the validation data, whereas ARIMA emerges as the strongest performer over the full one-year test horizon, though its Sharpe Ratio remains low.

\begin{table}[H]
\centering
\begin{minipage}{\linewidth}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{tabularx}{0.95\linewidth}{L*{5}{c}}
\toprule
\multirow{2}{*}{\textbf{Model}} & \multicolumn{5}{c}{\textbf{Input Chunk Length}}\\
\cmidrule(lr){2-6}
& \textbf{16} & \textbf{32} & \textbf{64} & \textbf{128} & \textbf{256}\\
\midrule
\textbf{ARIMA}         & N/A & \textbf{1542.38} & 734.46 & 1047.33 & 1468.21 \\
\textbf{N-BEATS}       & -279.77 & -181.15 & \textbf{-109.63} & -129.55 & -395.10 \\
\textbf{N-HiTS}        & -7.08 & -6.95 & -6.84 & \textbf{-6.61} & -6.62 \\
\textbf{TCN}           & -6.92 & -171.7 & \textbf{105.27} & -44.46 & -154.21 \\
\textbf{Toto}          & -374.01 & -972.29 & -333.57 & 282.25 & \textbf{1337.59} \\
\textbf{Chronos--Bolt} & 1610.27 & -78.81 & -6.12 & 667.73 & \textbf{4862.15} \\
\textbf{Ensemble}      & N/A & 326.02 & 223.22 & 808.15 & \textbf{3312.3} \\
\bottomrule
\end{tabularx}
\end{minipage}
\caption{Active Kelly (see Section \ref{active-passive-kelly-definition} for definition) average cumulative profit (see Section \ref{sec:metrics}) results on validation data (July 2024) for US dollar to Chinese Yuan as a function of input chunk length (how far back the model looks). Note that the average is over different random seeds. For ARIMA, the chunk length means the number of data points to fit the ARIMA(1,1,1) model. The \textbf{Chronos--Bolt} model with an input chunk length of 256 achieved the highest total average profit. }\label{table:CNY_val_profit}
\end{table}

\begin{table}[H]
\centering
\begin{minipage}{\linewidth}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{tabularx}{0.95\linewidth}{L*{5}{c}}
\toprule
\multirow{2}{*}{\textbf{Model}} & \multicolumn{5}{c}{\textbf{Input Chunk Length}}\\
\cmidrule(lr){2-6}
& \textbf{16} & \textbf{32} & \textbf{64} & \textbf{128} & \textbf{256}\\
\midrule
\textbf{ARIMA}         & N/A & \textbf{2584.48} & 845.55 & 1244.75 & 2027.81 \\
\textbf{N-BEATS}       & -233.60 & \textbf{-155.91} & -254.34 & -164.64 & -280.95 \\
\textbf{N-HiTS}        & 4.47 & \textbf{34.94} & 28.24 & 19.51 & 14.96 \\
\textbf{TCN}           & -32.66 & -67.69 & \textbf{61.55} & -0.36 & -91.55 \\
\textbf{Toto}          & -351.29 & -1670.79 & -467.70 & 220.64 & \textbf{1442.90} \\
\textbf{Chronos--Bolt} & 2307.03 & 125.86 & -102.08 & 683.88 & \textbf{4252.93} \\
\textbf{Ensemble}      & N/A & 361.52 & 116.26 & \textbf{795.55} & 14.96 \\
\bottomrule
\end{tabularx}
\end{minipage}
\caption{Passive Kelly (see Section \ref{active-passive-kelly-definition} for definition) average cumulative profit (see Section \ref{sec:metrics}) results on validation data (July 2024) for US dollar to Chinese Yuan as a function of input chunk length. Note that the average is over different random seeds. For ARIMA, the chunk length means the number of data points to fit the ARIMA(1,1,1) model. The \textbf{Chronos--Bolt} model with an input chunk length of 256 achieved the highest total average profit.}\label{table:CNY_val_profit_passive_kelly}
\end{table}

\begin{table}[H]
\centering
\begin{minipage}{\linewidth}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{tabularx}{0.95\linewidth}{L*{5}{c}}
\toprule
\multirow{2}{*}{\textbf{Model}} & \multicolumn{5}{c}{\textbf{Input Chunk Length}}\\
\cmidrule(lr){2-6}
& \textbf{16} & \textbf{32} & \textbf{64} & \textbf{128} & \textbf{256}\\
\midrule
\textbf{ARIMA}         & N/A & -1446.05 & 11484.59 & 13182.42 & \textbf{13881.76} \\
\textbf{N-BEATS}       & 4229.07 & 2752.76 & 3178.23 & 2888.63 & \textbf{4289.54} \\
\textbf{N-HiTS}        & \textbf{211.06} & -91.79 & -130.59 & -105.4 & -124.67 \\
\textbf{TCN}           & -211.13 & \textbf{1141.68} & 270.76 & -640.03 & -121.4 \\
\textbf{Toto}          & 7210.09 & \textbf{12510.99} & 11549.02 & 4273.77 & -1949.14 \\
\textbf{Chronos--Bolt} & -4164.37 & 10256.85 & \textbf{14146.14} & 8594.79 & 7424.0 \\
\textbf{Ensemble}      & N/A & 1593.17 & \textbf{23375.10} & 21033.06 & 8110.11 \\
\bottomrule
\end{tabularx}
\end{minipage}
\caption{Active Kelly (see Section \ref{active-passive-kelly-definition} for definition) average cumulative profit (see Section \ref{sec:metrics}) results on validation data (July 2024) for US dollar to Brazilian Real as a function of input chunk length. Note that the average is over different random seeds. For ARIMA, the chunk length means the number of data points to fit the ARIMA(1,1,1) model. The \textbf{Ensemble} model with an input chunk length of 64 achieved the highest total average profit. }
\label{table:brl_val_profit}
\end{table}

\begin{table}[H]
\centering
\begin{minipage}{\linewidth}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\begin{tabularx}{0.95\linewidth}{L*{5}{c}}
\toprule
\multirow{2}{*}{\textbf{Model}} & \multicolumn{5}{c}{\textbf{Input Chunk Length}}\\
\cmidrule(lr){2-6}
& \textbf{16} & \textbf{32} & \textbf{64} & \textbf{128} & \textbf{256}\\
\midrule
\textbf{ARIMA}         & N/A & 623.45 & 9504.99 & \textbf{20101.04} & 16270.43 \\
\textbf{N-BEATS}       & \textbf{4686.94} & 3693.28 & 3721.51 & 4389.44 & 4190.89 \\
\textbf{N-HiTS}        & -309.91 & -553.92 & -590.15 & 114.14 & \textbf{865.49} \\
\textbf{TCN}           & -731.37 & -179.77 & \textbf{-161.00} & -723.53 & -683.75 \\
\textbf{Toto}          & 6899.56 & \textbf{11502.12} & 8554.53 & 4559.66 & -835.94 \\
\textbf{Chronos--Bolt} & -4106.82 & 8682.09 & \textbf{15463.43} & 7696.98 & 7566.64 \\
\textbf{Ensemble}      & N/A & 1290.38 & \textbf{26062.88} & 25571.07 & 14067.19 \\
\bottomrule
\end{tabularx}
\end{minipage}
\caption{Passive Kelly (see Section \ref{active-passive-kelly-definition}) for definition) average cumulative profit (see Section \ref{sec:metrics}) results on validation data (July 2024) for US dollar to Brazilian Real as a function of input chunk length. Note that the average is over different random seeds. For ARIMA, the chunk length means the number of data points to fit the ARIMA(1,1,1) model. The \textbf{Ensemble} model with an input chunk length of 64 achieved the highest total average profit. }
\label{table:brl_val_profit_passive_kelly}
\end{table}

\section{Choice of LLM Architectures and Prompts for News Analysis Based on Training/Validation Data}
\label{sec:tune}
Choosing a particular LLM architecture (model, parameters, etc.) is still an art, since different LLM architectures do far more than compute the next probable token. 

\subsection{Model Parameter Setting for USD/BRL}

After experimenting with various models on the training data (the dataset was
divided as follows: 3524 articles from November 21, 2024, through December 31, 2024), we chose Gemini 2.5 Flash to generate predictions for USD/BRL foreign exchange.
We adopted a sampling temperature of 0.1
to minimize output variance and achieve deterministic outputs. 
We experimented with 8-bit post-training quantization to reduce the memory footprint and the inference latency for predictions. However,  experiments yielded inconsistent classification behavior and reduced accuracy, leading us to choose full-precision inference for signal reliability.

\subsection{Model and Parameter Setting for USD/CNY}

We chose DeepSeek-V3 Chat as our default LLM for USD/CNY label generation. This decision was driven by API cost efficiency and strong Chinese-text capability, which we expected to better capture China-related news signals relevant to CNY. Accordingly, we used DeepSeek-V3 Chat (Dec 2024) with default parameters as the baseline model in our USD/CNY prediction. 

In our experiments, we used the default values for this model. According to the documentation,  frequency\_penalty defaults to 0, presence\_penalty defaults to 0, temperature defaults to 1, and top\_p defaults to 1.

\subsection{Additional Considerations}

We initially explored both translation-based and direct processing approaches. We began by translating Portuguese financial news to English and verifying classification performance, but observed superior results when providing Portuguese content directly to the LLMs. Consequently, we adopted direct Portuguese and Chinese processing to preserve semantic nuances and domain-specific terminology prevalent in economic news, as this approach yielded better sentiment classification accuracy compared to translated news articles.

To allow comparisons with the literature, we include results for FinBERT (trained on English-language financial texts \cite{araci2019finbert}), Chinese FinBERT2~\cite{finbert2}, and FinBERT-PT-BR for Brazilian Portuguese~\cite{leme2023finbertptbr}.

\subsection{Selecting the Optimal Prompt and Fixed-Size Trade Hold Period}

\begin{table}[H]
\centering
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}

\begin{tabularx}{\textwidth+\extralength}{l l *{8}{C}}
\toprule
\multirow{2}{*}{\textbf{Exchange}} & \multirow{2}{*}{\textbf{Model}} 
& \multicolumn{8}{c}{\textbf{Hold Period (Minutes)}} \\
\cmidrule(lr){3-10}
& & \textbf{1} & \textbf{2} & \textbf{5} & \textbf{10} & \textbf{20} & \textbf{40} & \textbf{80} & \textbf{120} \\
\midrule

\multirow{5}{*}{\textbf{USD/CNY}}
& Expert    & \textbf{-5.53} & -13.28 & -42.14 & -36.78 & -79.25 & -117.61 & -145.80 & -192.96 \\
& Naive     & -17.23 & -35.79 & -19.75 & 21.01 & 38.56 & 38.50 & 167.32 & \textbf{218.18} \\
& Naive+    & -12.17 & -19.92 & -21.23 & -30.29 & -50.08 & -33.16 & \textbf{2.38} & -10.82 \\
& FinBERT2  & -13.49 & -58.97 & -47.62 & -58.64 & 6.77 & -14.39 & 65.93 & \textbf{77.78} \\
\midrule

\multirow{5}{*}{\textbf{USD/BRL}}
& P0        & \textbf{23.31} & -9.69 & -59.19 & -175.66 & -259.24 & -673.85 & -1051.15 & -719.30 \\
& P1        & 56.34 & \textbf{61.51} & -26.14 & -86.73 & -88.58 & -474.47 & -871.27 & -634.21 \\
& P2        & \textbf{53.02} & 22.70 & -22.21 & -107.01 & -119.06 & -503.92 & -697.18 & -681.36 \\
& FinBERT2  & -33.44 & -66.48 & -107.91 & -170.88 & 94.54 & 33.21 & 267.09 & \textbf{830.09} \\
\bottomrule

\end{tabularx}

\end{adjustwidth}
\caption{Cumulative profit over the training data (January 1,2024 to June 30, 2025) for various LLM prompt strategies for different hold periods as measured by total profit on the training data, using the fixed position sizing. Note that the data size is larger here than for the time series analysis of Section \ref{sec:exp1} because no training is necessary for news article analysis based on prompts. The \textbf{Naive} prompt for USD/CNY (hold period: 120 minutes) and \textbf{FinBERT2} for USD/BRL (hold period: 120 minutes) achieved the highest total profits.}
\label{tab:tuning-hold-period}
\end{table}

As part of the hyperparameter tuning, we performed a tuning procedure with different fixed hold periods to determine the best hold period for the fixed-size position trading strategy (Table~\ref{tab:tuning-hold-period}). Note that LLM trading always uses a fixed position size trading strategy because the LLM models do not generate a probability of success, a required element to compute  the Kelly position size.

Comparing LLM tuning with forecast model tuning, we note that the magnitude of profit (loss) of LLM trading is small compared to forecasting models. Our explanation for this difference is the frequency of trading. News events occur multiple times per day, but forecasting models may trade every minute, depending on trading patterns. 

When comparing the various prompts for trading, profit (loss) generally increases (decreases) with the hold period. Our explanation for this trend is that increasing the hold time allows for more time for the currency to move in some direction.

Considering the USD/CNY prompts of Naive and Naive+, the hypothesis of including more details in a simple prompt does not appear to be confirmed, as the more specific Naive+ prompt performs worse than the Naive prompt.
Following the same logic, and contrary to our expectations, the longer and more detailed Expert prompt performs the worst of all the prompts across most of the hold periods. The performance of FinBERT2 is surprisingly uneven, considering that the model was trained on Chinese financial text. 
Finally, the best combination of prompt and hold period for the USD/CNY is the Naive prompt with a hold period of 120 minutes. We select this prompt and hold period for the remaining experiments with USD/CNY.

Considering the USD/BRL prompts, we note that the addition of examples to a detailed expert prompt has a mixed impact during short hold periods. But all expert prompts perform poorly over longer hold periods. Finally, FinBERT2 strongly outperforms all variations of expert prompts over a longer hold period. For the remaining USD/BRL experiments, we use the FinBERT2 model with a 120 minute hold period for USD/BRL trading.

\section{Experimental Methodology for Test Data}

Model selection and input context length choices for all forecasting models follow the procedure described in Section~\ref{sec:exp1}. After identifying the optimal context length for each model based on performance on the validation dataset, we conducted out-of-sample trading simulations on the test dataset for both currency pairs (USD/CNY and USD/BRL). All models were trained and validated using data from \textbf{January 1, 2024 to July 31, 2024}, while all reported trading results are evaluated on the held-out test period spanning \textbf{August 1, 2024 to July 31, 2025}.

Trading starts with \$1,000,000 in holdings. A fixed Kelly fraction (see Eq~\ref{eq:kelly_fixed_fraction}) is used initially, before sufficient trading has occurred.

\section{Comparison of Trading Strategies Results for USD/CNY}\label{sec:result-perf}

\subsection{Active and Passive Kelly Position Size Trading Results}

Figures~\ref{fig:avg_total_profits_CNY} and~\ref{fig:avg_total_profits_CNY_passive} show the ACP trajectories for the USD/CNY test dataset using active and passive Kelly respectively. These graphs include all trading strategies described in Section~\ref{sec:tradingstrategies} and the forecasting models from Section~\ref{sec:forecastingmodels}, using their best-performing configurations identified in Section~\ref{sec:exp1}. All simulations were conducted with active and passive Kelly-based position sizing, described in Section \ref{active-passive-kelly-definition}, and averaged over ten independent runs to ensure result stability. News event models are incompatible with the Kelly criterion because they do not produce a probability of success for the prediction based on the news article. Fixed position size trading for news event models is discussed in the next section.

Table~\ref{tab:avg_profit_per_trade_usdCNY} and~\ref{tab:avg_profit_per_trade_usdCNY_passive_kelly} summarize, for each trading strategy, the final average cumulative profit ($\mathrm{ACP}_T$), the average profit per trade ($\mathrm{APPT}$) and the risk-adjusted performance measured by the monthly Sharpe ratio ($\mathrm{MSR}$) for the USD/CNY test dataset for active and passive Kelly respectively.

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdcny_kelly_active.png}
    \end{subfigure}
    \caption{Average cumulative profit (ACP) trajectories for all trading strategies using active Kelly (Section \ref{active-passive-kelly-definition}) bet sizing. Results are shown for US dollar vs.~Chinese Yuan. Note that the accumulated profit is less than 1\% over the whole year. Please see the analysis in the text.
    }
    \label{fig:avg_total_profits_CNY}
\end{figure}

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdcny_kelly_passive.png}
    \end{subfigure}
    \caption{Average cumulative profit (ACP) trajectories for all trading strategies using passive Kelly (Section \ref{active-passive-kelly-definition}) bet sizing. Results are shown for US dollar vs. Chinese Yuan. As above, note that the accumulated profit is less than 1\% over the whole year. Please see analysis in text.}
    \label{fig:avg_total_profits_CNY_passive}
\end{figure}

\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR}
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & -3935.20 & -8.114 & -0.232 & 1.0000 & [-9767.47 - 1978.9] \\
Trend                          & 3168.96 & 1.252 & 0.148 & 0.0157 & [-8266.30 - 14792.42] \\
Model-driven (ARIMA)         & \textbf{3636.40} & \textbf{3.190} & \textbf{0.305} & \textbf{0.0014} & [-6039.73 - 13297.87] \\ \hline
Model-driven (N-BEATS)       & -1138.79 & -0.245 & -0.184 & 0.9203 & [-6078.73 - 3822.78] \\
Model-driven (N-HiTS)        & -677.78 & -5.510 & -0.302 & 1.0000 & [-2248.56 - 68.35] \\
Model-driven (TCN)           & 555.50 & 0.236 & 0.181 & 0.2369 & [-3272.52 - 4325.84] \\
Model-driven (Toto)          & 97.87 & 0.203 & 0.016 & 0.3005 & [-5628.58 - 5896.36] \\
Model-driven (Chronos--Bolt) & 1794.55 & 1.850 & 0.167 & 0.0213 & [-4366.70 - 7966.85] \\
Ensemble                       & 1779.10 & 2.417 & 0.251 & 0.0487 & [-4819.04 - 8464.80] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Active Kelly (Section \ref{active-passive-kelly-definition}) trading performance of all trading strategies on the US dollar vs.~Chinese Yuan test dataset (August 1, 2024 to July 31, 2025). For time series-based approaches, \textbf{ARIMA} achieves the lowest p-value, the highest average cumulative profit, average profit per trade, and monthly Sharpe Ratio, but its monthly Sharpe Ratio is too low to be acceptable. }
\label{tab:avg_profit_per_trade_usdCNY}
\end{table}

\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR}
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & -4026.04 & -7.879 & -0.235 & 1.0000 & [-10342.47 - 2173.03] \\
Trend                          & \textbf{4007.35} & 1.612 & 0.181 & \textbf{0.0004} & [-7055.61 - 15197.29] \\
Model-driven (ARIMA)         & 1288.54 & 1.967 & \textbf{0.237} & 0.0436 & [-6331.85 - 8599.05] \\ \hline
Model-driven (N-BEATS)       & -1246.67 & -0.323 & -0.270 & 0.9431 & [-5438.41 - 2946.7] \\
Model-driven (N-HiTS)        & -1299.83 & -0.332 & -0.262 & 0.9850 & [-4402.13 - 1870.96] \\
Model-driven (TCN)           & 579.38 & 0.101 & 0.188 & 0.2740 & [-5841.05 - 7082.00] \\
Model-driven (Toto)          & 50.76 & 0.086 & 0.006 & 0.3526 & [-6482.33 - 6724.88] \\
Model-driven (Chronos--Bolt) & 2124.77 & \textbf{2.295} & 0.204 & 0.0108 & [-3868.09 - 8123.84] \\
Ensemble                       & -147.20 & -0.227 & -0.020 & 0.9637 & [-6331.09 - 6033.38] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Passive Kelly (Section \ref{active-passive-kelly-definition}) trading performance of all trading strategies on the US dollar vs.~Chinese Yuan test dataset (August 1, 2024 to July 31, 2025). For time series-based approaches, \textbf{Trend} achieves the highest average cumulative profit and the lowest p-value. \textbf{Chronos--Bolt} achieves the highest average profit per trade. \textbf{ARIMA} achieves the highest monthly Sharpe ratio, but it's still too low to be acceptable.}
\label{tab:avg_profit_per_trade_usdCNY_passive_kelly}
\end{table}

\subsection{Discussion of  Results for Kelly Position Size for USD/CNY}

The graphs and tables (Figure~\ref{fig:avg_total_profits_CNY} and Table~\ref{tab:avg_profit_per_trade_usdCNY}) for the Active Kelly criterion (Section \ref{active-passive-kelly-definition}) approach show that: (i) the profit and/or loss of any trading method is minimal (less than 1\% of the initial \$1 million), (ii) all methods have a high p-value, and (iii) their confidence interval straddles zero.

The positive and negative jumps at the beginning reflect that the mid-price exchange rate shows unusually high volatility early in the test data set (Figure~\ref{fig:true_vs_predicted_nbeats_yuan}). To warm up the model, we use a small fixed Kelly fraction (see Eq~\ref{eq:kelly_fixed_fraction}) for the initial 120 minutes of trading. This rule interacts with the high volatility of exchange prices at the beginning of the test data trading, producing a spike.

Although time series forecasting for USD/CNY using the Passive Kelly (Section \ref{active-passive-kelly-definition}) criterion (Figure~\ref{fig:avg_total_profits_CNY_passive} and Table~\ref{tab:avg_profit_per_trade_usdCNY_passive_kelly}) have different results, with the Trend trading strategy producing the highest average cumulative profit, the general results of Active and Passive Kelly have the same general structure and the same difficulty with confidence intervals crossing into overall losses. In addition, the total profit for the best strategies remains small compared to the initial holding size.

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth,trim={0 0 0 20},clip]{discussion/true_vs_predicted_nbeats_yuan.png}
    \end{subfigure}
    \caption{The actual mid-price value for USD/CNY for the test data.}
    \label{fig:true_vs_predicted_nbeats_yuan}
\end{figure}



\subsection{Fixed Position Size Trading for USD/CNY}

The results for the fixed position size trading include both pure time series approaches and news-based approaches.

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdcny_fixed.png}
    \end{subfigure}
    \caption{Average Cumulative profit (ACP) trajectories for all trading strategies using fixed bet sizing. Results are shown for US dollar vs.~Chinese Yuan.}
    \label{fig:avg_total_profits_fixed_cny}
\end{figure}


\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR} 
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & 31.27 & 0.000 & 0.028 & 0.4582 & [-529.88 - 582.17] \\
Trend                          & -31.27 & -0.000 & -0.028 & 0.5451 & [-573.80 - 533.05] \\
Model-driven (ARIMA)         & 264.94 & 0.002 & 0.257 & 0.1807 & [-294.65 - 826.59] \\ \hline
Model-driven (N-BEATS)       & 451.52 & 0.004 & 0.744 & 0.0264 & [-111.01 - 987.27] \\
Model-driven (N-HiTS)        & 408.00 & 0.003 & 0.534 & 0.0324 & [-159.93 - 967.52] \\
Model-driven (TCN)           & 42.10 & 0.000 & 0.089 & 0.3928 & [-510.61 - 591.63] \\
Model-driven (Toto)          & 356.05 & 0.003 & 0.407 & 0.1138 & [-187.63 - 914.64] \\
Model-driven (Chronos--Bolt) & 75.92 & 0.001 & 0.077 & 0.4047 & [-476.84 - 639.52] \\
Ensemble                       & 893.65 & 0.007 & \textbf{1.100} & \textbf{0.0006} & [341.74 - 1448.32] \\ \hline
News-LLM (Naive)               & 483.65 & 0.493 & 0.572 & 0.0451 & [-84.52 - 1053.63] \\
News-LLM (Fatouros_p1)         & 533.51 & 0.703 & 0.273 & 0.1021 & [-226.85 - 1301.77] \\
News-LLM (Fatouros_p2)         & 276.60 & 0.241 & 0.092 & 0.3588 & [-710.89 - 1268.83] \\
News-LLM (Fatouros_p3)         & \textbf{1223.79} & \textbf{1.313} & 0.559 & 0.0056 & [373.01 - 2094.00] \\
News-LLM (Fatouros_p4)         & 837.44 & 0.933 & 0.376 & 0.1122 & [36.49 - 1680.81] \\
News-LLM (Ballinari_p)         & -1177.20 & -1.507 & -0.414 & 0.9966 & [-1951.79 - -401.07] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Trading performance of Fixed position size trading performance of all trading strategies on the USD/CNY test dataset. The news-event strategy using \textbf{Fatouros\_p3} model achieved the highest total average profit and average profit per trade. The \textbf{Ensemble} approach has a low p-value and wholly positive confidence interval. The modest Sharpe Ratio, however, indicates a lot of variance. None of the news-based systems has an acceptable Sharpe ratio. }
\label{tab:avg_profit_per_trade_usdCNY_fixed}
\end{table}

\subsection{Discussion of  Results for Fixed Position Size for USD/CNY}

The results for the models for the USD/CNY exchange rate using fixed position sizing (Figure~\ref{fig:avg_total_profits_fixed_cny} and Table~\ref{tab:avg_profit_per_trade_usdCNY_fixed}) again show minimal profits and losses compared to the \$1 million of initial capital, mostly under 0.1\%. That said,  among the time series forecasting models, the Ensemble model has the highest average cumulative profit, highest average profit per trade, and the highest monthly Sharpe ratio and low p-value. The confidence interval range shows a small but consistent profit. The Ensemble model appears to learn a profitable signal over time. Note that the better-performing models also steadily increase average cumulative profitability over time. 

The results for the news event models for the USD/CNY exchange rate using fixed position sizing (Figure~\ref{fig:avg_total_profits_fixed_cny} and Table~\ref{tab:avg_profit_per_trade_usdCNY_fixed}) show that, among the news event models, the Fatouros\_p3 model has the highest average cumulative profit, the highest average profit per trade, and the second highest monthly Sharpe ratio. (The Naive model has the highest Sharpe ratio.) The p-val of Naive is high, but for Fatouros\_p3, the p-value is well under 0.05, indicating a possible signal. Also, the confidence interval of Fatouros\_p3  is fully in the profitable range. 

Comparing the texts of the different prompts, we note that slight variations in the wording result in vastly different performances. Generally, the shorter the prompt, the better the performance. The Fatouros prompts all use only the headline, and the trading strategy opens a position when the news article arrives and closes the position at the end of the day. The Ballinari prompt is a long (expert) description of economic factors that uses the same strategy of closing at the end of the day, but performs poorly.

\subsection{Overall Conclusion of the Chinese Yuan vs. US Dollar Exchange Rate Experiments}

Although some methods did find a signal in the data, the overall performance of all the methods tested indicates that the signal is weak. We hypothesize that likely governmental manipulation of the Yuan-dollar exchange rate~\cite{von2024internationalization} defeats prediction models.

\section{Comparison of Trading Results for USD/BRL}\label{usd-brl}
\subsection{Active and Passive Kelly Position Size Trading Results}
Figures~\ref{fig:avg_total_profits_brl_active} and~\ref{fig:avg_total_profits_brl_passive} show the ACP trajectory for the USD/BRL test dataset using active and passive Kelly respectively. These plots include all trading strategies described in Section~\ref{sec:tradingstrategies} and the forecasting models from Section~\ref{sec:forecastingmodels}, using their best-performing configurations identified in Section~\ref{sec:exp1}. All simulations were conducted with active and passive Kelly-based position sizing, described in Section \ref{active-passive-kelly-definition}, and averaged over ten independent runs to ensure result stability.

Table~\ref{tab:avg_profit_per_trade_usdbrl} and~\ref{tab:avg_profit_per_trade_usdbrl_new_kelly} summarize, for each trading strategy, the final average cumulative profit ($\mathrm{ACP}_T$), the average profit per trade ($\mathrm{APPT}$), and the risk-adjusted performance measured by the monthly Sharpe ratio ($\mathrm{MSR}$) for the USD/BRL test datasets for active and passive Kelly respectively.

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdbrl_kelly_active.png}
    \end{subfigure}
    \caption{Average cumulative profit (ACP) trajectories for all trading strategies using Active Kelly (Section \ref{active-passive-kelly-definition}) bet sizing. Results are shown for US dollar vs.~Brazilian Real. Please see the analysis in the text.}
    \label{fig:avg_total_profits_brl_active}
\end{figure}

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdbrl_kelly_passive.png}
    \end{subfigure}
    \caption{Average cumulative profit (ACP) trajectories for all trading strategies using Passive Kelly (Section \ref{active-passive-kelly-definition}) bet sizing. Results are shown for US dollar vs. Brazilian Real. Please see analysis in text.}
    \label{fig:avg_total_profits_brl_passive}
\end{figure}

\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR}
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & 426939.78 & 41.551 & 0.654 & 0.0001 & [250771.24 - 635922.18] \\
Trend                          & -9818.05 & -76.704 & -0.330 & 0.9853 & [-27478.00 - -6.30] \\
Model-driven (ARIMA)         & \textbf{598519.53} & \textbf{67.721} & 0.711 & 0.0001 & [410060.16 - 804488.2] \\ \hline
Model-driven (N-BEATS)       & 312758.05 & 14.738 & 0.620 & 0.0001 & [151165.36 - 506172.83] \\
Model-driven (N-HiTS)        & 342419.59 & 5.213 & \textbf{1.130} & 0.0001 & [236999.77 - 470077.01] \\
Model-driven (TCN)           & 23349.10 & 3.137 & 0.533 & 0.0011 & [-12362.68 - 92608.39] \\
Model-driven (Toto)          & -85016.10 & -17.322 & -0.322 & 1.0000 & [-260799.95 - 46495.75] \\
Model-driven (Chronos--Bolt) & -18585.75 & -17.177 & -0.068 & 0.9864 & [-199396.80 - 103277.19] \\
Ensemble                     & 311932.03 & 48.901 & 0.550 & 0.0001 & [139531.70 - 513951.80] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Active Kelly (Section \ref{active-passive-kelly-definition}) trading performance of all trading strategies on the US dollar vs.~Brazilian Real test dataset (August 1, 2024 to July 31, 2025). For time series based approaches, \textbf{ARIMA} achieves the highest average cumulative profit and average profit per trade. The monthly Sharpe Ratio and p-value indicates that \textbf{N-HiTS} may be a viable trading strategy}
\label{tab:avg_profit_per_trade_usdbrl}
\end{table}

\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR}
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & 321006.24 & 41.468 & 0.526 & 0.0001 & [164594.84 - 536500.05] \\
Trend                          & -87132.54 & -176.025 & -0.291 & 0.9995 & [-236625.39 - -877.77] \\
Model-driven (ARIMA)         & 133704.20 & 44.958 & 0.214 & 0.0001 & [-4614.92 - 309216.61] \\ \hline
Model-driven (N-BEATS)       & 347815.26 & 12.225 & 0.718 & 0.0001 & [203941.03 - 522141.80] \\
Model-driven (N-HiTS)        & \textbf{363831.70} & 7.517 & \textbf{0.953} & 0.0001 & [236404.80 - 522046.69] \\
Model-driven (TCN)           & 55637.03 & 2.975 & 0.419 & 0.0384 & [-47782.35 - 180431.77] \\
Model-driven (Toto)          & -96940.65 & -49.563 & -0.440 & 1.0000 & [-264723.77 - 19118.93] \\
Model-driven (Chronos--Bolt) & -11893.92 & -9.813 & -0.043 & 0.9787 & [-199142.35 - 114017.81] \\
Ensemble      & 178288.17 & \textbf{47.866} & 0.326 & 0.0001 & [27476.97 - 368867.17] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Passive Kelly (Section \ref{active-passive-kelly-definition}) trading performance of all trading strategies on the US dollar vs.~Brazilian Real test dataset (August 1, 2024 to July 31, 2025). For time series based approaches, the \textbf{Ensemble} strategy achieves the highest average profit per trade. \textbf{N-HiTS} achieves the highest average cumulative profit and monthly Sharpe ratio, but it's still too low to be acceptable.}
\label{tab:avg_profit_per_trade_usdbrl_new_kelly}
\end{table}

\subsection{Discussion of  Results for Kelly Position Size for USD/BRL}

The results for the forecasting models for the USD/BRL exchange rate using the Active Kelly (Section \ref{active-passive-kelly-definition}) criterion for position sizing (Figure~\ref{fig:avg_total_profits_brl_active} and Table~\ref{tab:avg_profit_per_trade_usdbrl_new_kelly}) show profits of approximately 60\%  for some methods (like ARIMA) with low p-values and consistently positive confidence intervals. 
While the results show that the ARIMA model has the highest average cumulative profit and highest average profit per trade. On the other hand, N-HiTS has the highest monthly Sharpe ratio.
The results for Passive Kelly show that the same methods doing well, but N-HiTS dominates the other methods.

We note that  the time series of average cumulative profit also shows several spikes (Figure~\ref{fig:true_vs_predicted_nbeats_brl}).  Nothing in foreign exchange is smoothly predictable. The mid-price exchange rate shows unusually high volatility at the spike, which some models can exploit. By and large though, the models work well in both the spike regions and the spike-free regions.
    
\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth,trim={0 0 0 20},clip]{discussion/true_vs_predicted_nbeats_brl.png}
    \end{subfigure}
    \caption{The actual mid-price value for USD/BRL for the test data.}
    \label{fig:true_vs_predicted_nbeats_brl}
\end{figure}

\subsection{Fixed Position Size Trading Results for USD/BRL}

\begin{figure}[H]
    \centering
    \begin{subfigure}{0.95\textwidth}
        \centering
        \includegraphics[width=\textwidth]{fx graphs/usdbrl_fixed.png}
    \end{subfigure}
    \caption{Average Cumulative profit (ACP) trajectories for all trading strategies using fixed bet sizing. Results are shown for US dollar vs. Brazilian Real.}
    \label{fig:avg_total_profits_fixed_brl}
\end{figure}


\begin{table}[H]
\begin{adjustwidth}{-\extralength}{0cm}

\newcolumntype{C}{>{\centering\arraybackslash}X}
\begin{tabularx}{\textwidth+\extralength}{l*{5}{C}}
\toprule
\textbf{Trading Strategy} 
& \textbf{\shortstack{ACP\\(USD)}} 
& \textbf{\shortstack{APPT\\(USD/trade)}} 
& \textbf{MSR}
& \textbf{\(p\)-Value} 
& \textbf{95\% CI} \\
\midrule
Mean Reversion                 & 27535.23 & 0.301 & 1.185 & 0.0001 & [23891.47 - 31461.00] \\
Trend                          & -27535.23 & -0.301 & -1.185 & 1.0000 & [-31443.57 - -23887.67] \\
Model-driven (ARIMA)         & \textbf{30996.89} & 0.331 & 1.199 & 0.0001 & [26710.08 - 34156.58] \\ \hline
Model-driven (N-BEATS)       & 10550.02 & 0.112 & 0.990 & 0.0001 & [6666.64 - 14182.39] \\
Model-driven (N-HiTS)        & 3989.35 & 0.042 & 0.558 & 0.0024 & [286.18 - 7830.53] \\
Model-driven (TCN)           & 1090.89 & 0.012 & 0.594 & 0.3711 & [-2664.94 - 4906.57] \\
Model-driven (Toto)          & 19386.22 & 0.206 & 1.356 & 0.0001 & [15157.92 - 22623.78] \\
Model-driven (Chronos--Bolt) & 26331.8 & 0.280 & \textbf{1.360} & 0.0001 & [21929.69 - 29233.43] \\
Ensemble                       & 27889.36 & 0.296 & 1.261 & 0.0001 & [24077.89 - 31670.24] \\ \hline
News-LLM (FinBERT2)            & -11387.18 & -1.742 & -0.479 & 0.0021 & [-17659.26 - -5150.56] \\
News-LLM (Fatouros_p1)         & 26262.53 & \textbf{5.489} & 0.830 & 0.0001 & [18856.47 - 33564.22] \\
News-LLM (Fatouros_p2)         & 21082.86 & 4.865 & 0.818 & 0.0007 & [14172.44 - 27993.36] \\
News-LLM (Fatouros_p3)         & 16552.93 & 3.783 & 0.819 & 0.0001 & [9607.71 - 23435.50] \\
News-LLM (Fatouros_p4)         & -232.31 & -0.180 & -0.025 & 0.0024 & [-3754.81 - 3317.84] \\
News-LLM (Ballinari_p)         & 4780.90 & 3.482 & 0.654 & 0.4354 & [795.20 - 8742.08] \\
\bottomrule
\end{tabularx}

\end{adjustwidth}
\caption{Fixed position size trading performance of all trading strategies on the USD/BRL test dataset. \textbf{ARIMA} achieves the highest average cumulative profit, and $\mathrm{MSR}$. The monthly Sharpe Ratio and p-value indicates that \textbf{Chronos--Bolt} may be a viable trading strategy.}
\label{tab:avg_profit_per_trade_usdbrl_fixed}
\end{table}

\subsection{Discussion of Fixed-Size Position for USD/BRL}

The results for the forecasting models for the USD/BRL exchange rate using fixed position sizing (Figure~\ref{fig:avg_total_profits_fixed_cny} and Table~\ref{tab:avg_profit_per_trade_usdCNY_fixed}) show that, among the time series forecasting models, the ARIMA model has the highest average cumulative profit and highest average profit per trade,  followed by the Ensemble model. Chronos--Bolt has the highest monthly Sharpe ratio. The confidence intervals for these models are also profitable. The overall structure of the average cumulative profits timeseries is remarkable similar to the active and passive Kelly criterion versions of trading strategies for USD/BRL.

The results for the news event models for the USD/BRL exchange rate using fixed position sizing show that, contrary to the USD/CNY results, among the news event models, the Fatouros\_p1 model has the highest average cumulative profit, the highest average profit per trade, and the highest monthly Sharpe ratio. The confidence interval is also profitable. Surprisingly, FinBERT2 performs relatively poorly, even though the model is trained on financial information. Comparing the texts of the different prompts and the results of the news event models, we note that again the shorter prompts appear to perform better. The surprisingly good results of zero-shot LLM-based prompt trading necessitate further investigation to establish a definitive understanding of the relationship between prompts and trading performance in financial systems.

\section{Related Work}

\subsection{Neural Network-Based Forecasting Models for Time Series Data}

With the advent of deep learning, neural architectures such as LSTMs \cite{hochreiter1997lstm, fischer2018deep}, Temporal Convolutional Networks \cite{lea2017temporal,bai2018empirical,electronics8080876}, and Transformer-based sequence models \cite{vaswani2017attention, devlin2019bert, radford2018improving, araci2019finbert, liu2023fingpt} have demonstrated improved performance by learning long-range dependencies and non-linear interactions without requiring strict parametric assumptions. In foreign-exchange settings specifically, such models have been shown to predict short-term price movements and volatility surfaces with greater precision than purely statistical baselines \cite{sezer2020financial}. 

\subsection{Large Language Models Applied to Time Series Data}
\label{sec:T5forTimeSeries}
Recent efforts have sought to create foundational models for time series by adapting the Transformer-based architectures that have been successful in natural language directly to time series. A notable example is Chronos, a model family based on the T5 architecture \cite{raffel2023exploringlimitstransferlearning}. To apply a language model to continuous time series, Chronos transforms the data into a sequence of discrete tokens. This transformation is achieved through a two-step process: the time series (in our case, the training part of the time series) is first normalized using mean-scaling, and then its values are quantized into a fixed set of bins, where the number of bins defines the model's vocabulary size. The model is then trained on these tokenized sequences using a standard cross-entropy loss, enabling it to perform probabilistic zero-shot forecasts on unseen data \cite{ansari2024chronoslearninglanguagetime}.

 Chronos--Bolt, an update of the Chronos model, forgoes tokenization to incorporate patching, a method also used by models like PatchTST, where the input time series is segmented into smaller contiguous non-overlapping sub-sequences or "patches" \cite{das2023timesfm, zuo2024autotimes, nie2023timeseriesworth64}. In Chronos--Bolt, each patch is composed of 16 data points.
 These patches are fed to the model as input tokens. This technique seems to improve the model's ability to learn local patterns and significantly reduces computational load, thereby allowing it to process longer historical contexts. 

In a similar vein, Toto, a foundation model developed by Datadog, leverages large-scale pretraining for zero-shot forecasting \cite{cohen2025timedifferentobservabilityperspective}. Toto is a Transformer model trained on one trillion time series data points, with datasets  from both Datadog’s internal observability metrics and publicly available time series collections \cite{cohen2025timedifferentobservabilityperspective}. Because Toto is trained on such a wide variety of time series, it appears to learn domain-agnostic temporal representations and capture multiscale trends \cite{cohen2025timedifferentobservabilityperspective}.

\subsection{News-Based Forecasting}

The pure time series forecasting approaches operate in isolation from macroeconomic signals and news events.
By contrast, much work has utilized natural language processing to extract predictive signals from news articles, financial disclosures, and social media networks. Early lexicon-based or bag-of-words approaches extracted polarity scores from news and social media to forecast equity or currency moves~\cite{loughran2011liability,nassirtoussi2014text,jeon2022news}. 

The advent of pretrained language models has markedly increased representational power. FinBERT2 \cite{araci2019finbert} adapts BERT \cite{devlin2019bert} to financial sentiment classification, while FinGPT \cite{liu2023fingpt} extends the capabilities of GPT \cite{radford2018improving} to a broad spectrum of financial tasks. Studies have suggested that sentiment extracted from highly credible outlets can serve as a leading indicator, often anticipating abnormal returns around macro announcements \cite{tetlock2007giving}. However, textual signals alone often lack the temporal precision to align cleanly with minute-level price movements, and their predictive power diminishes in periods of low news volume or market overreaction. Moreover, many sentiment-driven models are reactive because the news articles on which they are based capture only post-event shifts rather than anticipating them.

Recognizing these complementary weaknesses, recent studies combine price-based features with textual sentiment. Some fuse scalar sentiment scores with lagged returns in linear regressions or shallow networks \cite{zhang2010trading}. Others embed news headlines jointly with technical indicators in deep architectures \cite{ding2015deep}. Although these hybrids tended to outperform single-modality baselines and showed greater robustness during volatility spikes, some authors criticized them for  relying on naive early concatenation, lack principled temporal alignment, or for only providing limited interpretability \cite{sezer2020financial}. 

Following these developments and criticisms, recent work evaluated LLMs in financial sentiment classification tasks. Fatouros et al.~\cite{fatouros2023transforming} compared FinBERT~\cite{araci2019finbert}, an encoder-only transformer adapted to the financial domain, with ChatGPT, a decoder-only model, in a zero-shot classification setting. Their evaluation used 2,291 manually annotated foreign exchange news headlines collected from ForexLive and FXStreet over an 86-day period (January - May 2023). The dataset spanned five major currency pairs (AUDUSD, EURCHF, EURUSD, GBPUSD, USDJPY). 

For 4 out of the 6 prompts that were tested, each headline was labeled according to its expected short-term directional impact. As for the rest, a daily sentiment based on the aggregate of the day's headlines was generated. We delve into the first four prompts and obtain sentiment-driven trading simulation results for the USDBRL and USDCNY tickers in Table \ref{tab:avg_profit_per_trade_usdbrl} and \ref{tab:avg_profit_per_trade_usdCNY} respectively.

More recently, Ballinari and Maly \cite{repec:snb:snbwpa:2025-11} explored the effectiveness of fine-tuning large language models for this task by adapting a Llama 3.1 8B model to a curated dataset of 251,845 FX analysis articles from Investing.com, DailyFX, and FXStreet. Their work demonstrates that domain-specific fine-tuning yields sentiment classifiers that outperform traditional lexicon-based methods and established benchmarks like FinBERT. A key contribution is the explicit distinction between past-oriented (descriptive) and future-oriented (predictive) sentiment within news text. The approach was validated through backtested trading strategies. A daily sentiment signal was derived from a simple majority vote over individual article sentiments, defaulting to a neutral stance when the counts of positive (+1) and negative (-1) articles were close. This signal generated superior risk-adjusted returns compared to baseline methods, including the non-finetuned version of Llama 3.1 8B. Simulating trades using the prompt and off-the-shelf model weights are shown in Tables \ref{tab:avg_profit_per_trade_usdCNY} and \ref{tab:avg_profit_per_trade_usdbrl} and for the US Dollar vs. Yuan and US Dollar vs. Brazilian Real, respectively.

\section{Conclusions}

Folk myths about foreign exchange trading come in two forms: (i) foreign exchange trading is for fools, because currencies are all manipulated, or (ii) fluctuations are entirely random. This work appears to validate myth (i) in an exchange rate that is likely manipulated (Chinese Yuan vs. US dollar). However, the work invalidates (ii) for uncontrolled (or imperfectly controlled) currencies (Brazilian Real vs. US dollar). 

In the uncontrolled case, short-term (few minute) exchange rate changes can be predicted using both simple historical techniques (mean reversion and ARIMA) as well as machine learning techniques (like NHiTs) on the time series of exchange rates. 
The experiments also suggest that short zero-shot LLM prompts for news headlines (Fatouros\_p3) can  perform well.

We have also found two techniques that enhance these results: (i) hyperparameter tuning, especially the amount of history used in forecasting, matters a lot; and (ii) using the Kelly criterion based on the size of predicted profits and the size of historically realized profits proves to be helpful. The paper explored two versions of the Kelly Criteria: one which adjusts the amount to trade only based on the results of previous trades done by a trading strategy (Active Kelly) and one which gathers information to influence future trades even when the trading strategy does not trade (Passive Kelly). Active Kelly seems to work better, though we think both should be considered in future work.

The main future work  is to understand {\em why} these forecasting models work  well on time series. Speculations include: the herd behavior of traders may result in an underlying pattern which can be detected thanks to the large size of the modeling corpus. However, those are merely speculations.  A similar question is to understand why simple news-related prompts based on headlines perform better than prompts based on financial expertise.

We invite researchers to use our software for other currencies and trading strategies.

The code and pointers to the public data will be available upon publication.

\institutionalreview{Not applicable}

\authorcontributions{Conceptualization:  E.H., A.T., D.S.   Methodology: E.H., A.T., C.Z., D.S., B.L., E.L., Z.B., Y.H., A.G.A., Software: A.G.A.., Z.B., Y.H., B.L., E.L., A.T., C.Z., Validation: D.S., E.H., A.T., B.L., Formal Analysis: E.H., A.T., D.S., B.L., Investigation: E.H., A.T., C.Z., D.S., B.L., E.L., M.S., Z.B., Y.H., A.G.A. ,  Data Curation: B.L., Z.B., A.G.A., M.S., C.Z., Y.H., Writing -- original draft preparation: E.H., A.T., D.S., B.L., E.L., Z.B., A.G.A., M.S., Writing -- review and editing: E.H., A.T., D.S., B.L., Z.B, Y.H.,A.G.A., Visualization: B.L., Supervision: E.H., A.T., D.S., Funding  Acquisition:  D.S.}

\funding{NYU Wireless}

\dataavailability{The software and  data are available at \\https://github.com/bkmulusew/ml\_fx\_trading}

\acknowledgments{We thank Mustafa Kocak and Sohail Hodarkar for helpful comments.}

\conflictsofinterest{The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results. }

\begin{adjustwidth}{-\extralength}{0cm}

\reftitle{References}

\bibliography{sample}

\vspace{6pt} 

\PublishersNote{}
\end{adjustwidth}

\end{document}