New in Wolfram
Mathematica
8: Built-in Financial Computations
◄
previous
|
next
►
Application Areas
Computation of Greeks
Compute the sensitivities to various parameters.
In[1]:=
X
ticks[min_, max_] := Table[{j, Round[j 50], {.04, 0}}, {j, min, max, 0.2}]
In[2]:=
X
Grid[{Take[#, 3], Take[#, -2]} &@(ListPlot[#, Ticks -> {ticks, Automatic}, Epilog -> Inset[Rotate[ Text[Style[#2, Bold, 16, Directive[Opacity[0.5]], FontFamily -> "Courier"]], 0]]] & @@@ Transpose[{Transpose[ Table[{i, #} & /@ FinancialDerivative[{"American", "Call"}, {"StrikePrice" -> 40, "Expiration" -> 3}, {"InterestRate" -> 0.01, "Volatility" -> 0.2, "CurrentPrice" -> 50 i, "Dividend" -> 0.05, "ReferenceTime" -> 0.4}, "Greeks"][[ All, 2]], {i, 0.5, 1, 0.05}]], {"Delta", "Gamma", "Rho", "Theta", "Vega"}}])]
Out[2]=