**– fixed in Mathematica 9 –**

Some problems with FinancialDerivative in Mathematica 8? Wait for v9 (should be released in a couple of months) or try the the Finance Platform.

While testing my app European Options, I used as a cross-check the excellent FinancialDerivative function of Mathematica 8. FinancialDerivative gives **price and greeks** for a wide choice of financial products, **European and American style**. Nevertheless at some point I came across some problems:

- For the “Out”
**BarrierOptions**the “Rebate” term is not implemented. So you get the following wrong result by typingIn[2]:= FinancialDerivative[{"BarrierUpOut", "European", "Call"}, {"StrikePrice" -> 110.00, "Expiration" -> 0.5, "Barrier" -> 105, "Rebate" -> 3}, {"InterestRate" -> 0.08, "Volatility" -> 0.25, "CurrentPrice" -> 100, "Dividend" -> 0.04}, {"Value", "Greeks"}] Out[2]= {0., {"Delta" -> 0., "Gamma" -> 0., "Rho" -> 0., "Theta" -> 0., "Vega" -> 0.}}

Which is correct with a

**zero rebate**, while in this case the correct result should beOut[2]= {2.34535,{Delta->0.130242,Gamma->0.000861361,Rho->1.57311,Theta->-0.61502,Vega->2.02904}}

- The “
**Gamma**” (the sensitivity of Delta with respect the spot price) for all the financial products I tested so far is surprisingly inaccurate. As an example I show here what we get for simple vanilla call and put for which it easily derived by**call-put parity**that the Gamma should be the same.In[3]:= FinancialDerivative[{"Vanilla", "European", "Put"}, {"StrikePrice" -> 110.00, "Expiration" -> 0.5}, {"InterestRate" -> 0.08, "Volatility" -> 0.25, "CurrentPrice" -> 100, "Dividend" -> 0.04}, {"Value", "Greeks"}] Out[3]= {11.6465, {"Delta" -> -0.619661, "Gamma" -> 0.020876, "Rho" -> -36.8063, "Theta" -> -3.11937, "Vega" -> 26.1189}} In[4]:= FinancialDerivative[{"Vanilla", "European", "Call"}, {"StrikePrice" -> 110.00, "Expiration" -> 0.5}, {"InterestRate" -> 0.08, "Volatility" -> 0.25, "CurrentPrice" -> 100, "Dividend" -> 0.04}, {"Value", "Greeks"}] Out[4]= {3.97952, {"Delta" -> 0.360538, "Gamma" -> 0.0208805, "Rho" -> 16.0371, "Theta" -> -7.65352, "Vega" -> 26.1189}}

The two Gamma are different from each other and different from the correct result which is in this case

**Gamma = 0.0208952**.

I reported the bug to the **Wolphram Support** and after few days I received a first answer. The guy at support was very kind, but told me that the problem was not showing up on his version (**Windows** and **Finance Platform**). After a few try the final answer has been the following:

“*Hi Stefano*

*I have carried out the same evaluations as you mentioned for FinancialDerivative for BarrierDownOut and BarrierUpOut options under Linux and have been able to replicate your problems. Thank you for bringing this to our attention. It has now been fixed for version 9 of Mathematica which will be released in a couple of months. Also the problems with the inaccuracy of Gamma were not showing up in my version because I was running it on the Finance Platform, which had fixed that bug. All these errors have been resolved in version 9 of Mathematica. Thanks again for sending in your emails about this as they help to improve our product.*”

So… keep waiting for v9.

**– fixed in Mathematica 9 –**

** **