The power of object orientated programming comes from its ability to store information about an object and to also carry out functions upon it!
Simulating derivatives requires a host of parameters: simulation parameters, such as the number of paths, the characteristsics of the underlying intstrument, the interest rate environment, the currencies involved etc etc. Then there are a host of different models that can be chosen to carry out the stochatistic projections of the underlying instrument, the variable payoff functions of the derivaties themselves and the corresponding disounting factors after.
Object orientated programming allows us to build a structure to be able to efficiently encapsualte, record and swap out different financial models and their correpsonding parameters, by creating a pre-designed fincancial environment structure, this structure stops us needing to code each algorithm explicitly but instead allows us the flexibility to just change the chosen parameters for our desired derivative.
The financial environment structure encompasses an array of classes (which I have grouped as a derivatives package) that are pre-produced containing useful features and functions that are required across the simulation of all derivatives instruments. Identifiying this common functionality allows us to leverage it to write dynamic code that is highly efficient in production usage.
In this project I will create a full derivatives package, step by step, for modelling european derivative within a defined financial environment. The objective of the project will be to, by the end, value a call option on the same Apple stock seen in my "monte carlo simulation of stochastic processes" project to show how procedural programming can be turned into functional programming.