Review FDVanillaEngine hierarchy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
JQuantLib |
New
|
Medium
|
Unassigned |
Bug Description
This issue consists on:
1. translating the missing classes;
2. review the class hierarchy and make the necessary changes on type parameters in order to properly mimic Quantlib/C++
<b>This is the basic hierarchy of FDVanillaEngine</b>
<pre>
FDVanillaEngine
|--FDEuropeanE
|--FDMultipePe
|-
|-
| |--FDDividendEn
| | |--FDDividendEngine
| |--FDDividenEng
|-- FDStepCondition
</pre>
<b>Class FDAmericanCondition derives conditionally from other classes</b>
<pre>
FDDividendEngin
FDDividendEngin
FDDividenEngine
FDStepCondition
</pre>
<b>Class FDShoutCondition derives conditionally from other classes</b>
<pre>
FDDividendEngin
FDDividendEngin
FDDividenEngine
FDStepCondition
</pre>
Observe that class FDAmericanCondition and FDShoutCondition can accept 4 kinds of type parameters where 3 of then ultimately extend FDDividendEngin
Probably the easiest way to solve this problem is:
a.1. Extract the interface from FDDividendEngin
a.2. Create an abstract implementation of FDDividendEngin
a.3. Make FDDividendEngin
a.4. FDDividendEngine remains an extension of FDDividendEngin
b.1. Extract the interface from StepConditionEngine
b.2. Create an abstract implementation of StepConditionEngine
b.3. Make StepConditionEngine extend this abstract implementation
c.1. Change FDAmericanCondition to accept both interfaces as type parameters:
<pre>
public class FDAmericanCondition
<T extends FDDividendEngin
implements FDStepCondition
</pre>
d.1. Change FDShoutCondition to accept both interfaces as type parameters:
<pre>
public class FDShoutCondition
<T extends FDDividendEngin
implements FDStepCondition
</pre>
=============
Relationships
=============
related to http://
has duplicate http://
child of http://
At the moment class FDDividenEngine ShiftScale is missing.