Separation of Concerns
Separation of Concerns (SoC)
ThetaML follows the "separation of concerns" design principle so that functions can be optimized independently of other functions. This allows us to work on a specific aspect of an application without having significant impact on other parts of the application. This "separation of concerns" aspect of ThetaML is achieved through modularity of programming and encapsulation, which makes it easier to understand, maintain and extend.
[|Theta Suite] is architected upon the payoff language ThetaML. It is a generic Monte Carlo engine. Through ThetaML, Theta Suite prices an arbitrary derivative independently from the underlying model implementations. Its Theta Orchestrator component allows one to build dynamics models by pulling together a market model that models the economic state variables, a payoff model that describes option payoffs and an exercise model that computes exercise strategies or option prices. This is smart for creating new products and easy for maintaining systems. Better still, Theta Suite parses scripted payoffs within the limits of a backend language such as Matlab.
Theta Suite has a built-in result analyzer with Matlab graphing capabilities. It can also present simulation results in Excel and Matlab for further analyses.
The separation of concerns in an option pricing example
This section demonstrates the "Separation of Concerns" principle of ThetaML through the pricing of an American put. The market model simulates the state variables - the underlying stock and the numeraire - which are imported as processes into the payoff description model. The payoff description model describes the American put option payoff and exports the exercise values. The exercise values are imported as a process into an exercise model that computes the exercise strategy and returns the American put option price.
The American put option payoff is described through the model AmericanPut in Payoff Description Language. The model imports the numeraire and the stock prices simulated in the market model and computes the exercise values ExerciseValue_CUR.
The Exercise Model imports the exercise values ExerciseValue_CUR and computes the exercise strategy and American put option price. The exercise model can be a simple risk neutral exercise RiskNeutralExerciserCash or a variance optimal hedged RiskNeutralExerciserCashHedged.
The early exercise strategies in the American put option is evaluated with the ThetaML E function. The E function computes the conditional expected values based on the current information, it uses the least squares Monte Carlo regression method combined with the sparse grid basis functions.
The model RiskNeutralExerciserCashHedged uses a variance optimal hedge computed by the ThetaML Beta function to improve the accuracy of the option price.
Combining the Models
Putting together the market model, the payoff description model, and the exercise model, the American put option is priced with each functionality a separate process independent from the others.