- Joined
- 1/13/11
- Messages
- 1,362
- Points
- 93
I need opinions...I have created the inheritance chain for options and developed the pricing algorithms for many types. The structure is as follows:
The abstract class "Option" is higher up the inheritance chain defining the common members and polymorphic interface for derived types - properties like underlying, sigma, interestrate, etc. and methods like Price method which is abstract as well and forces the child classes to implement it. The derived classes are divided into the European, American and ExoticOptions classes. European option is the poorer class here which in addition to the inherited members, defines BS formula and the parity relationship as well as some typical characteristics for options. The AmericanOption class defines the some simulation methods and standard binomial pricing function. In addition this class serves as a base class for BermudianOption class which overrides some members but I haven't defined it's pricing models yet. Exotics include the Barrier, Vanila - some Asian option types which override the base class's implementation and extend the functionality by providing their unique version of methods. This was a brief introduction to what I've already done. I plan to make the Derivatives class as the very base class and subclass Option from it in order to have a place for forwards, futures and other derivatives instruments as well. Also want to create a GUI in DevExpress.
So I need your opinions about the structure how it can be done and if you like what is done already.
P.S. I've tried the algorithms to be as fast as possible, made two versions of almost every complex method - one ordinary operating on standard value type variables and the same ones with generics to avoid type conversions for different incoming value types (actually there was no need since it's for my internal use but still - defined two versions of each). Thanks in advance
The abstract class "Option" is higher up the inheritance chain defining the common members and polymorphic interface for derived types - properties like underlying, sigma, interestrate, etc. and methods like Price method which is abstract as well and forces the child classes to implement it. The derived classes are divided into the European, American and ExoticOptions classes. European option is the poorer class here which in addition to the inherited members, defines BS formula and the parity relationship as well as some typical characteristics for options. The AmericanOption class defines the some simulation methods and standard binomial pricing function. In addition this class serves as a base class for BermudianOption class which overrides some members but I haven't defined it's pricing models yet. Exotics include the Barrier, Vanila - some Asian option types which override the base class's implementation and extend the functionality by providing their unique version of methods. This was a brief introduction to what I've already done. I plan to make the Derivatives class as the very base class and subclass Option from it in order to have a place for forwards, futures and other derivatives instruments as well. Also want to create a GUI in DevExpress.
So I need your opinions about the structure how it can be done and if you like what is done already.
P.S. I've tried the algorithms to be as fast as possible, made two versions of almost every complex method - one ordinary operating on standard value type variables and the same ones with generics to avoid type conversions for different incoming value types (actually there was no need since it's for my internal use but still - defined two versions of each). Thanks in advance