Pricing American Options using Machine Learning Algorithms
Prudence Djagba Callixte Ndizihiwe

	[
    Amy X. Zhang
    September 5, 2024
=====================



§ ABSTRACT  
		This study investigates the application of machine learning algorithms, particularly in the context of pricing American options using Monte Carlo simulations. Traditional models, such as the Black-Scholes-Merton framework, often fail to adequately address the complexities of American options, which include the ability for early exercise and non-linear payoff structures. By leveraging Monte Carlo methods in conjunction Least Square Method machine learning was used. This research aims to improve the accuracy and efficiency of option pricing. The study evaluates several machine learning models, including neural networks and decision trees, highlighting their potential to outperform traditional approaches. The results from applying machine learning algorithm in LSM indicate that integrating machine learning with Monte Carlo simulations can enhance pricing accuracy and provide more robust predictions, offering significant insights into quantitative finance by merging classical financial theories with modern computational techniques. The dataset was split into features and the target variable representing bid prices, with an 80-20 train-validation split. LSTM and GRU models were constructed using TensorFlow's Keras API, each with four hidden layers of 200 neurons and an output layer for bid price prediction, optimized with the Adam optimizer and MSE loss function. The GRU model outperformed the LSTM model across all evaluated metrics, demonstrating lower mean absolute error, mean squared error, and root mean squared error, along with greater stability and efficiency in training.
  
   keywords: Machine Learning, American Options, Monte Carlo Simulations, Least Square Method, Neural Networks,  Option Pricing,  LSTM, GRU.
  
 
		
  

§ INTRODUCTION

The pricing of American options is a complex task due to their early exercise feature. This study explores the use of machine learning models to enhance the Least Squares Monte Carlo (LSM) method for pricing American options. An option is a financial derivative that gives the buyer the right to buy or sell an underlying asset upon paying a premium. A call option gives the buyer the right to buy an asset while a put option gives the buyer the right to sell an asset <cit.>. Option pricing is a crucial aspect of financial markets and has undergone extensive study and development. Accurate options valuation is essential for investors, traders, and financial institutions to make informed decisions and effectively manage risk. In recent years, advances in computational techniques and the availability of large datasets have paved the way for applying machine learning algorithms in option pricing. Machine learning techniques, particularly deep learning, can enhance option pricing models by capturing complex patterns and relationships in market data <cit.>. Unlike traditional models, which rely on predetermined formulas and assumptions, machine learning algorithms can adapt to changing market conditions and incorporate a wider range of input variables, leading to more accurate and robust pricing predictions <cit.>. By leveraging historical market data, machine learning algorithms can learn from past pricing dynamics and adapt to changing market conditions, thereby enhancing option pricing accuracy. The pricing of financial derivatives, particularly options, has been the subject of significant research and development in the field of quantitative finance. Traditional option pricing models, such as the Black-Scholes model <cit.>, have provided valuable insights into the valuation of European options. However, pricing American options, which allow for early exercise, presents unique challenges due to their non-linear payoff structure.
Accurate option pricing is crucial for the stability and efficiency of financial markets. However, investors, traders, and financial institutions often face challenges in determining precise prices for financial derivatives. These challenges can result in suboptimal decision-making and increased financial risk. The pricing of American options is particularly problematic due to their allowance for early exercise, which adds a layer of complexity that traditional models struggle to address. This complexity necessitates the exploration of alternative approaches that can provide more accurate and reliable pricing. To address these challenges, this research aims to employ Least Square Monte Carlo (LSM) methods combined with machine learning models. By leveraging these advanced techniques, we aim to better understand complex market patterns and improve the accuracy of American option pricing. The study of machine learning applications in option pricing is significant for several reasons. Firstly, it has the potential to enhance the development of financial markets by providing more accurate pricing models. Improved pricing models can lead to better decision-making and risk management for financial professionals, thereby contributing to the overall stability and efficiency of the financial system. Secondly, this research addresses the limitations of traditional pricing models, such as their reliance on predetermined assumptions and inability to adapt to changing market conditions. By integrating machine learning with Monte Carlo simulations, this study aims to develop models that are more flexible and capable of capturing the complexities of financial markets. Furthermore, the findings of this study could provide valuable insights into the factors that influence option prices, thereby advancing our understanding of financial markets and improving the tools available for quantitative finance.


		
		
		
		

§ LITERATURE REVIEW

		Previous studies have applied various techniques to price American options. The LSM method, introduced by Longstaff and Schwartz (2001), is widely used due to its flexibility and accuracy. Recent advancements in machine learning have shown promise in improving the estimation of continuation values in the LSM algorithm.
		

 §.§ Risk Neutral Pricing


Risk neutral pricing is a fundamental concept in financial mathematics used to evaluate the fair value of derivatives contracts, such as options, in a manner that accounts for risk without introducing arbitrage opportunities <cit.>. This approach relies on the assumption that investors are indifferent to risk when pricing financial assets, allowing for a simplified valuation framework <cit.>.

Considering a model economy with risky assets n_S, risk-free assets β, and risky assets S_i. An equation for a differential is followed by the risk-free asset β: 


    dβ(t) = β(t)r(t)dt,


where the risk-free interest rate is denoted by r(t). The stochastic differential equation governing the hazardous assets S_i in the real-world measure P is as follows:


    dS_i(t) = S_i(t)(μ_i(t)dt + σ_i(t)dW^P_i),



where dW^P_i is a n_S-dimensional standard Brownian motion, σ_i(t) represents the asset's volatility, and μ_i(t) represents the asset-dependent drift term <cit.>.

The price V(S(t_0), t_0) of a European type contract in a complete market is determined by the expected value of the future price V(S(t_1), t_1) in relation to the risk-neutral measure Q <cit.>, given as follows:


    V(S(t_0), t_0) = E^Q [ V(S(t_1), t_1)/β(t_0) β(t_1)],


The equation (<ref>) ensures that there are no arbitrage opportunities in the market. The measure Q is unique under the assumption of an arbitrage-free market. In the risk-neutral measure Q, all the drift terms of the risky assets S_i are given by the risk-free interest rate r(t):

    dS_i(t) = S_i(t) ( r(t)dt + σ_i dW^Q_i(t) ),


where σ_i is the asset's volatility, and W^Q_i(t) is a standard Brownian motion in the Q measure.
The relationship between the Brownian motions W^Q_i(t) and W^P_i(t) is given by:


    dW^Q_i(t) = dW^P_i(t) + ν_i(t) dt,


where ν_i(t) satisfies μ(t) = r(t) + σ_i ν_i(t). Notably, the volatilities σ_i remain the same under this change of measure, allowing for the estimation of σ_i from real-world observations of the asset price processes S_i.

It is instantly evident from combining the differential equations for the risky and risk-free assets that the ratio S_i/β is a drift-free process <cit.>:


    d( S_i/β(t)) = ( S_i/β(t)) σ_i dW^Q_i(t).




Risk-neutral pricing provides a powerful and wide framework for valuing financial derivatives, offering simplicity and tractability in complex market environments. By incorporating the principles of risk neutrality, financial analysts can derive fair prices for derivatives contracts, facilitating informed investment decisions and risk management strategies.


 §.§  European options

A European option is a form of options agreement where execution is restricted solely to its expiry date <cit.>. This means that investors cannot exercise the option prematurely regardless of any fluctuations in the price of the underlying security such as a stock. The execution of the call or put option is only permitted on the date of the option's maturity.
 At time t, the cost of a European option is provided by


    V(S(t), t) = 𝔼^Q [ h(S(T), T) exp( - ∫_t^T r(s)ds ) ],
 

where h(S, T) is the payoff of the option at maturity, e.g.,

    h(S, T) = {[     max[S - K, 0], for a call option,;     max[K - S, 0],  for a put option, ].

with K the strike of the option. 







 §.§  American options


Options with an extra right for the contract holder are known as American options. Anytime prior to or on the day of expiration, the option may be exercised. Due to this additional right, an American choice may be worth more than a European option. The European option will always have a higher payoff if it is exercised before it expires, so the American option can never be worth less than the European option. However, in certain situations, the extra right to exercise it early may allow for a higher payoff <cit.>.

An American option holder may exercise their right to do so at any time up until and including maturity, unlike holders of European options. Because of this qualitative difference, in the American context as compared to the European case, the option holder has more rights. An American option's pricing must be at least equal to that of a comparable European option.


An American option holder must continually check the price of the underlying asset throughout the option's lifetime and determine if the option's price exceeds the instant payout they would get if they exercised the option at this particular moment.
 It can be shown that the price V(S, t) of an American option is provided by

    V(S(t), t) = sup_τ∈[t,T]𝔼^Q [ exp( -∫_t^τ r(s)ds ) h(S(τ)) ],


where the ideal stopping time supremum is attained 
τ^*

    τ^* = inf_t≥ 0{τ: V(S(t), t) ≤ h(S(t)) },

For the first time, the option's price is below what the holder would receive if they exercised it at this particular moment.
		
		

  

§ METHODS 

  The LSM method involves simulating paths of the underlying asset prices and performing a backward induction to estimate option values. In this study, machine learning models, including XGBoost, LightGBM, and logistic regression, are integrated into the LSM framework to estimate the continuation value more accurately.
  

 §.§ Least-Squares Monte Carlo Method



In the work <cit.>, Monte Carlo simulation is introduced into the financial domain and Monte Carlo techniques are used to price structured goods.
 These techniques provide an effective approximation of the option price, especially for multidimensional issues like derivatives with numerous underlying assets. European options in particular benefit from this, but American options can also be priced rather effectively. The following is the fundamental notion underlying the Monte Carlo Simulations technique for an option with payoff h. The price of the derivative is determined by explicitly computing the expected value of the discounted payoff, as it is in equation (<ref>), using these paths to create a (large) sample of random processes of the equation (<ref>) for the underlying stochastic processes.














    





    









 

 §.§ Simulating random paths


Solving the following system of coupled stochastic differential equations is necessary in order to simulate the paths of the underlying assets.

 
    dS_i(t) = S_i(t) ( r(t)dt + σ_i dW_i^Q(t) ),

where r(t) is the deterministic interest rate and 𝐖 is a n-dimensional Q-Brownian motion with correlation matrix ρ_ij. 

 This can be accomplished most conveniently with the Euler-Maruyama approach. <cit.> has a thorough introduction. For a time mesh t_j = t_0 + jdt, j = 1, …, nstep, step size dt, essentially, simulating random pathways means computing

 
    S_i(t + dt) = S_i(t) ( 1 + r(t)dt + √(dt)∑_j B_ij Z_j(t) ),

 where Z_j(t) are independent standard normal random variables, and B_ij is derived from the Cholesky decomposition of the correlation matrix ρ_ij.
















 §.§ LSM for European Options




With a European option, the Black-Scholes model may precisely sample the end-point of the pathways, which is the sole point that matters for the payout and doesn't require Euler-Maruyama time-stepping. We can calculate the value of the payout at maturity for each path after generating an ensemble of random values for the underlying assets' value at maturity, S^j_i(T). The current option price can be obtained by averaging the discounted payoffs of all simulated paths, as illustrated in Figure <ref>. The standard deviation can be used to calculate the degree of price uncertainty.










 §.§ The Least Squares Monte Carlo (LSM) Algorithm for American Options

To price an American option using Monte Carlo simulation for n underlying assets, a backward iteration algorithm is employed. The Least Squares Monte Carlo (LSM) algorithm is a method for pricing options by simulating potential future paths of the underlying asset's price and recursively working backward through time. It begins by generating random paths for the asset's price and setting the option's payoff at maturity based on the payoff function. Then, starting at maturity, it discounts future payoffs, performs regression analysis to estimate continuation values, and compares them to immediate exercise values to determine whether to exercise the option. This process iterates backward through time until the present. At the final time step, option values are discounted back to the present, and the option price is computed by averaging over all paths. LSM is particularly effective for pricing American-style options due to its ability to account for early exercise opportunities through regression analysis, making it a versatile and accurate approach for pricing complex derivatives.


Expand the continuation value c(𝐒) (as a function of the underlying asset price) at each time step t_i in terms of a function basis ψ_j.
Be aware that it costs a lot of money to compute an option's continuation value.
Consequently, using a least squares regression to approximate the continuation value at each time across all pathways,


    c(𝐱, t_i) = 𝔼[  V(S(t_i+1)) |𝐒(t_i) = 𝐱] = ∑_k=0^n_orderβ_k ψ_k(𝐱),

where the expansion coefficients β_k are obtained by a least squares fit to the (discounted) values of the option at the next time step:

    β = ( B_ψψ)^-1 B V_ψ,

where B_ψψ, B V_ψ at time step t_i are given by

    (B_ψψ)_ℓ   = 𝔼[ V(S(t_i+1)) ψ_ℓ(S(t_i)) ],  
    
    (B_ψψ)_kℓ   = 𝔼[ ψ_k(S(t_i)) ψ_ℓ(S(t_i)) ],

and the expectation is over the ensemble of paths.



Unlike when the price is chosen to replicate the early exercise decision


    V_j(t_i) = h(S_j(t_i)),

for all paths j where h(S_j(t_i)) > e^- ∫_t_i^t_i+1 r(s)ds V_j(t_i+1) in step 6b in Figure <ref>, in some papers like <cit.> assume that the non exercised value is the continuation value

    V_j(t_i) = max{ h(c(S_j(t_i))), h(S_j(t_i)) }.

Its disadvantage is that the sampling error is compounded by the difference between c and h,





where


    
  * t_i: Represents each time step in the option pricing process.
    
  * c(𝐱, t_i): The continuation value of the option at time t_i, where 𝐱 denotes the underlying asset price.
    
  * h: The payoff function of the option.
    
  * V(S(t_i+1)): The value of the option at the next time step t_i+1 given the asset price S(t_i+1).
    
  * ψ_j: A function basis used for expansion.
    
  * β_k: Expansion coefficients obtained through a least squares fit.
    
  * n_order: The order of the expansion.
    
  * B_ψψ: The matrix of expectations of the product of basis functions.
    
  * B V_ψ: The vector of expectations of the product of the option value and basis functions.





Figure <ref> shows the American option pricing and detailing algorithm of the Longstaff-Schwartz method for using least squares regression in step 6 to calculate the continuation value c. The solution of equation (<ref>) to obtain equation (<ref>) is explained in detail in steps 6a and 6b in the purple boxes <cit.>.



 §.§ Machine Learning Methods based on LSM


This section details how various machine learning models can be integrated into the Least Squares Monte Carlo (LSM) algorithm to enhance the pricing of American options. The machine learning models discussed include XGBoost, LightGBM, logistic regression, k-nearest neighbors (kNN), decision tree, and random forest.

In the  LSM algorithm in Figure (<ref>) for pricing American options, machine learning models are primarily involved in Step 6a, where the continuation value is estimated through regression. Traditionally, this step uses linear regression to estimate the relationship between the current state variables and the future payoffs. However, integrating machine learning models such as XGBoost, LightGBM, logistic regression, k-nearest neighbors (kNN), decision trees, and random forests can significantly enhance this process. These models are trained on the simulated paths and their corresponding discounted payoffs V_j(t_i+1), allowing them to capture complex, non-linear relationships in the data. By doing so, they can provide more accurate predictions of the continuation value c_j for each path j. For example, XGBoost and LightGBM are gradient-boosting models that can handle large datasets with intricate interactions, while decision trees and random forests can model non-linear relationships effectively.

Once the machine learning model is trained, it replaces the traditional linear regression formula B_VVβ = B_Vy used to calculate the regression coefficients β. In this enhanced approach, the model predicts the continuation value c_j for each path based on the state variables S_j(t_i). These predicted continuation values are then used to determine whether to exercise the option or to continue holding it (Step 7). If the payoff from exercising the option is greater than the predicted continuation value, the option is exercised; otherwise, it is not. By leveraging machine learning models in this critical step, the LSM algorithm can achieve more accurate and robust option pricing, as these models can generalize better to complex and high-dimensional state spaces than traditional linear regression.


 §.§ Recurrent Neural Networks (RNNs)


Inspired by the architecture and operation of the human brain, neural networks (NNs) are a fundamental idea in machine learning. NNs are fundamentally made up of linked nodes arranged in layers. Data is received by input layers, information is processed by hidden levels, and output layers generate output. The capacity of NNs to learn from data and modify internal parameters (weights) during training to maximize performance is what gives them their strength <cit.>.


RNNs are a specific type of NN made to work with sequential data. They provide the idea of memory, which allows the network to remember data from earlier inputs. For jobs like pricing American options, where historical prices and market conditions might affect future decisions, this memory is essential <cit.>.


Detailed working principals of Recurrent Neural Networks (RNNs) are presented as follows:  


    
  * Sequential Methodology: RNNs, in contrast to conventional neural networks, are made to handle data sequences. They accomplish this by sequentially accepting inputs one at a time.
    
    
  * Repeated Relationships: An RNN's recurrent connections are its primary characteristic. The network can maintain some sort of "memory" thanks to these links. The RNN processes the current input and a "hidden state" from the previous phase at each step in a sequence. Information gleaned from earlier inputs is contained in this hidden state.

    
    
  * Secret State: At every time step t, the hidden state h_t is updated using the prior hidden state h_t-1 as well as the new input x_t. In mathematics, this is commonly expressed as:

    
    h_t = ϕ(W_hx x_t + W_hh h_t-1 + b_h),

    where ϕ is a non-linear activation function, W_hx and W_hh are weight matrices, and b_h is a bias vector.
    
    
  * Compared Weights: All time steps in an RNN use the same weights, or parameters. This increases the efficiency of the model and lowers the number of parameters since the same weights are applied to each input in the sequence.





 §.§ Long Short-Term Memory (LSTM).


In the realm of Recurrent Neural Networks, Long Short-Term Memory (LSTM) networks are an advanced evolution designed to overcome the drawbacks of conventional RNNs, especially when addressing long-term dependencies <cit.>.
 Therefore, the detailed processes throughout Long Short-Term Memory are explained as follows: 

   
  * Higher Level Memory Management: The LSTM unit, a sophisticated memory cell, is the distinguishing characteristic of LSTM. This unit's distinct structure, which consists of several gates, allows it to retain information for lengthy periods of time.
    
    
  * Gating System: Three different kinds of gates are included in LSTMs, and each is essential to the network's memory management.

   



 
      
  * Input Gate: Shows which values from the input should be used to modify the memory. Mathematically, the input gate i_t is defined as:
        
    i_t = σ(W_ix x_t + W_ih h_t-1 + b_i),

        where σ is the sigmoid activation function, and W_ix, W_ih, and b_i are the weights and biases for the input gate.

        
  * Forget Gate: Decides what portions of the existing memory should be discarded. The forget gate f_t is given by:
        
    f_t = σ(W_fx x_t + W_fh h_t-1 + b_f),

        where W_fx, W_fh, and b_f are the weights and biases for the forget gate.

        
  * Output Gate: Controls the output flow of the memory content to the next layer in the network. The output gate o_t is represented as:
        
    o_t = σ(W_ox x_t + W_oh h_t-1 + b_o),

        where W_ox, W_oh, and b_o are the weights and biases for the output gate.
    
    
    

    
  * Cell State: The cell state C_t, which functions as a kind of conveyor belt running straight down the length of the network chain, is the fundamental component of LSTM. It guarantees that the network efficiently stores and retrieves significant long-term information while permitting information to flow essentially unaltered. The following updates the cell state:

    
    C_t = f_t * C_t-1 + i_t * C̃_t,

    where C̃_t is the candidate cell state, calculated as:
    
    C̃_t = tanh(W_cx x_t + W_ch h_t-1 + b_c),

    and tanh is the hyperbolic tangent activation function <cit.>.





 
 
 
 
 
 

 
 
 
 
 

 
 
 
 
 
 









 §.§ Gated Recurrent Unit (GRU)


GRUs are a cutting-edge variant of recurrent neural networks that aim to enhance and streamline LSTM architecture. They provide a more efficient method of managing sequential data, and they work especially well in situations where long-term dependencies are essential <cit.>.  Therefore, the detailed processes throughout the Gated Recurrent Unit are explained as follows: 




    
  * Architecture Simplified: In terms of processing resources, the GRU is more efficient because to its simpler structure than the LSTM. Its lower gate count accounts for this efficiency.
    
     
  * Two gates are used by GRUs:

     
    
  *  Update Gate: The degree to which data from the previous state should be transferred to the present state is determined by this gate. It combines the forget and input gates that are present in LSTMs. We define the update gate z_t as follows:  

        
    z_t = σ(W_zx x_t + W_zh h_t-1 + b_z),

        where W_zx, W_zh, and b_z are the weights and biases for the update gate.

        
  * Reset Gate: It basically lets the model select how much of the past is useful for the current prediction by deciding how much of the past to ignore. Given is the reset gate r_t:
        
    r_t = σ(W_rx x_t + W_rh h_t-1 + b_r),

        where W_rx, W_rh, and b_r are the weights and biases for the reset gate.
    

    
    
  * No Separate State for Cells: There is no distinct cell state in GRUs, in contrast to LSTMs. In doing so, they streamline the information flow and facilitate modeling and training by merging the cell state and concealed state into a single structure.
 The hidden state h_t in a GRU is updated as follows:
    
    h_t = (1 - z_t) * h_t-1 + z_t * h̃_t,

    where h̃_t is the candidate hidden state, calculated as:
    
    h̃_t = tanh(W_hx x_t + r_t * (W_hh h_t-1) + b_h).






 §.§ Description of Dataset


The data source used in this experimental investigation is a collection of historical data on all symbols in the U.S equities markets from January to June 2013
( https://optiondata.org https://optiondata.org).

The given dataset provides detailed information on options contracts, encompassing various attributes crucial for options trading analysis. Bellow are explanations of each column:






    
  * Contract: A unique identifier for each options contract, likely containing information about the underlying asset, expiration date, type (call or put), and strike price.
    
  * Underlying: Indicates the underlying asset associated with the options contract.
    
  * Expiration: The expiration date of the options contract.
    
  * Type: Specifies whether the option is a call or a put.
    
  * Strike: The strike price of the options contract.
    
  * Style: Refers to the style of the options contract (e.g., American or European).
    
  * Bid: The bid price of the options contract, representing the highest price a buyer is willing to pay.
    
  * Bid Size: The size of the bid, indicating the quantity of contracts being bid for.
    
  * Ask: The ask price of the options contract, representing the lowest price a seller is willing to accept.
    
  * Ask Size: The size of the ask, indicating the quantity of contracts being offered.
    
  * Volume: The trading volume of the options contract.
    
  * Open Interest: The total number of outstanding options contracts.
    
  * Quote Date: The date when the quote for the options contract was made.
    
  * Delta: Delta measures the rate of change of the option's price in response to changes in the price of the underlying asset.
    
  * Gamma: Gamma measures the rate of change in delta in response to changes in the price of the underlying asset.
    
  * Theta: Theta measures the rate of decline in the value of the option over time.
    
  * Vega: Vega measures the sensitivity of the option's price to changes in implied volatility.
    
  * Implied Volatility: Implied volatility is the market's estimate of the future volatility of the underlying asset, as implied by the options prices.


In the analysis of our dataset, we focused on the numerical features to understand the relationships between them. To achieve this, we computed the correlation matrix, which quantifies the linear relationships between pairs of numerical variables. We visualized this correlation matrix using a heatmap, a powerful tool for identifying patterns and correlations within the data. The heatmap, annotated for clarity, uses a 'coolwarm' color palette to indicate the strength and direction of the correlations, with positive correlations shown in warm tones and negative correlations in cool tones. This visual representation helps in quickly identifying strong correlations, both positive and negative, among the numerical features, thereby providing insights that can guide further analysis and decision-making processes. The heatmap underscores the importance of certain variables and their interdependencies, which can be critical for predictive modeling and other statistical analyses.

The heatmap in Figure <ref>,  illustrates the correlation matrix of numerical features in the dataset, using the 'coolwarm' color palette to depict the strength and direction of correlations. Warm tones (red) indicate positive correlations, while cool tones (blue) indicate negative correlations. The diagonal elements show a perfect correlation of 1, as each feature is perfectly correlated with itself. Notable observations include a strong positive correlation (0.61) between 'strike' and 'vega', and a moderate positive correlation (0.37) between 'volume' and 'open_interest'. Conversely, 'strike' and 'theta' exhibit a moderate negative correlation (-0.25). Most feature pairs exhibit weak or no correlations, suggesting distinct underlying factors. This visualization aids in quickly identifying significant linear relationships, which is valuable for further analysis and decision-making.





§ RESULTS AND ANALYSIS

Table <ref> and <ref> present the option prices and standard errors predicted by different machine learning models. The results indicate that models such as LightGBM and logistic regression outperform traditional linear regression in estimating continuation values.


 §.§ Result of LSM with Different Machine Learning Model
 

The results presented in Table <ref> and <ref> offer valuable insights into the performance of LSM with machine learning algorithms in pricing American options. 










To see the model performance we used the numerical example presented in work <cit.>.
In this numerical example, Table  <ref> and <ref> report a range of numerical values for different parameter choices for different machine learning models. Throughout, we use K = 100, r = 0.04, T = 1, and take the same volatilities of both assets to be 0.2 or 0.4, with 10,000 paths and one basis function.



 §.§ Impact of Volatility and Time to Maturity


In Table <ref> and <ref>, we can observe the influence of volatility (σ) and time to maturity (T) on option prices. 


  
  * Volatility (σ): Higher volatility generally leads to higher option prices across all models. For instance, when S(0) = 80 and T = 1, the KNN price increases from 24.37 (when σ = 0.2) to 30.87 (when σ = 0.4). The standard errors tend to increase with higher volatility, reflecting the increased uncertainty and complexity in pricing under these conditions.
  
  
  * Time to Maturity (T): Longer maturities also result in higher option prices. For example, with S(0) = 80 and σ = 0.2, the KNN price increases from 24.37 (when T = 1) to 25.36 (when T = 2). The standard errors typically increase with longer maturities, indicating greater variability in the predictions as the time horizon extends.

Figure <ref> provides a visual comparison of the fit of the six approaches. Each model here uses 5 basis functions (polynomials up to degree 5). The x-axis shows the simulated stock price at a step in time and the y-axis shows the discounted option value from the next step. Figure <ref>, we can see that polynomial fits for the following machine learning applied to LSM; KNN, Decision Tree, XGBoost, LightGBM, Logistic Regression, and Random Forest. Some of these methods provide a better visual fit for example here we can see that Logistic Regression provides a better visual fit.






Here let's compare the pricing of an example American put option with the following details:    S_0 = 100, K = 100, T = 1.0, r = 0.02, and σ = 0.4
 Monte Carlo simulation was performed with 25 time intervals and 10000 paths. Table <ref> shows the results.

 



From Table <ref>, we can see computational times reveal that simpler models like Decision Trees and Logistic Regression are the quickest, with times of 2.033 and 2.133 seconds respectively, indicating their suitability for scenarios requiring rapid computations. KNN also performs moderately well at 2.593 seconds. In contrast, ensemble methods such as Random Forest take significantly longer, with a computational time of 167.095 seconds, reflecting their higher complexity and resource demands. Gradient boosting methods, XGBoost and LightGBM, offer a balance between speed and performance, with times of 6.689 and 5.506 seconds respectively, making them efficient yet powerful options. This highlights a trade-off between computational efficiency and model complexity, guiding the choice of method based on specific needs for speed versus predictive accuracy.

Below we are going to see the performance of various machine learning models used within the Long staff-Schwartz Method (LSM) framework for pricing American options. The models evaluated are K-Nearest Neighbors (KNN), Decision Tree, XGBoost, LightGBM, Logistic Regression, and Random Forest. Each model is analyzed based on the estimated option price, standard error, execution time, and classification performance metrics (confusion matrix, precision, recall, F1-score, and ROC AUC). Table <ref> presents the results of six different models evaluated using several performance indicators for the in-time sample. These metrics include accuracy, AUC, PR-AUC, precision, recall, and F1-score. Among the six models evaluated, Logistic Regression has the highest scores across all metrics, achieving an accuracy score of 0.9995, an AUC score of 1.0000, a PR-AUC score of 1.0000, a precision score of 0.9990, a recall score of 1.0000, and an F1-score of 0.9995. This indicates that Logistic Regression is highly effective in pricing American options within the in-time sample, showing exceptional performance without apparent overfitting or class imbalance issues.








LightGBM follows Logistic Regression to have better performance with an AUC score of 0.8640. However, its accuracy score of 0.5078 and PR-AUC score of 0.5078, along with a precision score of 0.4870 and a perfect recall score of 1.0000, indicate a trade-off between precision and recall. This suggests that while LightGBM is good at identifying positive cases, it may produce more false positives compared to Logistic Regression. XGBoost provides robust performance with an AUC score of 0.8416 and a PR-AUC score of 0.8425. It has an accuracy score of 0.5078 and a precision score of 0.5078, coupled with a perfect recall score of 1.0000. The lower precision score compared to its recall indicates a higher likelihood of false positives, but its overall high AUC and PR-AUC scores reflect strong model reliability. Decision Tree offers a balanced performance with an accuracy score of 0.5599, an AUC score of 0.6041, and a PR-AUC score of 0.5813. It has a precision score of 0.5370 and a recall score of 0.9663, leading to an F1-score of 0.6904. This suggests that Decision Tree captures most positive cases effectively, although it has lower discriminative power compared to LightGBM and XGBoost. Random Forest shows moderate performance with an accuracy score of 0.5111, an AUC score of 0.6332, and a PR-AUC score of 0.6174. Its precision score of 0.5095 and recall score of 1.0000 lead to an F1-score of 0.6750. Like the Decision Tree, Random Forest provides balanced but lower overall performance compared to the boosting models. KNN also provides moderate performance with an accuracy score of 0.5101, an AUC score of 0.6677, and a PR-AUC score of 0.6588. It has a precision score of 0.5090 and a recall score of 1.0000, resulting in an F1-score of 0.6746. KNN's performance is similar to Random Forest, with high recall and moderate precision, making it suitable for simpler use cases. Overall, while Logistic Regression is the top performer across all metrics, other models like LightGBM and XGBoost also demonstrate effectiveness, particularly in terms of AUC and PR-AUC, highlighting their robustness in pricing American options.


















     

    


 §.§ ROC-AUC and Precision-Recall Curve Analysis



 Figure <ref> shows the ROC-AUC curve which is depicting the ability of each model to distinguish between positive and negative samples. From the curve, it is evident that:


    
  * Logistic Regression has the highest AUC score of 1.00, indicating perfect discriminatory ability.
    
  * LightGBM follows with an AUC score of 0.86.
    
  * XGBoost has an AUC score of 0.84.
    
  * KNN and Random Forest have moderate AUC scores of 0.67 and 0.63, respectively.
    
  * The Decision Tree model has the lowest AUC score of 0.60.




An AUC score above 0.8 generally indicates a good model, and hence, Logistic Regression, LightGBM, and XGBoost are considered better performers in distinguishing between classes.

 












Figure <ref> shows the Precision-Recall (PR) curve  
 which provides insights into the trade-off between Precision and Recall for each model. The PR-AUC scores are as follows:

    
  * Logistic Regression again leads with a perfect PR-AUC score of 1.00.
    
  * LightGBM has a PR-AUC score of 0.86.
    
  * XGBoost follows closely with a PR-AUC score of 0.83.
    
  * KNN, Random Forest, and Decision Tree have lower PR-AUC scores of 0.64, 0.61, and 0.58, respectively.

The higher the PR-AUC score, the better the model is at balancing precision and recall, particularly useful for imbalanced datasets.









 §.§ Confusion Matrix Analysis


The confusion matrices in Figure <ref> provide a detailed breakdown of True Positives (TP), True Negatives (TN), False Positives (FP), and False Negatives (FN) for each model. From these matrices:

    
  * Logistic Regression achieves nearly perfect classification with minimal misclassifications.
    
  * LightGBM and XGBoost show a good balance with high TP and TN counts.
    
  * Decision Tree and Random Forest exhibit more misclassifications compared to the top performers.
    
  * KNN shows the highest number of misclassifications, indicating it may not be as effective for this task.


















Overall, Logistic Regression emerges as the top-performing model across most metrics, making it highly suitable for pricing American options. LightGBM and XGBoost also demonstrate strong performance, while KNN and Decision Tree are less effective.






 §.§ Result of Recurrent Neural Network (RNN) on Dataset


The dataset containing various features related to financial options was loaded and split into features (X) and the target variable (y), representing bid prices. A train-validation split of 80-20 was employed to partition the dataset into training and validation sets.


 §.§ Model Architecture


Using TensorFlow's Keras API, LSTM and GRU models were constructed with four hidden fully connected layers, each comprising 200 neurons, followed by an output layer with a single neuron for bid price prediction. Rectified Linear Unit (ReLU) activation functions were applied in all layers. The mean squared error (MSE) loss function was chosen to quantify prediction errors. Both models were optimized using the Adam optimizer with a learning rate of 0.001.























The models underwent training for 200 epochs with a batch size of 64. During training, validation set performance was monitored to prevent over fitting. Evaluation of the models was conducted using the mean squared error (MSE) metric on the validation set to assess predictive accuracy which are summarised in Table <ref>.














 §.§ Training and Validation Loss Analysis


From the training and validation loss Figure <ref> and <ref>, it is evident that both the GRU and LSTM models demonstrate significant reductions in loss over the training epochs. The GRU model shows more stability with fewer spikes in the validation loss compared to the LSTM model, which has a noticeable spike around the 35th epoch.



 The GRU model's validation loss fluctuates less and maintains a relatively lower loss towards the end of the training, suggesting better generalization and stability. On the other hand, the LSTM model, while initially reducing loss effectively, exhibits more variability and occasional higher spikes, indicating potential overfitting or sensitivity to certain epochs.








































 §.§ Error Metrics Comparison

Looking at the error metrics provided in Table <ref>, the GRU model outperforms the LSTM model across all evaluated metrics. The GRU model achieves a lower Mean Absolute Error (MAE) of 0.49075 compared to 0.5919 for the LSTM model.







 Similarly, the Mean Squared Error (MSE) and Root Mean Squared Error (RMSE) are significantly lower for the GRU model, with values of 0.84277 and 0.9180 respectively, as opposed to the LSTM model's 1.7017 and 1.3045. This indicates that the GRU model not only fits the training data better but also predicts more accurately on the test data, making it a more reliable choice for this specific application. Additionally, the training time per epoch is shorter for the GRU model (6ms/step) compared to the LSTM model (7ms/step), indicating a more efficient training process. Therefore, the GRU model demonstrates superior performance in terms of both stability and predictive accuracy, making it a preferable choice over the LSTM model.






§ CONCLUSIONS


The study demonstrates that machine learning algorithms integrated with Monte Carlo simulations can effectively price American options, offering significant improvements over traditional methods. Through extensive experimentation, we found that models such as neural networks and other machine learning techniques provide more accurate pricing, especially in complex market conditions where traditional models struggle. Moreover, the study demonstrates the effectiveness of LSTM and GRU models in predicting bid prices for financial options, with the GRU model exhibiting superior performance. These results pave the way for further exploration and optimization of deep learning methods in financial forecasting, suggesting that such models can potentially outperform traditional approaches like LSM in specific applications. The comprehensive analysis and comparison provide valuable insights into the strengths and limitations of deep learning models, advocating for their integration into financial forecasting and option pricing frameworks. The findings suggest several future directions for research. One promising area is the integration of more sophisticated machine learning models, such as deep reinforcement learning and advanced neural network architectures, to further enhance pricing accuracy. Additionally, the development of hybrid models that combine the strengths of traditional financial theories and machine learning could provide even more robust solutions. Future work should also focus on improving model interpretability and addressing data scarcity issues by leveraging techniques such as transfer learning and data augmentation. Finally, real-world testing and validation of these models in live trading environments will be crucial for assessing their practical applicability and robustness. Again future research could focus on optimizing hyperparameters, exploring other deep learning architectures like Transformers, and incorporating additional features such as macroeconomic indicators. Data augmentation and synthetic data generation techniques can enhance model training, while real-time prediction systems would validate practical performance. By advancing the intersection of machine learning and financial modeling, this research opens up new possibilities for more accurate and efficient option pricing, ultimately contributing to better risk management and decision-making in financial markets.

		
		
		
	